<?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: Approve or Reject using Function Module in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474763#M80299</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;You can try the below approach may be if it works for you&lt;/P&gt;&lt;P&gt;first try to set the values in the workitem container which helps to decide whether they approved or rejected by using SAP_WAPI_WRITE_CONTAINER.&lt;/P&gt;&lt;P&gt;secondly, then try to execute the workitem by usinf SAP_WAPI_EXECUTE_WORKITEM or SAP_WAPI_WORKITEM_COMPLETE.&lt;/P&gt;&lt;P&gt;Thanks, Pavan&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2017 10:04:20 GMT</pubDate>
    <dc:creator>bpawanchand</dc:creator>
    <dc:date>2017-04-26T10:04:20Z</dc:date>
    <item>
      <title>Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaq-p/474760</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I want to approve or reject the workitem using UI5. The backend process is already set it has workflow for the same.&lt;/P&gt;&lt;P&gt;The workflow looks exactly like this : &lt;A href="https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=68644" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=68644&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Worlflow consultant have used the Form for approve or reject. Now I want achieve this using the FM : SAP_WAPI_DECISION_COMPLETE &lt;/P&gt;&lt;P&gt;But the issue is when I pass the workitem ID to this FM it say that it don't have decision key.&lt;/P&gt;&lt;P&gt;Kindly suggest a way where I can Approve or Reject using Function Module.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 05:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaq-p/474760</guid>
      <dc:creator>Hvshal4u</dc:creator>
      <dc:date>2017-04-25T05:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474761#M80297</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To use the function module SAP_WAPI_DECISION_COMPLETE two things are very important to understand&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;The work item which you are trying to complete is a standard decision step, or is it is a copy of TS00008267 , or it is the same task.&lt;/LI&gt;&lt;LI&gt;You must be aware of the action option sequence define in the decision step of the workflow. For instance 001 is for Approve, 002 is for Reject.&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;&lt;CODE&gt;   CALL FUNCTION 'SAP_WAPI_DECISION_COMPLETE'
 EXPORTING
 workitem_id = i_wiid
 language = l_langu
 user = l_uname
 decision_key = &amp;lt;PASS the ID  it can be either 001 or 002&amp;gt; 
 do_commit = 'X'
 IMPORTING
 return_code = l_subrc
 TABLES
 message_lines = lt_message_lines
 message_struct = lt_message_struct.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Form step of the workflow does not use the decision step task it is generated dynamically each time you create a new form step. So this function module does not work.&lt;/P&gt;&lt;P&gt;Thanks, Pavan&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 07:13:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474761#M80297</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2017-04-26T07:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474762#M80298</link>
      <description>&lt;P&gt;Thanks Pavan ,&lt;/P&gt;&lt;P&gt;Yes, Pavan you are right is is not a decision step.Instead they call a module pool in that module pool the user takes the decision.&lt;/P&gt;&lt;P&gt;If you go through this link : &lt;A href="https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=68644"&gt;https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=68644&lt;/A&gt; &lt;/P&gt;&lt;P&gt;you will get a correct idea.&lt;/P&gt;&lt;P&gt;Can u please suggest how can I achieve this using function module.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 08:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474762#M80298</guid>
      <dc:creator>Hvshal4u</dc:creator>
      <dc:date>2017-04-26T08:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474763#M80299</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;You can try the below approach may be if it works for you&lt;/P&gt;&lt;P&gt;first try to set the values in the workitem container which helps to decide whether they approved or rejected by using SAP_WAPI_WRITE_CONTAINER.&lt;/P&gt;&lt;P&gt;secondly, then try to execute the workitem by usinf SAP_WAPI_EXECUTE_WORKITEM or SAP_WAPI_WORKITEM_COMPLETE.&lt;/P&gt;&lt;P&gt;Thanks, Pavan&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 10:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474763#M80299</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2017-04-26T10:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474764#M80300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  From my suggestion, change  the workflow design.  You can add deadline monitoring  in the Form  step, if  user not execute it, then  delete the step and in modelled deadline you add step to your desire functionality&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 10:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474764#M80300</guid>
      <dc:creator>anjan_paul</dc:creator>
      <dc:date>2017-04-26T10:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474765#M80301</link>
      <description>&lt;P&gt;Thanks Anjan,&lt;/P&gt;&lt;P&gt;But changing the workflow is not an option for me right now.&lt;/P&gt;&lt;P&gt;Thanks for your input.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 11:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474765#M80301</guid>
      <dc:creator>Hvshal4u</dc:creator>
      <dc:date>2017-04-26T11:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Approve or Reject using Function Module</title>
      <link>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474766#M80302</link>
      <description>&lt;P&gt;Thanks Pavan,&lt;/P&gt;&lt;P&gt;I will try by your way.I want to approve or reject through UI5.&lt;/P&gt;&lt;P&gt;Can u pls let me know how can I pass the decision key in FM : SAP_WAPI_WORKITEM_COMPLETE.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 11:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/approve-or-reject-using-function-module/qaa-p/474766#M80302</guid>
      <dc:creator>Hvshal4u</dc:creator>
      <dc:date>2017-04-26T11:20:57Z</dc:date>
    </item>
  </channel>
</rss>

