<?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 ME_PROCESS_PO_CUST - Post method - Change item data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558518#M583307</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'm using method POST of Badi ME_PROCESS_PO_CUST. I'm trying to change some data at item level (numeration of the items). For that i'm using get data and set data methods. The problem is my PO item info doesn't get updated from my bady implementation. Here's a sample of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   lt_items = im_header-&amp;gt;get_items( ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   loop at lt_items INTO l_one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call method l_one-item-&amp;gt;get_data&lt;/P&gt;&lt;P&gt;    receiving&lt;/P&gt;&lt;P&gt;       re_data = l_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     l_data-ebelp = aux_ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call method l_one-item-&amp;gt;set_data&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;              im_data = l_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     aux_ebelp = aux_ebelp + 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2007 09:22:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-17T09:22:06Z</dc:date>
    <item>
      <title>ME_PROCESS_PO_CUST - Post method - Change item data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558518#M583307</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'm using method POST of Badi ME_PROCESS_PO_CUST. I'm trying to change some data at item level (numeration of the items). For that i'm using get data and set data methods. The problem is my PO item info doesn't get updated from my bady implementation. Here's a sample of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   lt_items = im_header-&amp;gt;get_items( ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   loop at lt_items INTO l_one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call method l_one-item-&amp;gt;get_data&lt;/P&gt;&lt;P&gt;    receiving&lt;/P&gt;&lt;P&gt;       re_data = l_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     l_data-ebelp = aux_ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call method l_one-item-&amp;gt;set_data&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;              im_data = l_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     aux_ebelp = aux_ebelp + 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 09:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558518#M583307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Post method - Change item data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558519#M583308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Generally we don't change the Values of Item Numbers (they are key fields in Item Tables) in any application documnet&lt;/P&gt;&lt;P&gt;If you see the application doc creation (any doc like PO or sales order, or PR  etc)&lt;/P&gt;&lt;P&gt;we don't enter the Item number, the system by defaults defaults this field &lt;/P&gt;&lt;P&gt;So I feel using the BADI you can't change this particular field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to change someother field in PO and see&lt;/P&gt;&lt;P&gt;they may change.&lt;/P&gt;&lt;P&gt;But I doubt this EBELP (item Number field you can't update)&lt;/P&gt;&lt;P&gt;and one more thing is that this is a key field in EKPO..So you can't change/update it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 09:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558519#M583308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Post method - Change item data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558520#M583309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Refer the below therds:&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=3904329&amp;amp;messageID=1012777" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=3904329&amp;amp;messageID=1012777&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=3904329&amp;amp;messageID=1562955" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=3904329&amp;amp;messageID=1562955&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 09:53:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558520#M583309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T09:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Post method - Change item data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558521#M583310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I had thought of that possibility, that might block any change to item numbers, but then i tried (still in method post) to change other item info (i changed the quantity of the item order - MENGE) still it did not get changed. That's why i was wondering i had somthing wrong with my code...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:03:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558521#M583310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Post method - Change item data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558522#M583311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;See the sample code for this BADI&lt;/P&gt;&lt;P&gt;Use the POST method for changing some data and see&lt;/P&gt;&lt;P&gt;BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment&lt;/P&gt;&lt;P&gt;Definition Name: ME_PROCESS_PO_CUST&lt;/P&gt;&lt;P&gt;Interface Name : IF_EX_ME_PROCESS_PO_CUST&lt;/P&gt;&lt;P&gt;Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN&lt;/P&gt;&lt;P&gt;Method :            PROCESS_HEADER&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;METHOD if_ex_me_process_po_cust~process_header .&lt;/P&gt;&lt;P&gt;  DATA : re_data TYPE mepoheader.&lt;/P&gt;&lt;P&gt;*get the item data&lt;/P&gt;&lt;P&gt;  CALL METHOD im_header-&amp;gt;get_data&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      re_data = re_data.&lt;/P&gt;&lt;P&gt;  re_header = re_data.&lt;/P&gt;&lt;P&gt;  IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF ( re_data-bsart &amp;lt;&amp;gt; 'ZIC' AND re_data-bsart &amp;lt;&amp;gt; 'UB' ).&lt;/P&gt;&lt;P&gt;      IF re_data-bukrs NE '1001'.&lt;/P&gt;&lt;P&gt;        MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'&lt;/P&gt;&lt;P&gt;                                        'Code for External Procurement'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;Method :            PROCESS_ITEM&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;METHOD if_ex_me_process_po_cust~process_item .&lt;/P&gt;&lt;P&gt;  DATA: v_menge TYPE bamng,   " PR Quantity&lt;/P&gt;&lt;P&gt;        v_statu.              " PR Status&lt;/P&gt;&lt;P&gt;  DATA : re_data TYPE  mepoitem,&lt;/P&gt;&lt;P&gt;       re_data1 TYPE mepoaccounting,&lt;/P&gt;&lt;P&gt;re_accountings TYPE purchase_order_accountings ,&lt;/P&gt;&lt;P&gt;header TYPE purchase_order_accounting.&lt;/P&gt;&lt;P&gt;*get the item data&lt;/P&gt;&lt;P&gt;  CALL METHOD im_item-&amp;gt;get_data&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      re_data = re_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF re_header-bsart EQ 'ZRL'.&lt;/P&gt;&lt;P&gt;      IF re_data-konnr EQ space.&lt;/P&gt;&lt;P&gt;    MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'&lt;/P&gt;&lt;P&gt;                                          'without a reference to Outline Agreeement'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).&lt;/P&gt;&lt;P&gt;      MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'&lt;/P&gt;&lt;P&gt;                                                     'only with reference to a PR or RFQ'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .&lt;/P&gt;&lt;P&gt;      IF syst-cprog EQ 'RM_MEPO_GUI'.&lt;/P&gt;&lt;P&gt;        IF re_data-uebto IS NOT INITIAL OR&lt;/P&gt;&lt;P&gt;           re_data-uebtk IS NOT INITIAL OR&lt;/P&gt;&lt;P&gt;           re_data-untto IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.&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;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-post-method-change-item-data/m-p/2558522#M583311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:29:04Z</dc:date>
    </item>
  </channel>
</rss>

