on ‎2020 Sep 15 9:20 AM
Hi,
I have created a work flow which has three steps
1) will create a system using API
2) Decision : either approve or Reject
3) If Approved then Undeploy The System
and i have written creating and undeploy system codes
in Class and methods.
now my requirement is to trigger this workflow from ABAP program .
Please help me to complete this Requirement.

Request clarification before answering.
Hi ,
If you do not have any events assigned to the workflow definition then use SAP_WAPI_START_WORKFLOW function module to start worklfow from a report. Pass the Workflow ID to this function module and pass abap_true to commit work parameter of the function module. It will start the workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pavan,
Thanks for your suggestion , but this FM doesnot have Workflow id option rather it has TASK,
this function i am not sure will fullfill my requirement or not,
as i stated i have 3 steps in workflow , every steps has export container parameter which i have to show as abap report output too.
Thanks
Hi Vikash,
You are correct the task id is the parameter which you are suppose to pass workflow ID for instance the sample code is below
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = 'WS999999XX'
language = sy-langu
do_commit = 'X'
IMPORTING
return_code = lv_re_code " Sy-subrc value or success = 0
workitem_id = lv_wiid " top workitem id
TABLES
input_container = lt_cont. " If you want to pass some values from report to Workflow container
Regarding your requirement, once you start the workflow the export and import from workflow to task container is done within workflow binding definitions.
Regards
Pavan Bhamidipati
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.