<?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>topic Re: KO02 - Internal Order Change in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089608#M1971663</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Did you try by passing i_save as X and then using commit work after that?&lt;/P&gt;</description>
    <pubDate>Tue, 01 Oct 2019 13:37:21 GMT</pubDate>
    <dc:creator>GK817</dc:creator>
    <dc:date>2019-10-01T13:37:21Z</dc:date>
    <item>
      <title>KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089604#M1971659</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt; I am trying to change Internal Order using BAPI '&lt;STRONG&gt;KAUF_ORDER_STORE'. But data is not getting updated. Can someone help me out.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Code that i have written:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;is_coas-ktext = 'Change IO K'.&lt;BR /&gt; *is_coas-ltext = 'Long text for IO'.&lt;BR /&gt; is_coas-aufnr = '1234TEST56'.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; is_kauf-auf_index = '1'.&lt;BR /&gt; is_kauf-flg_enque = 'X'.&lt;BR /&gt; is_kauf-flg_erloe = 'X'.&lt;BR /&gt; is_kauf-flg_obligox = 'X'.&lt;BR /&gt; is_kauf-old_astnr = '10'.&lt;BR /&gt; is_kauf-old_estnr = '00'.&lt;BR /&gt; is_kauf-par_actvt = '02'.&lt;BR /&gt; is_kauf-par_aprof = 'MSAM'.&lt;BR /&gt; is_kauf-par_obtyp = 'ORC'.&lt;BR /&gt; is_kauf-par_busobj = 'BUS2075'.&lt;BR /&gt; is_kauf-par_layou = 'MSAM'.&lt;BR /&gt; is_kauf-par_dbmod = 'U'.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DATA: afko TYPE afko,&lt;BR /&gt; afpo TYPE afpo.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'KAUF_ORDER_STORE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; i_afko = afko&lt;BR /&gt; i_afpo = afpo&lt;BR /&gt; * i_check = 'A'&lt;BR /&gt; i_coas = is_coas&lt;BR /&gt; * i_dialog = 'X'&lt;BR /&gt; i_kauf = is_kauf&lt;BR /&gt; * i_save_flag = 'X'&lt;BR /&gt; * I_AUC_DIALOG_OFF = ABAP_FALSE&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; error_message = 1&lt;BR /&gt; OTHERS = 2.&lt;BR /&gt; IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt; * Implement suitable error handling here&lt;BR /&gt; ENDIF.&lt;/P&gt;
  &lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089604#M1971659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-09-30T11:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089605#M1971660</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to pass I_SAVE_FLAG as 'X' to save the data. Also, try calling BAPI_TRANSACTION_COMMIT after the FM call.&lt;/P&gt;&lt;P&gt;P.S. : This is a 'Not Released' function module, not recommended to use. &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;GK&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089605#M1971660</guid>
      <dc:creator>GK817</dc:creator>
      <dc:date>2019-09-30T11:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089606#M1971661</link>
      <description>&lt;P&gt;Hello &lt;A href="https://answers.sap.com/users/833170/gelivisankar.html"&gt;Sankar Gelivi&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Kindly use &lt;STRONG&gt;BAPI_TRANSACTION_COMMIT &lt;/STRONG&gt;after your Successful FM Call. Below Code for reference.&lt;/P&gt;&lt;P&gt;*Commit On Success&lt;BR /&gt;
 CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 wait = 'X'.&lt;/P&gt;&lt;P&gt;Kindly note that it is not released in my version as shown below, Kindly check the same if it is released in your version.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1733460-scn.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:25:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089606#M1971661</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2019-09-30T11:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089607#M1971662</link>
      <description>&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;Can you share me the change FM or BAPI for internal order if you are aware. &lt;/P&gt;&lt;P&gt;As suggested, i have tried still it is not working.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sankar Gelivi&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 11:41:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089607#M1971662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-01T11:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089608#M1971663</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Did you try by passing i_save as X and then using commit work after that?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 13:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089608#M1971663</guid>
      <dc:creator>GK817</dc:creator>
      <dc:date>2019-10-01T13:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089609#M1971664</link>
      <description>&lt;P&gt;Unfortunately there is no BAPI or any kind of standard feature officially released for customer use in regards of internal order modification. I also don't recommend to use &lt;STRONG&gt;KAUF_ORDER_STORE &lt;/STRONG&gt;even if you are able to make it work, as input validation seems to be completely missing from its coding.&lt;/P&gt;&lt;P&gt;The best thing I've found so far for this kind of tasks is function module &lt;STRONG&gt;KAUF_ORDER_CHANGE_BAPIFIELDS&lt;/STRONG&gt; with is BAPI-like parameter list and behavior:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: order            TYPE aufk-aufnr,
      order_data       TYPE aufk,
      test             TYPE abap_bool,
      save_flag        TYPE abap_bool,
      fields_to_change TYPE STANDARD TABLE OF ddfldnam,
      messages         TYPE bapirettab.

order = 'TEST'.

" Provide new field values
order_data-ktext = 'This is a test'.

" Mark fields to be changed
fields_to_change = VALUE #( ( name = 'KTEXT' ) ).

" Set save flag
save_flag = boolc( test = abap_false ).

CALL FUNCTION 'KAUF_ORDER_CHANGE_BAPIFIELDS'
  EXPORTING
    i_order          = order
    i_aufk_new       = order_data
    i_flag_testrun   = test
    i_flag_save      = save_flag
  TABLES
    fields_to_change = fields_to_change
    return           = messages
  EXCEPTIONS
    OTHERS           = 1.

COMMIT WORK.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If any error occurs it will be returned in parameter RETURN.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 16:38:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089609#M1971664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-01T16:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089610#M1971665</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I suggest to use FM BAPI_INTERNALORDER_SAVEREPLICA. This FM is documented, and released for customer use&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 20:01:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089610#M1971665</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2019-10-02T20:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: KO02 - Internal Order Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089611#M1971666</link>
      <description>&lt;P&gt;Although it is indeed in released status this function is meant for use only in ALE scenarios where the assumption is that the data has already been validated on the sender side.&lt;/P&gt;&lt;P&gt;It does not contain authorization checks and only very limited input data checks restricted to one or two organization data fields, does not consider field selection from order type configuration, always deactivates budgeting related statuses (which is maybe not the intention) and if the order did not exist previously it gets created. &lt;/P&gt;&lt;P&gt;A lot more have to be done by the caller.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 07:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ko02-internal-order-change/m-p/12089611#M1971666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-03T07:45:38Z</dc:date>
    </item>
  </channel>
</rss>

