<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: How to Execute Workflow From ABAP Program in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273261#M4597765</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 15:00:58 GMT</pubDate>
    <dc:creator>bpawanchand</dc:creator>
    <dc:date>2020-09-15T15:00:58Z</dc:date>
    <item>
      <title>How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaq-p/12273255</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have created a work flow which has three steps&lt;/P&gt;
  &lt;P&gt;1) will create a system using API&lt;/P&gt;
  &lt;P&gt;2) Decision : either approve or Reject&lt;/P&gt;
  &lt;P&gt;3) If Approved then Undeploy The System&lt;/P&gt;
  &lt;P&gt;and i have written creating and undeploy system codes &lt;/P&gt;
  &lt;P&gt;in Class and methods.&lt;/P&gt;
  &lt;P&gt;now my requirement is to trigger this workflow from ABAP program .&lt;/P&gt;
  &lt;P&gt;Please help me to complete this Requirement.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1843622-create1.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 08:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaq-p/12273255</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-09-15T08:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273256#M4597760</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;data(cnt) = cl_swf_cnt_factory=&amp;gt;create_event_container( &lt;BR /&gt;                            im_objcateg = 'CL' 
                            im_objtype  = class 
                            im_event    = event ). "START
Data(evt) = cl_swf_evt_event=&amp;gt;get_instance( 
                im_objcateg        = 'CL'
                im_objtype         = class
                im_event           = event 
                im_objkey          = objkey
                  im_event_container = cnt ).
 TRY.
     evt-&amp;gt;raise( ).

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or suchlike.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 08:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273256#M4597760</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-09-15T08:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273257#M4597761</link>
      <description>&lt;P&gt;we are not adding Workflow task name here ? and how it will be called?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 11:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273257#M4597761</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-09-15T11:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273258#M4597762</link>
      <description>&lt;P&gt;Here are the images posted by the OP, to avoid the pain of clicking multiple times to see them.&lt;/P&gt;&lt;P&gt;workflow-graph.jpg:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1845603-1843620-workflow-graph1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;create.jpg:&lt;/P&gt;&lt;P&gt;That's just the same image as create1.jpg already shown by the OP. NB: if you don't want to share an image, you may delete it in your question (but it's too late if someone has posted an answer...)&lt;/P&gt;&lt;P&gt;Do you want to trigger it by event (see Matthew answer), by Message Control (CA-GTF-BS), by BOPF, ..., or directly by the ID of the workflow definition? (the latter choice is the worst one)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 13:20:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273258#M4597762</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-15T13:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273259#M4597763</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;vikash.pathak&lt;/SPAN&gt; Why triggering the task only? (you told us that this task is one step among the three of your workflow definition)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 13:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273259#M4597763</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-15T13:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273260#M4597764</link>
      <description>&lt;P&gt;Then how to trigger whole workflow that all steps could trigger through ABAP Report&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:31:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273260#M4597764</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-09-15T14:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273261#M4597765</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 15:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273261#M4597765</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2020-09-15T15:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273262#M4597766</link>
      <description>&lt;P&gt;Hello Pavan,&lt;/P&gt;&lt;P&gt;Thanks for your suggestion , but this FM doesnot have Workflow id option rather it has TASK,&lt;/P&gt;&lt;P&gt;this function i am not sure will fullfill my requirement or not, &lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 04:41:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273262#M4597766</guid>
      <dc:creator>vikash_pathak</dc:creator>
      <dc:date>2020-09-16T04:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Execute Workflow From ABAP Program</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273263#M4597767</link>
      <description>&lt;P&gt;Hi Vikash,&lt;/P&gt;&lt;P&gt;You are correct the task id is the parameter which you are suppose to pass workflow ID for instance  the sample code is below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regarding your requirement, once you start the workflow the export and import from workflow to task container is done within workflow binding definitions. &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan Bhamidipati&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 06:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-execute-workflow-from-abap-program/qaa-p/12273263#M4597767</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2020-09-16T06:54:27Z</dc:date>
    </item>
  </channel>
</rss>

