<?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_PO_Change in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544490#M1657673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fisrt try to get the details of PO that you want to change by using BAPI BAPI_PO_GETDETAIL1 , there you will get POSCHEDULE table . Then update this table with the data that you need to update and build the table POSCHEDULEX  with PO_ITEMX and the field that you need to udate with 'X' an use in BAPI BAPI_PO_CHANGE . Then use BAPI_TRANSACTION_COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We used same solution to update the scheduled delivery line items in PO&lt;/P&gt;&lt;P&gt;Please let me know if you need any further information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 18:56:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-08T18:56:51Z</dc:date>
    <item>
      <title>BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544486#M1657669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;     I am trying to use BAPI_PO_Change in an enhancement of tcode MB01, the field in the po line item is changed and logged and could be found in the Tcode ME22n-&amp;gt;MENU-&amp;gt;Environment-&amp;gt; ITEM CHANGES. But the PO is not changed, hence the field change is not seen when viewed in ME22n because the database is not commited or updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BAPI return message is also success and says PO is changed, but PO is not changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i  change and update the PO.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Uma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 05:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544486#M1657669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-01T05:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544487#M1657670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally this should not happen. Just make sure while calling the BAPI, TESTRUN is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also try to use COMMIT WORK after calling BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mittal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2012 07:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544487#M1657670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-01T07:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544488#M1657671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;P&gt;   I introduced enhancement  ZMB01_MARK_ELIKZ  in the include MM07MFS0_SEGMENTDATEN_EK_SETZE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I executed in foreground MB01, ELIKZ flag is set and PO changed successfully...When i tried to update the PO by idoc processing using WE19, against tcode MB01, the PO log has ELIKZ changed but the PO not changed and hence ELIKZ flag is not updated in PO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the below code ...Is there any other factors to consider when processing BAPI..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form segmentdaten_ek_setzen.&lt;/P&gt;&lt;P&gt;"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(1 ) Form SEGMENTDATEN_EK_SETZEN, Start                                                                                D&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;$-Start: (1 )----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;$&lt;STRONG&gt;$&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ENHANCEMENT 372  ZMB01_MARK_ELIKZ.    "active version&lt;/P&gt;&lt;P&gt;data l_ebeln type ekko-ebeln.&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;      i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      s_bapimepoheader TYPE bapimepoheader,&lt;/P&gt;&lt;P&gt;      s_bapimepoheaderx TYPE bapimepoheaderx,&lt;/P&gt;&lt;P&gt;      s_bapimepoitem TYPE bapimepoitem occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      s_bapimepoitemX TYPE bapimepoitemX occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if sy-dynnr = '0200' or sy-tcode = 'WE19' or sy-tcode = 'MB01' .&lt;/P&gt;&lt;P&gt;  select  single ebeln from ekko into l_ebeln where ebeln = xebefu-ebeln and bsart = 'ZNB'.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    if  xebefu-elikz &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;      xebefu-elikz = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Mark DCI flag for every line item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; s_bapimepoheaderx-po_number =  XEBEFU-EBELN.&lt;/P&gt;&lt;P&gt; s_bapimepoheader-po_number = XEBEFU-EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  s_bapimepoitemx-po_item = XEBEFU-EBELP.&lt;/P&gt;&lt;P&gt;  s_bapimepoitem-po_item = XEBEFU-EBELP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  s_bapimepoitemx-NO_MORE_GR = 'X'.&lt;/P&gt;&lt;P&gt;  s_bapimepoitem-NO_MORE_GR = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append s_bapimepoitem.&lt;/P&gt;&lt;P&gt;  clear s_bapimepoitem.&lt;/P&gt;&lt;P&gt;  append s_bapimepoitemx.&lt;/P&gt;&lt;P&gt;  clear s_bapimepoitemx.&lt;/P&gt;&lt;P&gt;&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 = XEBEFU-EBELN&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      return        = i_return&lt;/P&gt;&lt;P&gt;      poitem        = s_bapimepoitem&lt;/P&gt;&lt;P&gt;      poitemx      =  s_bapimepoitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Message types: S Success, E Error, W Warning, I Info, A Abort&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Supress all Warning Messages&lt;/P&gt;&lt;P&gt;DELETE i_return WHERE ( TYPE EQ 'W' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table i_return with key type = 'E'.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;   Message E900(M7) with XEBEFU-EBELN XEBEFU-EBELP.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; refresh : s_bapimepoitem,s_bapimepoitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDENHANCEMENT.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;$-End:   (1 )----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;$&lt;STRONG&gt;$&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: l_k_mseg type mseg.                                    " 979280&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if xebefu-bsmng is initial and not xebefu-netwr is initial.&lt;/P&gt;&lt;P&gt;    message e187.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   Die Bestellung enthält einen Wert ohne Menge&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 00:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544488#M1657671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T00:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544489#M1657672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the execution by passing the  below parameter aswell &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_bapimepoitemx-PO_ITEMX = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i see you are not pasing the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 12:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544489#M1657672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T12:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544490#M1657673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fisrt try to get the details of PO that you want to change by using BAPI BAPI_PO_GETDETAIL1 , there you will get POSCHEDULE table . Then update this table with the data that you need to update and build the table POSCHEDULEX  with PO_ITEMX and the field that you need to udate with 'X' an use in BAPI BAPI_PO_CHANGE . Then use BAPI_TRANSACTION_COMMIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We used same solution to update the scheduled delivery line items in PO&lt;/P&gt;&lt;P&gt;Please let me know if you need any further information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 18:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544490#M1657673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-08T18:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_PO_Change</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544491#M1657674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Snehal,&lt;/P&gt;&lt;P&gt;    Thanks for your reply...As the issue is mainly of handling the PO &amp;amp; GR through MB01 via IDOC, i decided to fix the same in the Inbound FM of idoc...So wrote enhancement as below : and is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENHANCEMENT 5  ZWE19_MARK_ELIKZ.    "active version&lt;/P&gt;&lt;P&gt;data l_ebeln type ekko-ebeln.&lt;/P&gt;&lt;P&gt;data l_ebelp type ekpo-ebelp.&lt;/P&gt;&lt;P&gt;data wa_hdr type E1MBXYH.&lt;/P&gt;&lt;P&gt;data wa_itm type E1MBXYI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : wa_hdr, wa_itm, l_ebeln, l_ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-tcode = 'WE19' .&lt;/P&gt;&lt;P&gt;    loop at idoc_data.&lt;/P&gt;&lt;P&gt;          CASE idoc_data-segnam.&lt;/P&gt;&lt;P&gt;              WHEN 'E1MBXYH'.&lt;/P&gt;&lt;P&gt;                         wa_hdr = idoc_data-sdata.&lt;/P&gt;&lt;P&gt;               WHEN 'E1MBXYI'.&lt;/P&gt;&lt;P&gt;                         wa_itm = idoc_data-sdata.&lt;/P&gt;&lt;P&gt;                          if wa_hdr-XBLNR is not initial and wa_hdr-tcode = 'MB01' and wa_itm-ebeln is not initial .&lt;/P&gt;&lt;P&gt;                                   select single ebeln from ekko into l_ebeln where ebeln = wa_itm-ebeln and bsart = 'ZNB'.&lt;/P&gt;&lt;P&gt;                                    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;                                          wa_itm-elikz = 'X'.&lt;/P&gt;&lt;P&gt;                                          idoc_data-sdata = wa_itm.&lt;/P&gt;&lt;P&gt;                                          modify idoc_data .&lt;/P&gt;&lt;P&gt;                                  endif.&lt;/P&gt;&lt;P&gt;                          endif.&lt;/P&gt;&lt;P&gt;            ENDCASE.&lt;/P&gt;&lt;P&gt;        endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDENHANCEMENT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 05:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/8544491#M1657674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-09T05:09:36Z</dc:date>
    </item>
  </channel>
</rss>

