Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multiple Input values in Workflow Container Events through Executable Program

former_member207480
Participant
0 Likes
1,579

Hi,

I have searched all the related documents and threads related to multiple input values to event container. But, it could not solve my purpose.

I have used CALL FUNCTION 'SAP_WAPI_CREATE_EVENT' which is sending PERNR as object key as my container element. As well as I want to pass more 4 fields to input container and accordingly I have added in INPUT_CONTAINER table.

I have added INPUT_CONTAINER table parameter name as 'ContainerItem' in Business Object Event (SWO1) and done the binding with event ->workflow. But, 'ContainerItem' parameter is not showing in Event object list while binding. Only PERNR is showing in the event object.

Here how I am calling event.

LOOP AT GIT_JOINLTRDT ASSIGNING <GWA_JOINLTRDT>
WHERE CHKBOX = GC_X.

*** Calling Workflow Event
LV_OBJKEY = <GWA_JOINLTRDT>-PERNR.

LWA_CONTAINER-ELEMENT = 'JDATE'.
LWA_CONTAINER-VALUE = <GWA_JOINLTRDT>-JDATE.
APPEND LWA_CONTAINER TO LIT_CONTAINER.
CLEAR LWA_CONTAINER.


LWA_CONTAINER-ELEMENT = 'LTRSENT'.
LWA_CONTAINER-VALUE = <GWA_JOINLTRDT>-LTRSENT.
APPEND LWA_CONTAINER TO LIT_CONTAINER.
CLEAR LWA_CONTAINER.


LWA_CONTAINER-ELEMENT = 'LTRAPR'.
LWA_CONTAINER-VALUE = <GWA_JOINLTRDT>-LTRAPR.
APPEND LWA_CONTAINER TO LIT_CONTAINER.
CLEAR LWA_CONTAINER.


LWA_CONTAINER-ELEMENT = 'HCRECD'.
LWA_CONTAINER-VALUE = <GWA_JOINLTRDT>-HCRECD.
APPEND LWA_CONTAINER TO LIT_CONTAINER.
CLEAR LWA_CONTAINER.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = LC_OBJTYP
OBJECT_KEY = LV_OBJKEY
EVENT = LC_EVENT
TABLES
INPUT_CONTAINER = LIT_CONTAINER
MESSAGE_LINES = LIT_MESSAGE
MESSAGE_STRUCT = LIT_MESSAGE_STR.

3 REPLIES 3
Read only

bharatpemmireddy
Participant
0 Likes
1,107

Can you send me a screenshot of Parameters view in SWO1 for your event. Also the binding from event to workflow container.

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
0 Likes
1,107

Hello amol.khochare

You haven't specified what event and of what business object you are calling i.e. the values of LC_OBJTYP and LC_EVENT constants.

The container definition that you see in the binding comes from event parameters (event container) definition. That is maintained along with the business object in SWO1 transaction.

It really doesn't matter here what you actually put into the event container when calling SAP_WAPI_CREATE_EVENT function to raise the event. The binding definition will show the event container as defined in SWO1. Of course the content of the event that you pass to SAP_WAPI_CREATE_EVENT should correspond to the definition of the event parameters (container).

Best regards

Dominik Tylczynski

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,107

Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).