<?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: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508081#M1654642</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;So now ur logic is working, and the only issue is logic is running twice CORRECT then just add a if condition before ur logic i.e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-ucomm eq 'MECHECKDOC' or sy-ucomm eq 'PB'. "This is for Check button&lt;/P&gt;&lt;P&gt;ur logic&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;Thanks,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Feb 2012 09:20:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-22T09:20:50Z</dc:date>
    <item>
      <title>ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508077#M1654638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've implemented method PROCESS_HEADER of BADI ME_PROCESS_PO_CUST for changing the field SUBMI with the SET_DATA method. The strange thing is, that the method is called twice. The problem seems to be the following row in IF_FLUSH_TRANSPORT_MM~START:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Step 3: Recheck if the extension changed any business object
  IF NOT my_recheck_queue IS INITIAL.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, the internal table my_recheck_queue isn't INITIAL and that's the reason why the PROCESS_HEADER method is called again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does someone have an idea how I can avoid the PROCESS_HEADER method running twice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 11:29:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508077#M1654638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-21T11:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508078#M1654639</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;BADI can be called many times while accessing transaction.&lt;/P&gt;&lt;P&gt;If it is affecting your logic means, put a check in the beginning of the method whether the field has been changed already.&lt;/P&gt;&lt;P&gt;If yes, do not go inside the logic again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Raja.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 05:18:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508078#M1654639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T05:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508079#M1654640</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;&lt;/P&gt;&lt;P&gt;Can u elaborate what is the logic/Requirement ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u are wanting to validate on some data then u can enable the logic based on user command (of SAVE,CHECK button).&lt;/P&gt;&lt;P&gt;if it satisfies then execute ur logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 06:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508079#M1654640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T06:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508080#M1654641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My logic is to check the countries of the delivery addresses on item level and then updating the collective number under certain conditions (all countries are identical and the country is maintained in an user table).&lt;/P&gt;&lt;P&gt;First I wanted to do this in CHECK method, but updating the collective number didn't work there. Then I tried the POST method, but updating the collective number didn't work there also, so I tried it in the PROCESS_HEADER and this is the first method where updating the collective number works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 08:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508080#M1654641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T08:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508081#M1654642</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;So now ur logic is working, and the only issue is logic is running twice CORRECT then just add a if condition before ur logic i.e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-ucomm eq 'MECHECKDOC' or sy-ucomm eq 'PB'. "This is for Check button&lt;/P&gt;&lt;P&gt;ur logic&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;Thanks,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2012 09:20:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508081#M1654642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-22T09:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508082#M1654643</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;If the only issue is that you need your code to be executed only once, you can make use of IMPORT &amp;amp; EXPORT techniques.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1] In the call, try to get ID from Memory like&lt;/P&gt;&lt;P&gt;       IMPORT TEXT01 FROM MEMORY ID 'SOMEID'.&lt;/P&gt;&lt;P&gt;       IF SY-SUBRC EQ 0 AND TEXT01 IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;                  " Clear the contents from Memory specifying Memory ID &lt;/P&gt;&lt;P&gt;                  RETURN.  "Exit further processing&lt;/P&gt;&lt;P&gt;       ELSE.&lt;/P&gt;&lt;P&gt;               "Process your required logic.&lt;/P&gt;&lt;P&gt;                EXPORT TEXT01 FROM 'BADI_ALREADY_PROCESSED_ID' TO MEMORY ID 'SOMEID'.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take some more help of IMPORT/EXPORT usage if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Neelesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 01:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508082#M1654643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T01:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST - Method PROCESS_HEADER running twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508083#M1654644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess, I solved it with the import/export suggestion of neelpad7. I have to test it in detail, but so far it looks good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 15:26:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-method-process-header-running-twice/m-p/8508083#M1654644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-24T15:26:19Z</dc:date>
    </item>
  </channel>
</rss>

