Skip to Content
author's profile photo Former Member
Former Member

Passing Internal tables to Workflow

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2006 at 10:00 AM

    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.



    objtype = lc_objtyp

    objkey = lv_objkey

    event = lc_event


    event_id = lv_eventid


    event_container = lt_container


    objtype_not_found = 1

    OTHERS = 2.



    Message was edited by: Prakashsingh Mehra

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Lakshmi,

      I have some further comments which might clear the situation more for you..

      Instead of SWE_EVENT_CREATE, please use the more official workflow bapi SAP_WAPI_CREATE_EVENT. It should have the same input/output params as SWE_EVENT_CREATE but SAP guarantees the function won't change in the future so you're safe for upgrades etc.

      The event triggering can be done as Prakash has written. In addition, you need to first define the event parameters for the event you are raising. Go to SWO1 for the appropriate business object and modify the event required. There enter the proper attribute/object type for the event and click on multiline to have multiple lines for the event container.

      After this you can bind the event container elements to the workflow container elements (event linkage). Just make sure to have the workflow container element set up similarly as the event parameter (multiline).

      Hope this helps,


  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 12:04 PM

    Hi Lakshmi Narayana,

    if your problem of passing an internal table to workflow has been solved, can u please explain the procedure to do the same as i'm in deperate need of it.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.