on 04-23-2009 4:48 AM
Hi Guys,
I am triggering an event using FM SWE_EVENT_CREATE. Is it possible to get Workitem ID from Event ID. Does it create Event ID before commit work after calling FM SWE_EVENT_CREATE.
I am triggering this workflow Event from ABAP-WebDynpro Application. When I add a new structure to the Workflow container, even though I fill this data while raising an event still its not updated in the workflow.
So I am trying to work way around; to update the container using workitem id.
Thanks
Firstly
Use SAP_WAPI_CREATE_EVENT function module, if you want to know what is the event id then if you look at the exporting parameters of the function module EVENT_ID it will give you the event ID.
And coming to passing values to WF from dynpro application is simple
declare a standard table of type SWR_CONT and this table is a ELEMENT- VAlUE pair combination.
Define the element name same as what have you defined in the workflow. In this way append all the container valules to the table and pass this table to the FM tables parameter INPUT_CONTAINER this will transfer all the values from Dynpro to workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the reply.
Here is my code.
DATA: v_objkey TYPE sweinstcou-objkey,
t_container TYPE swconttab.
swc_set_element t_container 'NewContData' newcontdata.
swc_set_table t_container 'ApprovalText' approvaltext.
swc_set_element t_container 'Approver' approver.
swc_set_element t_container 'TrimLink' trim_link.
MOVE newcontdata-pernr TO v_objkey.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'BUS1065'
objkey = v_objkey
event = 'WDNEWCONTRACT'
TABLES
event_container = t_container
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK.
But when I check in workflow log I don't find values for container element TRIMLINK.
But other container elements are updated.
Thanks
Hello,
Firstly, you should use SAP_WAPI_CREATE_EVENT.
You can pass any value you want to the container via event parameters.
Try it, if it doesn't work show us what you've tried and what the problem is.
Don't update the container directly.
regards
Rick Bakker
Hanabi Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.