<?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 Using BAPI_SALESORDER_CHANGE , in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256562#M1528306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is for line item add reason for rejection and create a new line item with the remaining Qty.( becos changing the Plant)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plant is chnaging, reason for jejection is also ading,&lt;/P&gt;&lt;P&gt;a new line item is also adding&lt;/P&gt;&lt;P&gt;but for that qty is not adding .. i am not getting an yerror messages from BAPI&lt;/P&gt;&lt;P&gt; can you please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adding a new line itm ,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using BAPI_SALESORDER_CHANGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; xorder_items_in-itm_number = w_posnr.
      xorder_items_in-material = wa_final-matnr.
      xorder_items_in-plant = 'PT02'."wa_final-PLANT.
      xorder_items_in-target_qty = wa_final-kwmeng - wa_final-rfmng.
      xorder_items_in-target_qu = 'EA'.
      APPEND xorder_items_in.
*
      xorder_item_inx-itm_number = w_posnr.
      xorder_item_inx-material = 'X'.
      xorder_item_inx-plant = 'X'.
      xorder_item_inx-target_qty = 'X'.
      xorder_item_inx-target_qu = 'X'.
      xorder_item_inx-updateflag = 'I'.
      APPEND xorder_item_inx.

      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = w_vbeln
        order_header_in             = wa_head
        order_header_inx            = wa_headx

      TABLES
        return                      = t_return
       order_item_in               = xorder_items_in
       order_item_inx              = xorder_item_inx
              .
      IF sy-subrc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

        MOVE wa_final-vbeln TO wa-vbeln.
        MOVE w_posnr TO wa-posnr.
        wa-message = 'New LineItem Added Successfully'.
        APPEND wa TO it.
        CLEAR wa.

      ELSE.

        MOVE wa_final-vbeln TO wa-vbeln.
        MOVE w_posnr TO wa-posnr.
        LOOP AT t_return INTO wa_return
                         WHERE type EQ c_e.
          wa-message = wa_return-message.
          APPEND wa TO it.
          CLEAR wa.
        ENDLOOP.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Sep 4, 2010 9:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Sep 2010 04:19:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-04T04:19:11Z</dc:date>
    <item>
      <title>Using BAPI_SALESORDER_CHANGE ,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256562#M1528306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is for line item add reason for rejection and create a new line item with the remaining Qty.( becos changing the Plant)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plant is chnaging, reason for jejection is also ading,&lt;/P&gt;&lt;P&gt;a new line item is also adding&lt;/P&gt;&lt;P&gt;but for that qty is not adding .. i am not getting an yerror messages from BAPI&lt;/P&gt;&lt;P&gt; can you please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;adding a new line itm ,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using BAPI_SALESORDER_CHANGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; xorder_items_in-itm_number = w_posnr.
      xorder_items_in-material = wa_final-matnr.
      xorder_items_in-plant = 'PT02'."wa_final-PLANT.
      xorder_items_in-target_qty = wa_final-kwmeng - wa_final-rfmng.
      xorder_items_in-target_qu = 'EA'.
      APPEND xorder_items_in.
*
      xorder_item_inx-itm_number = w_posnr.
      xorder_item_inx-material = 'X'.
      xorder_item_inx-plant = 'X'.
      xorder_item_inx-target_qty = 'X'.
      xorder_item_inx-target_qu = 'X'.
      xorder_item_inx-updateflag = 'I'.
      APPEND xorder_item_inx.

      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = w_vbeln
        order_header_in             = wa_head
        order_header_inx            = wa_headx

      TABLES
        return                      = t_return
       order_item_in               = xorder_items_in
       order_item_inx              = xorder_item_inx
              .
      IF sy-subrc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

        MOVE wa_final-vbeln TO wa-vbeln.
        MOVE w_posnr TO wa-posnr.
        wa-message = 'New LineItem Added Successfully'.
        APPEND wa TO it.
        CLEAR wa.

      ELSE.

        MOVE wa_final-vbeln TO wa-vbeln.
        MOVE w_posnr TO wa-posnr.
        LOOP AT t_return INTO wa_return
                         WHERE type EQ c_e.
          wa-message = wa_return-message.
          APPEND wa TO it.
          CLEAR wa.
        ENDLOOP.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Sep 4, 2010 9:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 04:19:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256562#M1528306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-04T04:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using BAPI_SALESORDER_CHANGE ,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256563#M1528307</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;To Update the sales order quantity, You have to pass values to the structure "SCHEDULE_LINES" &amp;amp; "SCHEDULE_LINESX".&lt;/P&gt;&lt;P&gt;Edit : SDN thread [BAPI_SALESORDER_CHANGE |&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1653931"&gt;&lt;/A&gt;; may be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Kumar on Sep 4, 2010 10:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 04:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256563#M1528307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-04T04:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using BAPI_SALESORDER_CHANGE ,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256564#M1528308</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 also faced similar problem but it was while creating Sales Order using 'BAPI_SALESORDER_CREATEFROMDAT2'. You have to enter the quantity in BAPISDITM-TARGET_QTY then only system will update the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 07:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bapi-salesorder-change/m-p/7256564#M1528308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-04T07:08:33Z</dc:date>
    </item>
  </channel>
</rss>

