<?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 Process order component Change in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-component-change/m-p/712095#M32884</link>
    <description>&lt;P&gt;Hi Expert Please help me,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;We are try to change Process order Quantity through upload File.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;But First Line of Component Quantity are change but remaining are not change. code Like below.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;here i_up_comp is internal table have multiple component ....&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;lOOP AT i_up_comp INTO w_up_comp.&lt;BR /&gt;&lt;BR /&gt;is_order_key = w_up_comp-ponumber."'010000037413'. """" req. data&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM resb INTO wa_resb&lt;BR /&gt; WHERE aufnr EQ is_order_key&lt;BR /&gt; AND rsnum EQ w_up_comp-res_no&lt;BR /&gt; AND rspos EQ w_up_comp-res_item&lt;BR /&gt; AND charg EQ w_up_comp-batchno.&lt;BR /&gt; * AND bwart EQ '261'&lt;BR /&gt; * AND charg &amp;lt;&amp;gt; ''.&lt;BR /&gt; &lt;BR /&gt; MOVE-CORRESPONDING wa_resb TO is_order_component_key.&lt;BR /&gt; &lt;BR /&gt; qty = w_up_comp-derivedweight.&lt;BR /&gt; is_requirement_quantity-quantity = qty."w_up_comp-derivedweight. "'10.23'. """" req. data&lt;BR /&gt; is_requirement_quantity-uom = wa_resb-meins. "'KG'.&lt;BR /&gt; is_requirement_quantityx-quantity = 'X'.&lt;BR /&gt; is_requirement_quantityx-uom = 'X'.&lt;BR /&gt; &lt;BR /&gt; i_material = w_up_comp-itemcode."wa_resb-matnr. """" REQ.DATA&lt;BR /&gt; i_materialx = 'X'.&lt;BR /&gt; &lt;BR /&gt; is_storage_location-werks = w_up_comp-plant."wa_resb-werks. """" req. data&lt;BR /&gt; is_storage_locationx-werks = 'X'.&lt;BR /&gt; is_storage_location-lgort = w_up_comp-storageloc."'SF01'. """" req. data&lt;BR /&gt; is_storage_locationx-lgort = 'X'.&lt;BR /&gt; &lt;BR /&gt; i_batch = wa_resb-charg.&lt;BR /&gt; i_batchx = 'X'.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM afpo&lt;BR /&gt; WHERE aufnr = is_order_key.&lt;BR /&gt; &lt;BR /&gt; i_mi_configuration_object = afpo-cuobj.&lt;BR /&gt; i_mi_configuration_objectx = 'X'.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'CO_XT_COMPONENT_CHANGE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; is_order_key = is_order_key&lt;BR /&gt; is_order_component_key = is_order_component_key&lt;BR /&gt; is_requirement_quantity = is_requirement_quantity&lt;BR /&gt; is_requirement_quantityx = is_requirement_quantityx&lt;BR /&gt; is_confirmed_quantity = is_confirmed_quantity&lt;BR /&gt; is_confirmed_quantityx = is_confirmed_quantityx&lt;BR /&gt; i_material = i_material&lt;BR /&gt; i_materialx = i_materialx&lt;BR /&gt; * IS_ORDER_OPERATION_KEY = IS_ORDER_OPERATION_KEY&lt;BR /&gt; * IS_ORDER_OPERATION_KEYX = IS_ORDER_OPERATION_KEYX&lt;BR /&gt; * IS_REQUIREMENT_DATE = IS_REQUIREMENT_DATE&lt;BR /&gt; * IS_REQUIREMENT_DATEX = IS_REQUIREMENT_DATEX&lt;BR /&gt; is_storage_location = is_storage_location&lt;BR /&gt; is_storage_locationx = is_storage_locationx&lt;BR /&gt; i_batch = i_batch&lt;BR /&gt; i_batchx = i_batchx&lt;BR /&gt; i_mi_configuration_object = i_mi_configuration_object&lt;BR /&gt; i_mi_configuration_objectx = i_mi_configuration_objectx&lt;BR /&gt; * I_BATCH_SEL_CUOBJ = I_BATCH_SEL_CUOBJ&lt;BR /&gt; * I_BATCH_SEL_CUOBJX = I_BATCH_SEL_CUOBJX&lt;BR /&gt; * I_XFEHL = I_XFEHL&lt;BR /&gt; * I_XFEHLX = I_XFEHLX&lt;BR /&gt; * I_SOBKZ = I_SOBKZ&lt;BR /&gt; * I_SOBKZX = I_SOBKZX&lt;BR /&gt; * I_KDAUF = I_KDAUF&lt;BR /&gt; * I_KDAUFX = I_KDAUFX&lt;BR /&gt; * I_KDPOS = I_KDPOS&lt;BR /&gt; * I_KDPOSX = I_KDPOSX&lt;BR /&gt; * I_PSPEL = I_PSPEL&lt;BR /&gt; * I_PSPELX = I_PSPELX&lt;BR /&gt; * I_KZAUS = I_KZAUS&lt;BR /&gt; * I_KZAUSX = I_KZAUSX&lt;BR /&gt; * I_NAFKZ = I_NAFKZ&lt;BR /&gt; * I_NAFKZX = I_NAFKZX&lt;BR /&gt; * I_NOMAT = I_NOMAT&lt;BR /&gt; * I_NOMATX = I_NOMATX&lt;BR /&gt; * I_NFUML = I_NFUML&lt;BR /&gt; * I_NFUMLX = I_NFUMLX&lt;BR /&gt; * I_NFPKZ = I_NFPKZ&lt;BR /&gt; * I_NFPKZX = I_NFPKZX&lt;BR /&gt; * I_NOMNG = I_NOMNG&lt;BR /&gt; * I_NOMNGX = I_NOMNGX&lt;BR /&gt; IMPORTING&lt;BR /&gt; es_bapireturn = es_bapireturn "initial&lt;BR /&gt; e_error_occurred = e_error_occurred. "blank not showing 'X'.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; IF es_bapireturn-message IS INITIAL.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'.&lt;BR /&gt; &lt;BR /&gt; COMMIT WORK AND WAIT.&lt;BR /&gt; &lt;BR /&gt;endloop.&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; &lt;/P&gt;
  &lt;P&gt;pradip patel&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 07 Aug 2018 10:23:12 GMT</pubDate>
    <dc:creator>former_member484431</dc:creator>
    <dc:date>2018-08-07T10:23:12Z</dc:date>
    <item>
      <title>Process order component Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-component-change/m-p/712095#M32884</link>
      <description>&lt;P&gt;Hi Expert Please help me,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;We are try to change Process order Quantity through upload File.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;But First Line of Component Quantity are change but remaining are not change. code Like below.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;here i_up_comp is internal table have multiple component ....&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;lOOP AT i_up_comp INTO w_up_comp.&lt;BR /&gt;&lt;BR /&gt;is_order_key = w_up_comp-ponumber."'010000037413'. """" req. data&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM resb INTO wa_resb&lt;BR /&gt; WHERE aufnr EQ is_order_key&lt;BR /&gt; AND rsnum EQ w_up_comp-res_no&lt;BR /&gt; AND rspos EQ w_up_comp-res_item&lt;BR /&gt; AND charg EQ w_up_comp-batchno.&lt;BR /&gt; * AND bwart EQ '261'&lt;BR /&gt; * AND charg &amp;lt;&amp;gt; ''.&lt;BR /&gt; &lt;BR /&gt; MOVE-CORRESPONDING wa_resb TO is_order_component_key.&lt;BR /&gt; &lt;BR /&gt; qty = w_up_comp-derivedweight.&lt;BR /&gt; is_requirement_quantity-quantity = qty."w_up_comp-derivedweight. "'10.23'. """" req. data&lt;BR /&gt; is_requirement_quantity-uom = wa_resb-meins. "'KG'.&lt;BR /&gt; is_requirement_quantityx-quantity = 'X'.&lt;BR /&gt; is_requirement_quantityx-uom = 'X'.&lt;BR /&gt; &lt;BR /&gt; i_material = w_up_comp-itemcode."wa_resb-matnr. """" REQ.DATA&lt;BR /&gt; i_materialx = 'X'.&lt;BR /&gt; &lt;BR /&gt; is_storage_location-werks = w_up_comp-plant."wa_resb-werks. """" req. data&lt;BR /&gt; is_storage_locationx-werks = 'X'.&lt;BR /&gt; is_storage_location-lgort = w_up_comp-storageloc."'SF01'. """" req. data&lt;BR /&gt; is_storage_locationx-lgort = 'X'.&lt;BR /&gt; &lt;BR /&gt; i_batch = wa_resb-charg.&lt;BR /&gt; i_batchx = 'X'.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM afpo&lt;BR /&gt; WHERE aufnr = is_order_key.&lt;BR /&gt; &lt;BR /&gt; i_mi_configuration_object = afpo-cuobj.&lt;BR /&gt; i_mi_configuration_objectx = 'X'.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'CO_XT_COMPONENT_CHANGE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; is_order_key = is_order_key&lt;BR /&gt; is_order_component_key = is_order_component_key&lt;BR /&gt; is_requirement_quantity = is_requirement_quantity&lt;BR /&gt; is_requirement_quantityx = is_requirement_quantityx&lt;BR /&gt; is_confirmed_quantity = is_confirmed_quantity&lt;BR /&gt; is_confirmed_quantityx = is_confirmed_quantityx&lt;BR /&gt; i_material = i_material&lt;BR /&gt; i_materialx = i_materialx&lt;BR /&gt; * IS_ORDER_OPERATION_KEY = IS_ORDER_OPERATION_KEY&lt;BR /&gt; * IS_ORDER_OPERATION_KEYX = IS_ORDER_OPERATION_KEYX&lt;BR /&gt; * IS_REQUIREMENT_DATE = IS_REQUIREMENT_DATE&lt;BR /&gt; * IS_REQUIREMENT_DATEX = IS_REQUIREMENT_DATEX&lt;BR /&gt; is_storage_location = is_storage_location&lt;BR /&gt; is_storage_locationx = is_storage_locationx&lt;BR /&gt; i_batch = i_batch&lt;BR /&gt; i_batchx = i_batchx&lt;BR /&gt; i_mi_configuration_object = i_mi_configuration_object&lt;BR /&gt; i_mi_configuration_objectx = i_mi_configuration_objectx&lt;BR /&gt; * I_BATCH_SEL_CUOBJ = I_BATCH_SEL_CUOBJ&lt;BR /&gt; * I_BATCH_SEL_CUOBJX = I_BATCH_SEL_CUOBJX&lt;BR /&gt; * I_XFEHL = I_XFEHL&lt;BR /&gt; * I_XFEHLX = I_XFEHLX&lt;BR /&gt; * I_SOBKZ = I_SOBKZ&lt;BR /&gt; * I_SOBKZX = I_SOBKZX&lt;BR /&gt; * I_KDAUF = I_KDAUF&lt;BR /&gt; * I_KDAUFX = I_KDAUFX&lt;BR /&gt; * I_KDPOS = I_KDPOS&lt;BR /&gt; * I_KDPOSX = I_KDPOSX&lt;BR /&gt; * I_PSPEL = I_PSPEL&lt;BR /&gt; * I_PSPELX = I_PSPELX&lt;BR /&gt; * I_KZAUS = I_KZAUS&lt;BR /&gt; * I_KZAUSX = I_KZAUSX&lt;BR /&gt; * I_NAFKZ = I_NAFKZ&lt;BR /&gt; * I_NAFKZX = I_NAFKZX&lt;BR /&gt; * I_NOMAT = I_NOMAT&lt;BR /&gt; * I_NOMATX = I_NOMATX&lt;BR /&gt; * I_NFUML = I_NFUML&lt;BR /&gt; * I_NFUMLX = I_NFUMLX&lt;BR /&gt; * I_NFPKZ = I_NFPKZ&lt;BR /&gt; * I_NFPKZX = I_NFPKZX&lt;BR /&gt; * I_NOMNG = I_NOMNG&lt;BR /&gt; * I_NOMNGX = I_NOMNGX&lt;BR /&gt; IMPORTING&lt;BR /&gt; es_bapireturn = es_bapireturn "initial&lt;BR /&gt; e_error_occurred = e_error_occurred. "blank not showing 'X'.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; IF es_bapireturn-message IS INITIAL.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'.&lt;BR /&gt; &lt;BR /&gt; COMMIT WORK AND WAIT.&lt;BR /&gt; &lt;BR /&gt;endloop.&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; &lt;/P&gt;
  &lt;P&gt;pradip patel&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 10:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-component-change/m-p/712095#M32884</guid>
      <dc:creator>former_member484431</dc:creator>
      <dc:date>2018-08-07T10:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Process order component Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-component-change/m-p/712096#M32885</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Because you use the functional module &lt;STRONG&gt;'&lt;/STRONG&gt;&lt;STRONG&gt;CO_XT_ORDER_PREPARE_COMMIT' &lt;/STRONG&gt;in your loop.&lt;/P&gt;&lt;P&gt;You should use this when you're done the updating of RESB table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:   ls_return         TYPE bapiret2,
        lv_order_number   TYPE bapi_order_key-order_number,
        lt_return         TYPE STANDARD TABLE OF bapiret.

FIELD-SYMBOLS: &amp;lt;ft_resb_bt&amp;gt; TYPE ANY TABLE.

LOOP AT &amp;lt;your_orders&amp;gt; ASSIGNING ... .

SELECT * FROM resb INTO TABLE @DATA(lt_resb) WHERE ....
 
LOOP AT lt_resb  ASSIGNING ... .
   use here the FM 'CO_XT_COMPONENT_CHANGE' for the necessary material 
ENDLOOP.

ASSIGN ('(SAPLCOBC)RESB_BT[]') TO &amp;lt;ft_resb_bt&amp;gt;.

IF  syst-subrc EQ 0 AND &amp;lt;ft_resb_bt&amp;gt; IS NOT INITIAL.
  MODIFY resb FROM TABLE &amp;lt;ft_resb_bt&amp;gt;.
ENDIF.

****************************************************************
*    FM CO_XT_ORDER_PREPARE_COMMIT clear (SAPLCOBC)RESB_BT[]   *
****************************************************************
        IF ls_return IS INITIAL.
            CALL FUNCTION 'CO_XT_ORDER_PREPARE_COMMIT'
              IMPORTING
                e_order_key      = lv_order_number
                es_bapireturn    = ls_return
                e_error_occurred = e_error_occurred
              TABLES
                et_bapireturn    = lt_return.
            COMMIT WORK.
          ENDIF.


ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2019 08:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-order-component-change/m-p/712096#M32885</guid>
      <dc:creator>culturied</dc:creator>
      <dc:date>2019-12-19T08:01:39Z</dc:date>
    </item>
  </channel>
</rss>

