<?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 BAPI_SALESORDER_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859486#M363001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i am using the following code for BAPI to change the SO but this is not working&lt;/P&gt;&lt;P&gt;i want to change the Reason of Rejection field in the SO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the return messages shows the SO is changed but its not doing that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.

DATA wa LIKE bapisdh1x.
DATA i_item LIKE bapisditm OCCURS 0 WITH HEADER LINE.
DATA i_item_x LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA i_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

BREAK-POINT.
wa-updateflag = 'U'.

i_item-itm_number = '000030'.
i_item-reason_rej = 'A5'.
APPEND i_item.


i_item_x-itm_number = '000030'.
i_item_x-updateflag = 'U'.
i_item_x-reason_rej = 'X'.
APPEND i_item_x.

*
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument               = '0205000665'
*   ORDER_HEADER_IN             =
    order_header_inx            = wa
*   SIMULATION                  =
*   BEHAVE_WHEN_ERROR           = ' '
*   INT_NUMBER_ASSIGNMENT       = ' '
*   LOGIC_SWITCH                =
  TABLES
    return                      = i_return
   order_item_in               = i_item
   order_item_inx              = i_item_x
*   PARTNERS                    =
*   PARTNERCHANGES              =
*   PARTNERADDRESSES            =
*   ORDER_CFGS_REF              =
*   ORDER_CFGS_INST             =
*   ORDER_CFGS_PART_OF          =
*   ORDER_CFGS_VALUE            =
*   ORDER_CFGS_BLOB             =
*   ORDER_CFGS_VK               =
*   ORDER_CFGS_REFINST          =
*   SCHEDULE_LINES              =
*   SCHEDULE_LINESX             =
*   ORDER_TEXT                  =
*   ORDER_KEYS                  =
*   CONDITIONS_IN               =
*   CONDITIONS_INX              =
*   EXTENSIONIN                 =
          .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*           EXPORTING
*             WAIT          =
*           IMPORTING
*             RETURN        =
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abhishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Abhishek Suppal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2007 06:03:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-12T06:03:04Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859486#M363001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i am using the following code for BAPI to change the SO but this is not working&lt;/P&gt;&lt;P&gt;i want to change the Reason of Rejection field in the SO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the return messages shows the SO is changed but its not doing that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zbapi NO STANDARD PAGE HEADING LINE-SIZE 255.

DATA wa LIKE bapisdh1x.
DATA i_item LIKE bapisditm OCCURS 0 WITH HEADER LINE.
DATA i_item_x LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA i_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

BREAK-POINT.
wa-updateflag = 'U'.

i_item-itm_number = '000030'.
i_item-reason_rej = 'A5'.
APPEND i_item.


i_item_x-itm_number = '000030'.
i_item_x-updateflag = 'U'.
i_item_x-reason_rej = 'X'.
APPEND i_item_x.

*
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument               = '0205000665'
*   ORDER_HEADER_IN             =
    order_header_inx            = wa
*   SIMULATION                  =
*   BEHAVE_WHEN_ERROR           = ' '
*   INT_NUMBER_ASSIGNMENT       = ' '
*   LOGIC_SWITCH                =
  TABLES
    return                      = i_return
   order_item_in               = i_item
   order_item_inx              = i_item_x
*   PARTNERS                    =
*   PARTNERCHANGES              =
*   PARTNERADDRESSES            =
*   ORDER_CFGS_REF              =
*   ORDER_CFGS_INST             =
*   ORDER_CFGS_PART_OF          =
*   ORDER_CFGS_VALUE            =
*   ORDER_CFGS_BLOB             =
*   ORDER_CFGS_VK               =
*   ORDER_CFGS_REFINST          =
*   SCHEDULE_LINES              =
*   SCHEDULE_LINESX             =
*   ORDER_TEXT                  =
*   ORDER_KEYS                  =
*   CONDITIONS_IN               =
*   CONDITIONS_INX              =
*   EXTENSIONIN                 =
          .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*           EXPORTING
*             WAIT          =
*           IMPORTING
*             RETURN        =
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abhishek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Abhishek Suppal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 06:03:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859486#M363001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T06:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859487#M363002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of giving the SO number in a string, store it in a variable and try passing it to the FM.&lt;/P&gt;&lt;P&gt;Is there any preceding zeroes in the SO number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 06:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859487#M363002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T06:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859488#M363003</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;Your code looks good..Try add one zero in front of the order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    salesdocument               = '&amp;lt;b&amp;gt;0205000665&amp;lt;/b&amp;gt;'&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 06:07:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859488#M363003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T06:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859489#M363004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting any error message in the return table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Govind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 06:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change/m-p/1859489#M363004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T06:09:22Z</dc:date>
    </item>
  </channel>
</rss>

