<?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: Function Module BAPI_SALESORDER_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302165#M1391280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CHANGE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    salesdocument     = p_vbeln&lt;/P&gt;&lt;P&gt;    order_header_in   = s_order_header_in&lt;/P&gt;&lt;P&gt;    order_header_inx  = s_order_header_inx&lt;/P&gt;&lt;P&gt;    behave_when_error = 'P'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return            = it_return&lt;/P&gt;&lt;P&gt;    order_item_in     = i_order_item_in&lt;/P&gt;&lt;P&gt;    order_item_inx    = i_order_item_inx&lt;/P&gt;&lt;P&gt;    schedule_lines    = i_sched&lt;/P&gt;&lt;P&gt;    schedule_linesx   = i_schedx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    wait = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_return.&lt;/P&gt;&lt;P&gt;  WRITE / it_return-message.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2009 05:46:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-27T05:46:56Z</dc:date>
    <item>
      <title>Function Module BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302163#M1391278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used function BAPI_SALESORDER_CHANGE to change the values of Item-level Billing block and Schedule line deleivery block in 'VA02' . Even though , I get the RETURN parameters as successful, the required values are not getting changed. What possibly could be the reason. Iam pasting the code, please correct me...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: vbak, vbap, vbep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: soheader like bapisdh1,&lt;/P&gt;&lt;P&gt;      soheaderx like bapisdh1x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_item type table of bapisditm,&lt;/P&gt;&lt;P&gt;      wa_item like line of it_item.&lt;/P&gt;&lt;P&gt;data: it_itemx type table of bapisditmx,&lt;/P&gt;&lt;P&gt;      wa_itemx like line of it_itemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_schedule type table of bapischdl,&lt;/P&gt;&lt;P&gt;      wa_schedule like line of it_schedule.&lt;/P&gt;&lt;P&gt;data: it_schedulex type table of bapischdlx,&lt;/P&gt;&lt;P&gt;      wa_schedulex like line of it_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: it_return type table of bapiret2,&lt;/P&gt;&lt;P&gt;       wa_return like line of it_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_vbap type table of vbap,&lt;/P&gt;&lt;P&gt;      wa_vbap like line of it_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_vbep type table of vbep,&lt;/P&gt;&lt;P&gt;      wa_vbep like line of it_vbep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: zreturn like bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: salesdoc for vbak-VBELN no intervals no-extension obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbap into table it_vbap where vbeln eq salesdoc-low and faksp eq '69'. "Some XYZ Block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_vbap[] is not initial.&lt;/P&gt;&lt;P&gt;select * from vbep into table it_vbep for all entries in it_vbap where vbeln eq salesdoc-low and posnr eq it_vbap-posnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_vbap into wa_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itemx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_item-itm_number = wa_vbap-posnr.&lt;/P&gt;&lt;P&gt;wa_itemx-itm_number = wa_vbap-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_item-material = wa_vbap-matnr.&lt;/P&gt;&lt;P&gt;wa_itemx-material = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_item-bill_block = '  '.&lt;/P&gt;&lt;P&gt;wa_itemx-bill_block = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_item to it_item.&lt;/P&gt;&lt;P&gt;append wa_itemx to it_itemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_vbep into wa_vbep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_schedulex-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_schedule-itm_number = wa_vbep-posnr.&lt;/P&gt;&lt;P&gt;wa_schedulex-itm_number = wa_vbep-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_schedule-sched_line = wa_vbep-etenr.&lt;/P&gt;&lt;P&gt;wa_schedulex-sched_line = wa_vbep-etenr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_schedule-req_dlv_bl = '  '.&lt;/P&gt;&lt;P&gt;wa_schedulex-req_dlv_bl = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_schedule to it_schedule.&lt;/P&gt;&lt;P&gt;append wa_schedulex to it_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soheaderx-updateflag = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CHANGE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    SALESDOCUMENT               = salesdoc-low&lt;/P&gt;&lt;P&gt;    ORDER_HEADER_IN             = soheader&lt;/P&gt;&lt;P&gt;    ORDER_HEADER_INX            = soheaderx&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SIMULATION                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BEHAVE_WHEN_ERROR           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INT_NUMBER_ASSIGNMENT       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LOGIC_SWITCH                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    RETURN                      = it_return&lt;/P&gt;&lt;P&gt;   ORDER_ITEM_IN               = it_item&lt;/P&gt;&lt;P&gt;   ORDER_ITEM_INX              = it_itemx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARTNERS                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARTNERCHANGES              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PARTNERADDRESSES            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_REF              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_INST             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_PART_OF          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_VALUE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_BLOB             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_VK               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_CFGS_REFINST          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   SCHEDULE_LINES              = it_schedule&lt;/P&gt;&lt;P&gt;   SCHEDULE_LINESX             = it_schedulex&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_TEXT                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ORDER_KEYS                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONDITIONS_IN               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONDITIONS_INX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSIONIN                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shivaa...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 21:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302163#M1391278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T21:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302164#M1391279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of using the bapi to comitt work, just do a...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
COMMIT WORK AND WAIT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 21:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302164#M1391279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T21:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302165#M1391280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CHANGE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    salesdocument     = p_vbeln&lt;/P&gt;&lt;P&gt;    order_header_in   = s_order_header_in&lt;/P&gt;&lt;P&gt;    order_header_inx  = s_order_header_inx&lt;/P&gt;&lt;P&gt;    behave_when_error = 'P'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return            = it_return&lt;/P&gt;&lt;P&gt;    order_item_in     = i_order_item_in&lt;/P&gt;&lt;P&gt;    order_item_inx    = i_order_item_inx&lt;/P&gt;&lt;P&gt;    schedule_lines    = i_sched&lt;/P&gt;&lt;P&gt;    schedule_linesx   = i_schedx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    wait = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_return.&lt;/P&gt;&lt;P&gt;  WRITE / it_return-message.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 05:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-bapi-salesorder-change/m-p/6302165#M1391280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-27T05:46:56Z</dc:date>
    </item>
  </channel>
</rss>

