Hello all,
I learning workflow and have a small doubt related to passing internal table as parameter to workflow when it is triggered by a report program explicitely.
I wrote a prog to upload data from flat file into internal table and by passing this ITAB to the workflow for futher processing. <b>Actually i succeeded in this with only one field in my flat file (lfa1-lifnr).</b>
<b>what if my flat file contains more than one field? (i.e., lifnr, name1, city, county) how should i declare the parameters for my EVENT (triggering event) and same with my container declaration?</b>
Any inputs in this regards are welcome.
Thank you in advance,
Lakshmi Narayana
Hi Lakshmi,
Create Workflow container
swc_container lt_container.
swc_create_container lt_container.
Fill internal table with data
The container type and the internal table type should be same, U can use a structure to define both.
Declare a structure with all the fields.
Define a conatiner of same type of structure in worklow and set it in <b>wait for event</b> setp.
swc_set_table lt_container '<container_name>' lit_int_data.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = lc_objtyp
objkey = lv_objkey
event = lc_event
IMPORTING
event_id = lv_eventid
TABLES
event_container = lt_container
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
Rgds,
Prakash
Message was edited by: Prakashsingh Mehra
Add a comment