<?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: Problem while updating Item category using Bapi_salesorder_change in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200884#M1521217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Continue...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
**  Fill schedule lines
  i_sched-itm_number = itab_ch-itm_number .
  i_sched-sched_line = '0001'.
  i_sched-req_qty    = itab_ch-target_qty.
  APPEND i_sched.

*   Fill schedule line flags
  i_schedx-itm_number  = itab_ch-itm_number .
  i_schedx-sched_line = '0001'.
  i_schedx-updateflag  = 'I'.
  i_schedx-req_qty     = 'X'.
  APPEND i_schedx.
ENDLOOP.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument     = p_vbeln
    order_header_in   = s_order_header_in
    order_header_inx  = s_order_header_inx
    behave_when_error = 'P'
  TABLES
    return            = it_return
    order_item_in     = i_order_item_in
    order_item_inx    = i_order_item_inx
    schedule_lines    = i_sched
    schedule_linesx   = i_schedx.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Aug 2010 10:31:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-09T10:31:49Z</dc:date>
    <item>
      <title>Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200879#M1521212</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;Iam facing a probelm while updating item category using bapi Bapi_salesorder_change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Return table iam getting the folowing mesages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inforation mesage : Field 'PSTYV' cannot be changed, VBAPKOM 000010  ready for input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Message : Item 000010 cannot be processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CLEAR wa_bapisdh1x.
  wa_bapisdh1x-updateflag = 'U'.

  CLEAR wa_order_item_inx.
  wa_order_item_inx-itm_number = wa_vbap-posnr.
  wa_order_item_inx-item_categ = 'X'.
  wa_order_item_inx-UPDATEFLAG = 'U'.
  APPEND  wa_order_item_inx TO it_order_item_inx.
  CLEAR wa_order_item_inx.

  CLEAR wa_order_item_in.
  wa_order_item_in-itm_number = wa_vbap-posnr.
  wa_order_item_in-item_categ = 'ABC'.
  APPEND wa_order_item_in TO it_order_item_in.
  CLEAR wa_order_item_in.

 CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument    = w_vbeln
      order_header_inx = wa_bapisdh1x
    TABLES
      return           = it_return
      order_item_in    = it_order_item_in
      order_item_inx   = it_order_item_inx


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i correct it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 19:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200879#M1521212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-05T19:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200880#M1521213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Item category should be determined automatically from configuration. It cannot be changed after the item has been created. Check with your SD consultant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 20:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200880#M1521213</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2010-08-05T20:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200881#M1521214</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;Iam able to change it manually in the VA02 transaction.. But when i Run the program iam unable to change it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct it..? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 13:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200881#M1521214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-06T13:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200882#M1521215</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;Item category of line item cannot be changed if any subsequent documents are created against that line item.  Check document flow of the document or table VBFA for the Sales order/Line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Aug 2010 04:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200882#M1521215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-07T04:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200883#M1521216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
s_order_header_inx-updateflag = 'U'.
 i_order_item_in-itm_number = itab_ch-itm_number .
  i_order_item_in-material =   itab_ch-material.
  i_order_item_in-target_qty = itab_ch-target_qty.
  i_order_item_in-sales_unit = itab_ch-sales_unit.
  i_order_item_in-val_type = itab_ch-val_type.

  i_order_item_inx-updateflag = 'I'.

  i_order_item_inx-itm_number = itab_ch-itm_number .
  i_order_item_inx-material = itab_ch-material.
  i_order_item_inx-target_qty = 'X'.
  i_order_item_inx-sales_unit = itab_ch-sales_unit.
  i_order_item_inx-val_type =  'X'.

  APPEND: i_order_item_in, i_order_item_inx.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kk.adhvaryu on Aug 9, 2010 12:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 10:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200883#M1521216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T10:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200884#M1521217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Continue...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
**  Fill schedule lines
  i_sched-itm_number = itab_ch-itm_number .
  i_sched-sched_line = '0001'.
  i_sched-req_qty    = itab_ch-target_qty.
  APPEND i_sched.

*   Fill schedule line flags
  i_schedx-itm_number  = itab_ch-itm_number .
  i_schedx-sched_line = '0001'.
  i_schedx-updateflag  = 'I'.
  i_schedx-req_qty     = 'X'.
  APPEND i_schedx.
ENDLOOP.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument     = p_vbeln
    order_header_in   = s_order_header_in
    order_header_inx  = s_order_header_inx
    behave_when_error = 'P'
  TABLES
    return            = it_return
    order_item_in     = i_order_item_in
    order_item_inx    = i_order_item_inx
    schedule_lines    = i_sched
    schedule_linesx   = i_schedx.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 10:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200884#M1521217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-09T10:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while updating Item category using Bapi_salesorder_change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200885#M1521218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually iam facing a strange problem here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i copy the program into another sample program and execute it iam able to change both the item catgegory and delivery block for particular sales order and item number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in my main program i have BDC for MB1B transaction to create the material document.&lt;/P&gt;&lt;P&gt;Once the material document is created succesfully iam using BAPI Sales_order_change to change the item category and delivery block..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my main program iam not to change the item catgeory getting an error field PSTYV cannot be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the same code is running percfectly in the copied one..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i correct that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-item-category-using-bapi-salesorder-change/m-p/7200885#M1521218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T12:38:53Z</dc:date>
    </item>
  </channel>
</rss>

