How to pass object refrences to a workflow ?
Fabrizio Raffa
sap.workflow at icm.it
Fri Mar 28 06:20:01 EST 2003
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
.
More information about the SAP-WUG
mailing list