<?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/12176823#M1979531</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. I am here to
help you to get the most out of it. &lt;/P&gt;&lt;P&gt;First
of all, I recommend that you familiarize yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt; (if you haven't already), as it provides tips
for preparing questions that draw responses from our members. &lt;/P&gt;&lt;P&gt;For
example you :&lt;/P&gt;&lt;UL&gt;
 
&lt;LI&gt;Can outline what steps you
     took to find answers (and why they weren't helpful)&lt;/LI&gt; 
&lt;LI&gt;Can share screenshots of what
     you've seen/done&lt;/LI&gt; 
&lt;LI&gt;Can use a descriptive subject
     line&lt;/LI&gt; 
&lt;LI&gt;Should also make sure you're
     using all the appropriate tags, so the right experts can find your
     question&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The more
details you provide, the more likely it is that members will be able to assist
you&lt;/P&gt;&lt;P&gt;Should
you wish, you can revise your question by selecting Actions, then Edit
(although once someone answers your question, you'll lose the ability to edit
the question -- but if that happens, you can leave more details in a comment). &lt;/P&gt;&lt;P&gt;Finally,
if you're hoping to connect with readers, please consider adding a picture to
your profile. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;.
By personalizing your profile with a photo of you, you encourage readers to
respond.&lt;/P&gt;&lt;P&gt;Good
Luck&lt;/P&gt;&lt;P&gt;Kati -
SAP Community Moderator&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 16:05:04 GMT</pubDate>
    <dc:creator>KatiNonhebel</dc:creator>
    <dc:date>2020-06-04T16:05:04Z</dc:date>
    <item>
      <title>BAPI_PO_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/12176822#M1979530</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;data(lt_temp) = lt_data. 


LOOP AT lt_temp ASSIGNING FIELD-SYMBOL(&amp;lt;fsl_temp&amp;gt;).
        ls_poheader-po_number = &amp;lt;fsl_temp&amp;gt;-ebeln.
        ls_poheaderx-po_number = 'X'.
        READ TABLE lt_data INTO DATA(ls_data) WITH KEY ebeln = &amp;lt;fsl_temp&amp;gt;-ebeln BINARY SEARCH.
        IF sy-subrc IS INITIAL.
          ls_poitem-po_item = ls_data-ebelp.
          ls_poitem-delete_ind = 'L'.
          ls_poitemx-po_item = 'X'.
          ls_poitemx-delete_ind = 'X'.
          APPEND ls_poitem TO lt_poitem.
          APPEND ls_poitemx TO lt_poitemx.
          CLEAR: &amp;lt;fsl_temp&amp;gt;.
        ENDIF.
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder = ls_data-ebeln
*       poheader      = ls_poheader
*       poheaderx     = ls_poheaderx
      TABLES
        return        = lt_return
        poitem        = lt_poitem
        poitemx       = lt_poitemx.
endloop.


    READ TABLE lt_return INTO ls_return WITH KEY  type = 'E'.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Hello.&lt;/P&gt;
  &lt;P&gt;I have fetched ebeln,ebelp and other fields using select query into table lt_data using select options given in selection screen.&lt;/P&gt;
  &lt;P&gt;Now I have multiple purchase orders &amp;amp; multiple line items.Need to call BAPI&lt;/P&gt;
  &lt;P&gt;"BAPI_PO_CHANGE".&lt;/P&gt;
  &lt;P&gt;How to fill the purchase order and its corresponding line items and pass it to BAPI.&lt;/P&gt;
  &lt;P&gt;This is the code i have written.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/12176822#M1979530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-06-04T16:01:55Z</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/12176823#M1979531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. I am here to
help you to get the most out of it. &lt;/P&gt;&lt;P&gt;First
of all, I recommend that you familiarize yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt; (if you haven't already), as it provides tips
for preparing questions that draw responses from our members. &lt;/P&gt;&lt;P&gt;For
example you :&lt;/P&gt;&lt;UL&gt;
 
&lt;LI&gt;Can outline what steps you
     took to find answers (and why they weren't helpful)&lt;/LI&gt; 
&lt;LI&gt;Can share screenshots of what
     you've seen/done&lt;/LI&gt; 
&lt;LI&gt;Can use a descriptive subject
     line&lt;/LI&gt; 
&lt;LI&gt;Should also make sure you're
     using all the appropriate tags, so the right experts can find your
     question&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The more
details you provide, the more likely it is that members will be able to assist
you&lt;/P&gt;&lt;P&gt;Should
you wish, you can revise your question by selecting Actions, then Edit
(although once someone answers your question, you'll lose the ability to edit
the question -- but if that happens, you can leave more details in a comment). &lt;/P&gt;&lt;P&gt;Finally,
if you're hoping to connect with readers, please consider adding a picture to
your profile. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;.
By personalizing your profile with a photo of you, you encourage readers to
respond.&lt;/P&gt;&lt;P&gt;Good
Luck&lt;/P&gt;&lt;P&gt;Kati -
SAP Community Moderator&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/12176823#M1979531</guid>
      <dc:creator>KatiNonhebel</dc:creator>
      <dc:date>2020-06-04T16:05:04Z</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/12176824#M1979532</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;vamshisaichand23&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Your LT_TEMP has the same data as LT_DATA. So basically your changing all POs item by item. That's not very efficient. Have a look at the code below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT lt_data BY ebeln ebelp.
LOOP AT lt_data ASSIGNING FIELD-SYMBOL(&amp;lt;ls_data&amp;gt;).
  AT NEW ebeln.
    CLEAR:
      lt_return[],
      lt_poitem[],
      lt_poitemx[].
  ENDAT.

  ls_poitem-po_item = &amp;lt;ls_data&amp;gt;-ebelp.
  ls_poitem-delete_ind = 'L'.
  ls_poitemx-po_item = abap_true.
  ls_poitemx-delete_ind = abap_true.
  APPEND ls_poitem TO lt_poitem.
  APPEND ls_poitemx TO lt_poitemx.

  AT END OF ebeln.
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder = &amp;lt;ls_data&amp;gt;-ebeln
      TABLES
        return        = lt_return
        poitem        = lt_poitem
        poitemx       = lt_poitemx.

    READ TABLE lt_return TRANSPORTING NO FIELDS
      WITH KEY type = 'E'.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ENDIF.
  ENDAT.
ENDLOOP.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Thu, 04 Jun 2020 16:13:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/12176824#M1979532</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-06-04T16:13: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/12176825#M1979533</link>
      <description>&lt;P&gt;Solution:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Run your program&lt;/LI&gt;&lt;LI&gt;Analyze the error message of the BAPI&lt;/LI&gt;&lt;LI&gt;Correct your program&lt;/LI&gt;&lt;LI&gt;Repeat&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-po-change/m-p/12176825#M1979533</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-06-04T17:19:19Z</dc:date>
    </item>
  </channel>
</rss>

