on 2022 Sep 01 12:17 PM
Dear experts,
I was wondering how I can get the workflow ID that has been created via a Class-based workflow trigger.
I have followed the logic, as it is explained in the following blogs:
https://blogs.sap.com/2006/07/27/raising-abap-oo-events-for-workflow/
ending calling the corresponding method:
cl_swf_evt_event=>raise
How can I get the Workflow ID from such a workflow creation?
Thank you in advance.
Request clarification before answering.
Hello,
Thank you for the reply.
However, I would like to start a WF via event triggering from an ABAP class and then get the corresponding workflow ID.
As I saw from the aforementioned RFM, I can only explicitly state which workflow definition I want to start a workflow from.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nikos_c
I Worked On Workflow i used to generate Work item ID with a ProgramThanks,Suggu Sandeep.REPORT ZXX_XX_WF_SALES_VA03.
DATA:
gv_retcode TYPE sysubrc, " Global variable for Return code
gv_workid TYPE sww_wiid, " Global variable for WorkItem ID
gt_cont TYPE TABLE OF swr_cont, " Global Internal Table for Container
gt_msg TYPE TABLE OF swr_messag, " Global Internal Table for Message
gs_vbak TYPE vbak, " Global Workarea for Sales Document Header
gv_vbeln TYPE vbak-vbeln. " Global variable for sales document number
PARAMETERS: p_vbeln TYPE vbak-vbeln OBLIGATORY,
user_id TYPE int1.
gt_cont = VALUE #(
( element = 'I_VBELN' value = p_vbeln )
( element = 'USER_ID' value = user_id )
).
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS90100XXX' " Work Flow ID
do_commit = ABAP_TRUE
IMPORTING
return_code = gv_retcode
workitem_id = gv_workid
TABLES
input_container = gt_cont
message_lines = gt_msg.
IF gv_retcode IS INITIAL.
WRITE: 'Workitem ID:', gv_workid.
ENDIF. " IF gv_retcode IS INITIAL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
45 | |
9 | |
9 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.