<?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: CALL FUNCTION 'BAPI_PO_CHANGE' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972380#M1339503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you have item data in some txt file, use upload function module and convert the data to internal table then process the bapi..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2009 12:56:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-19T12:56:43Z</dc:date>
    <item>
      <title>CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972379#M1339502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have to update purchase orders by using BAPI_PO_CHANGE........can anyone tell how do i come to know the fields present in poitem and poitemx gets populated in zprogram?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_PO_CHANGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      purchaseorder = purchaseorder&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      return        = return&lt;/P&gt;&lt;P&gt;      poitem        = i_item&lt;/P&gt;&lt;P&gt;      poitemx       = i_itemx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 12:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972379#M1339502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-19T12:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972380#M1339503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you have item data in some txt file, use upload function module and convert the data to internal table then process the bapi..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 12:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972380#M1339503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-19T12:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972381#M1339504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question not clear..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 16:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972381#M1339504</guid>
      <dc:creator>alex_m</dc:creator>
      <dc:date>2009-08-19T16:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972382#M1339505</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 must flag the fields you want to change. Check this example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: ls_poheader  TYPE bapimepoheader,
      ls_poheaderx TYPE bapimepoheaderx,
      lt_bapiret   TYPE TABLE OF bapiret2.
DATA: lv_ebeln TYPE ebeln.

lv_ebeln = input-ebeln.

CLEAR: ls_poheader, ls_poheaderx.
ls_poheader-ref_1 = input-mt_transf_fcc_entreposto-rota_basis.
ls_poheaderx-ref_1 = 'X'.
ls_poheader-our_ref = input-mt_transf_fcc_entreposto-doc_fcc.
ls_poheaderx-our_ref = 'X'.
ls_poheader-sales_pers = input-mt_transf_fcc_entreposto-doc_basis.
ls_poheaderx-sales_pers = 'X'.

REFRESH: lt_bapiret.
CALL FUNCTION 'BAPI_PO_CHANGE'
  EXPORTING
    purchaseorder = lv_ebeln
    poheader      = ls_poheader
    poheaderx     = ls_poheaderx
  TABLES
    return        = lt_bapiret.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;PO_ITEMS and PO_ITEMSX both work same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 17:13:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972382#M1339505</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2009-08-19T17:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972383#M1339506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Valter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanx for example.....but can you please explain the significance of " input-mt_transf_fcc_entreposto-rota_basis" which is not declared in the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing please tell me where i am going wrong......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: purchaseorder LIKE bapimepoheader-po_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_item  TYPE TABLE OF bapimepoitem,&lt;/P&gt;&lt;P&gt;      ls_item TYPE bapimepoitem,&lt;/P&gt;&lt;P&gt;      i_itemx TYPE TABLE OF bapimepoitemx,&lt;/P&gt;&lt;P&gt;      ls_itemx TYPE bapimepoitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM select_orders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'BAPI_PO_CHANGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        purchaseorder                = purchaseorder&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;         poitem                       = i_item&lt;/P&gt;&lt;P&gt;         poitemx                      = i_itemx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM select_orders .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_ekpo INTO ls_ekpo.&lt;/P&gt;&lt;P&gt;    purchaseorder = ls_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;    ls_item-po_item  = ls_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;    ls_itemx-po_item            = ls_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;    ls_itemx-po_itemx           = 'X'.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SELECT_ORDERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitin2009 on Aug 20, 2009 6:12 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 04:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972383#M1339506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T04:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'BAPI_PO_CHANGE'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972384#M1339507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field input-mt_transf_fcc_entreposto-rota_basis and the other two fields are just char fields. I posted it as an example. Those fields must match the type of the ones of the bapi header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your code I suspect that you want to change the item number? I think you cannot change the po_item. As an example for changing the item text field, see this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT gt_ekpo INTO ls_ekpo.
purchaseorder = ls_ekpo-ebeln.
ls_item-po_item = ls_ekpo-ebelp.
ls_item-SHORT_TEXT = 'test for BAPI_PO_CHANGE'.
ls_itemx-po_item = ls_ekpo-ebelp.
ls_itemx-SHORT_TEXT = 'X'.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 09:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-bapi-po-change/m-p/5972384#M1339507</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2009-08-20T09:24:08Z</dc:date>
    </item>
  </channel>
</rss>

