<?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: BAPI_SALESORDER_CHANGE Error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346503#M1540118</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;You have to provide the sales order number in BAPE_VBAK and BAPE_VBAKX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Oct 2010 15:09:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-15T15:09:39Z</dc:date>
    <item>
      <title>BAPI_SALESORDER_CHANGE Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346499#M1540114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to change a sales order using the BAPI_SALESORDER_CHANGE, but it gives the message: ORDER_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;VBAKKOM&lt;/P&gt;&lt;P&gt;No data was changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be wrong. See my code below. The BAPI had an extension, which also needs to update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: socond type standard table of bapicond with header line.
data socondx type standard table of bapicondx with header line.
data: header_inx type standard table of BAPISDH1X with header line.
data: return2 type bapiret2 occurs 0 with header line.
data: l_logic_switch type bapisdls occurs 0 with header line.

parameters: amt type vbak-netwr,
            ord type vbak-vbeln.

clear header_inx.
header_inx-updateflag = 'U'.
append header_inx.

clear l_logic_switch.
l_logic_switch-pricing = 'G'.
l_logic_switch-cond_handl = 'X'.
append l_logic_switch.

clear socondx.
socondx-cond_type = 'ZC07'.
socondx-updateflag = 'I'.
socondx-cond_value = 'X'.
socondx-currency = 'X'.
append socondx.

clear socond.
socond-cond_value = AMT.
socond-cond_type = 'ZC07'.
socond-currency = 'ZAR'.
append socond.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = ord
        IMPORTING
          OUTPUT = ord.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    SALESDOCUMENT               = ORD
*   ORDER_HEADER_IN             =
    ORDER_HEADER_INX            = header_inx
*   SIMULATION                  =
*   BEHAVE_WHEN_ERROR           = ' '
*   INT_NUMBER_ASSIGNMENT       = ' '
   LOGIC_SWITCH                = l_logic_switch
*   NO_STATUS_BUF_INIT          = ' '
  TABLES
    RETURN                      = return2
*   ORDER_ITEM_IN               =
*   ORDER_ITEM_INX              =
*   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               = socond
   CONDITIONS_INX              = socondx
   EXTENSIONIN                 =
          .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT = 'X'.

loop at return2.
  write:/ return2-message, return2-message_v1.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 08:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346499#M1540114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T08:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346500#M1540115</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;Try Passing Paramter  "&lt;STRONG&gt;ORDER_HEADER_IN&lt;/STRONG&gt; " along with   "&lt;STRONG&gt;ORDER_HEADER_INX&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;It will Update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Padma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 09:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346500#M1540115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T09:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346501#M1540116</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;If you have not passed to the extension, how the extension will get updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to pass to the table extension. Hope you have updated the new fields INTO BAPE_VBAK &amp;amp; VBAKKOZ etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try giving l_logic_switch-cond_handl = ' ' and check if updates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't, I don't have an immediate solution except asking you to debug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 09:40:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346501#M1540116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T09:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346502#M1540117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Padma, what value should I put in the order_header_in parameter since I am changing a Sales Document? The document is already there with the distribution channel, sales org etc, I do not need to change these, I only need to change the pricing and add the extension values only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay, Here are the values I am inserting in the extension, I have an append structure in VBAK for these. If I add the extension, it doesn't update saying enter document number, and if I don't add the extension, it updates (only the price, not the extension values), with l_logic_switch-cond_handl = ''. as you suggested. Here is a snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: socond type standard table of bapicond with header line.
data socondx type standard table of bapicondx with header line.
data: header_inx like BAPISDH1X.
data: order_header_in1 like BAPISDHD1.
data: return2 type bapiret2 occurs 0 with header line.
data: l_logic_switch like bapisdls." occurs 0 with header line.
data: t_bape_vbak    like standard table of bape_vbak
                          with header line,
      t_bape_vbakx   like standard table of bape_vbakx
                          with header line,
      t_extensionin  like standard table of bapiparex
                          with header line.

parameters: amt type vbak-netwr,
            ord type vbak-vbeln.

*CLEAR order_header_in1.
*order_header_in1-PRICE_DATE   =  sy-datum.
*order_header_in1-REQ_DATE_H   =  sy-datum.
*order_header_in1-DISTR_CHAN = '10'.
*order_header_in1-SALES_ORG = '1000'.

clear header_inx.
header_inx-updateflag = 'U'.
*append header_inx.

clear l_logic_switch.
l_logic_switch-pricing = ''.
l_logic_switch-cond_handl = 'X'.
*append l_logic_switch.

clear socondx.
socondx-cond_type = 'ZC07'.
socondx-updateflag = 'I'.
socondx-cond_value = 'X'.
socondx-currency = 'X'.
append socondx.

clear socond.
socond-cond_value = AMT.
socond-cond_type = 'ZC07'.
socond-currency = 'ZAR'.
append socond.
t_bape_vbak-ZZCST  = 21.
t_bape_vbak-ZZebf  = 5.
t_bape_vbak-ZZSAD  = 2.
t_bape_vbak-ZZNWW  = 5.
t_bape_vbak-zzrss  = 'C'.
t_bape_vbak-zztst  = 26.
t_bape_vbak-zzecf  = 2.
append t_bape_vbak.

t_bape_vbakx-ZZCST  = 'X'.
t_bape_vbakx-ZZTST  = 'X'.
t_bape_vbakx-ZZSAD  = 'X'.
t_bape_vbakx-ZZNWW  = 'X'.
t_bape_vbakx-zzecf  = 'X'.
t_bape_vbakx-ZZebf  = 'X'.
t_bape_vbakx-zzrss  = 'X'.
append t_bape_vbakx.

Loop at t_bape_vbak.
  t_extensionin-structure = 'BAPE_VBAK'.
  t_extensionin-valuepart1 = t_bape_vbak.
  append t_extensionin.
Endloop.

Loop at t_bape_vbakx.
  t_extensionin-structure = 'BAPE_VBAKX'.
  t_extensionin-valuepart1 = t_bape_vbakx.
  append t_extensionin.
Endloop.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT  = ord
  IMPORTING
    OUTPUT = ord.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    SALESDOCUMENT               = ORD
*   ORDER_HEADER_IN             =
    ORDER_HEADER_INX            = header_inx
*   SIMULATION                  =
*   BEHAVE_WHEN_ERROR           = ' '
*   INT_NUMBER_ASSIGNMENT       = ' '
   LOGIC_SWITCH                = l_logic_switch
*   NO_STATUS_BUF_INIT          = ' '
  TABLES
    RETURN                      = return2
*   ORDER_ITEM_IN               =
*   ORDER_ITEM_INX              =
*   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               = socond
   CONDITIONS_INX              = socondx
   EXTENSIONIN                 = t_extensionin
          .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT = 'X'.

loop at return2.
  write:/ return2-message, return2-message_v1.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 14:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346502#M1540117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T14:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_SALESORDER_CHANGE Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346503#M1540118</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;You have to provide the sales order number in BAPE_VBAK and BAPE_VBAKX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Oct 2010 15:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-salesorder-change-error/m-p/7346503#M1540118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T15:09:39Z</dc:date>
    </item>
  </channel>
</rss>

