<?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 Changing PO while creation via BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002136#M76701</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;I have situation where I have to change the line items in the PO before it's getting creating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a Idoc which is coming in the system and then using BAPI_PO_CREATE is creating the Purchase Order. In bapi there is a call for Function module &amp;lt;b&amp;gt;'ME_POST_PO'&amp;lt;/b&amp;gt; in subroutine &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PERFORM po_post TABLES return&lt;/P&gt;&lt;P&gt;                  USING purchaseorder.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this FM in the subroutine &amp;lt;b&amp;gt;PERFORM pruefen(sapmm06e)&amp;lt;/b&amp;gt; there is another subroutine called &amp;lt;b&amp;gt;PERFORM customer_data_check.&amp;lt;/b&amp;gt; in which a USER-exit &amp;lt;b&amp;gt;CALL FUNCTION 'EXIT_SAPMM06E_012'&amp;lt;/b&amp;gt; is being called I tried changing the data here but to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by exporting the values from idoc to memory and then importing it in this user exit and making a loop at table TEKPO and calling FM &amp;lt;b&amp;gt;MEPO_DOC_HEADER_GET&amp;lt;/b&amp;gt; and FM &amp;lt;b&amp;gt;MEPO_DOC_PROCESS&amp;lt;/b&amp;gt; one after another in sequence. But instead of getting changed line items the return code is '1' and it's not updating the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;i&amp;gt;Is there a way to update the fields in table tekpo and then passing the same values further for PO creation.&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt;. Please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Manik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Sep 2005 18:45:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-07T18:45:08Z</dc:date>
    <item>
      <title>Changing PO while creation via BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002136#M76701</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;I have situation where I have to change the line items in the PO before it's getting creating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a Idoc which is coming in the system and then using BAPI_PO_CREATE is creating the Purchase Order. In bapi there is a call for Function module &amp;lt;b&amp;gt;'ME_POST_PO'&amp;lt;/b&amp;gt; in subroutine &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PERFORM po_post TABLES return&lt;/P&gt;&lt;P&gt;                  USING purchaseorder.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this FM in the subroutine &amp;lt;b&amp;gt;PERFORM pruefen(sapmm06e)&amp;lt;/b&amp;gt; there is another subroutine called &amp;lt;b&amp;gt;PERFORM customer_data_check.&amp;lt;/b&amp;gt; in which a USER-exit &amp;lt;b&amp;gt;CALL FUNCTION 'EXIT_SAPMM06E_012'&amp;lt;/b&amp;gt; is being called I tried changing the data here but to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by exporting the values from idoc to memory and then importing it in this user exit and making a loop at table TEKPO and calling FM &amp;lt;b&amp;gt;MEPO_DOC_HEADER_GET&amp;lt;/b&amp;gt; and FM &amp;lt;b&amp;gt;MEPO_DOC_PROCESS&amp;lt;/b&amp;gt; one after another in sequence. But instead of getting changed line items the return code is '1' and it's not updating the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;i&amp;gt;Is there a way to update the fields in table tekpo and then passing the same values further for PO creation.&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt;. Please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Manik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 18:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002136#M76701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T18:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Changing PO while creation via BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002137#M76702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manik;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   You may want to give it a go with the user exit function EXIT_SAPLEINM_012, which is part of enhancement MM06E001.  I have always had good luck updating the PO with that enhancement.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 19:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002137#M76702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T19:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing PO while creation via BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002138#M76703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you not change it in the IDOC itself, before calling the BAPI? There will be several exits in those function modules. I think yours will be IDOC_INPUT_ORDERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 22:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002138#M76703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T22:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing PO while creation via BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002139#M76704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a create scenario and i want to update the field in table tekpo. If i try updating directly then this is not possible since in the the user-exit the tables are passed as ref-values and once back they will have the same values as earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Manik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2005 08:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-po-while-creation-via-bapi/m-p/1002139#M76704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-08T08:01:30Z</dc:date>
    </item>
  </channel>
</rss>

