How to pass object refrences to a workflow ?

Flavio Oliveira oliveiraflavio at hotmail.com
Fri Mar 28 07:36:18 EST 2003


When I need to do this, I normally use the macro SWC_SET_ELEMENT.
 
In your case, the code would be like this:
 
SWC_SET_ELEMENT l_cont 'Attach' object1.
 
This will put the value of "object1" into the atribute "Attach" on the
container l_cont.
 
Flavio.
 
 
>From: Fabrizio Raffa <sap.workflow at icm.it>
>Reply-To: SAP Workflow Users' Group <SAP-WUG at MITVMA.MIT.EDU>
>To: SAP-WUG at MITVMA.MIT.EDU
>Subject: How to pass object refrences to a workflow ?
>Date: Fri, 28 Mar 2003 12:20:01 +0100
>
>Hi all,
>one simple question about workflow.
>I trigger a workflow through an ABAP using SWE_EVENT_CREATE and with a
>custom business object.
>I want to pass to my workflow also one ore more object refrences (for
>example FI document display) that will be used in the whole workflow.
>I think the correct way is to use the container _Attach_Objects so I tried
>to put an element in the table container of the function module, but it
>doesn't work.
>What I'm doing wrong ?
>
>thanks in advance,
>Fabrizio Raffa
>
>pgm zzfr1.
>
>data: objkey like sweinstcou-objkey.
>data: handle like swotrtime-object.
>data: object1 type swc_object.
>
>swc_container l_cont.
>swc_create_container l_cont.
>concatenate i_bukrs i_belnr i_gjahr into objkey.
>swc_create_object object1 'BKPF' objkey.
>handle = object1-handle.
>
>CALL FUNCTION 'SWO_OBJECT_ID_GET'
>   EXPORTING
>     OBJECT        = handle
>  IMPORTING
>*   RETURN        =
>    OBJID         = object_key.
>
>*l_cont-element = '_Attach_Objects'.
>l_cont-element = 'Attach'.  <-aTTACH: PARAMETER FOR EVENT "START", LINKED
>TO '_Attach_Objects'
>l_cont-value = object_key.
>append l_cont.
>  CALL FUNCTION 'SWE_EVENT_CREATE'
>     EXPORTING
>       OBJTYPE                       = 'ZZ'
>       OBJKEY                        = '1234'
>       EVENT                         = 'START'
>* IMPORTING
>      EVENT_ID                        = event_id
>    TABLES
>      EVENT_CONTAINER               = l_cont
>    EXCEPTIONS
>      OBJTYPE_NOT_FOUND             = 1
>      OTHERS                        = 2
>             .
 
 
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
 


More information about the SAP-WUG mailing list