‎2020 Oct 01 3:29 PM
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.
‎2020 Oct 01 3:39 PM
Can you send me a screenshot of Parameters view in SWO1 for your event. Also the binding from event to workflow container.

‎2020 Oct 01 4:39 PM
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
‎2020 Oct 01 5:54 PM
Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).