<?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~PROCESS_HEADER in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492545#M229022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip Christian.  I need to set my_cust_firewall_on to 'no'.  I'm new to BADIs and objects so haven't been able to find how/where.  Where did you do it in your code (if you did)?&lt;/P&gt;&lt;P&gt;(Also, I coded set_changed() because it was suggested elsewhere in SDN - it didn't work for that Poster either!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Sep 2006 01:23:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-01T01:23:19Z</dc:date>
    <item>
      <title>ME_PROCESS_PO_CUST~PROCESS_HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492543#M229020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to change a Z field on our purchase order headers.  Here is the code:&lt;/P&gt;&lt;P&gt;METHOD if_ex_me_process_po_cust~process_header .&lt;/P&gt;&lt;P&gt;  DATA: ls_mepoheader TYPE mepoheader.&lt;/P&gt;&lt;P&gt;  ls_mepoheader = im_header-&amp;gt;get_data( ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The terms in the purchase order should come from the contract. If&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;there are no contract terms, use the vendor's terms.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF ls_mepoheader-konnr IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE zterm INTO ls_mepoheader-zterm FROM ekko&lt;/P&gt;&lt;P&gt;        WHERE ebeln = ls_mepoheader-konnr&lt;/P&gt;&lt;P&gt;        AND   bstyp = 'K'.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0 OR ls_mepoheader-zterm IS INITIAL.&lt;/P&gt;&lt;P&gt;      SELECT SINGLE zterm INTO ls_mepoheader-zterm FROM lfm1&lt;/P&gt;&lt;P&gt;          WHERE lifnr = ls_mepoheader-lifnr&lt;/P&gt;&lt;P&gt;          AND   ekorg = ls_mepoheader-ekorg.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE zterm INTO ls_mepoheader-zterm FROM lfm1&lt;/P&gt;&lt;P&gt;       WHERE lifnr = ls_mepoheader-lifnr&lt;/P&gt;&lt;P&gt;       AND   ekorg = ls_mepoheader-ekorg.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  im_header-&amp;gt;set_data( im_data = ls_mepoheader ).&lt;/P&gt;&lt;P&gt;  im_header-&amp;gt;set_changed( ).&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;It doesn't work - debugging shows its going through the code ok but the PO doesn't have the right ZTERM once its saved.&lt;/P&gt;&lt;P&gt;Can anybody tell me what I've done wrong?&lt;/P&gt;&lt;P&gt;Thanks, Brigitte&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 03:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492543#M229020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-31T03:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST~PROCESS_HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492544#M229021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brigitte!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just had a look into our implementation, this part looks pretty much the same:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    if ls_bestellkopf_neu-zterm &amp;lt;&amp;gt; ls_bestellkopf-zterm or
       ls_bestellkopf_neu-zbd1t &amp;lt;&amp;gt; ls_bestellkopf-zbd1t or
       ls_bestellkopf_neu-zbd2t &amp;lt;&amp;gt; ls_bestellkopf-zbd2t or
       ls_bestellkopf_neu-zbd3t &amp;lt;&amp;gt; ls_bestellkopf-zbd3t.
      move ls_bestellkopf_neu-zterm to ls_bestellkopf-zterm.
      move ls_bestellkopf_neu-zbd1t to ls_bestellkopf-zbd1t.
      move ls_bestellkopf_neu-zbd2t to ls_bestellkopf-zbd2t.
      move ls_bestellkopf_neu-zbd3t to ls_bestellkopf-zbd3t.

      call method im_header-&amp;gt;set_data
        exporting
          im_data = ls_bestellkopf.
    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But inside of method im_header-&amp;gt;set_data some checks are performed ('my_cust_firewall_on') - just debug this method to see, what is going on there.&lt;/P&gt;&lt;P&gt;Also a call of set_changed() seems not to be necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2006 06:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492544#M229021</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-08-31T06:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST~PROCESS_HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492545#M229022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip Christian.  I need to set my_cust_firewall_on to 'no'.  I'm new to BADIs and objects so haven't been able to find how/where.  Where did you do it in your code (if you did)?&lt;/P&gt;&lt;P&gt;(Also, I coded set_changed() because it was suggested elsewhere in SDN - it didn't work for that Poster either!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 01:23:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492545#M229022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T01:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST~PROCESS_HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492546#M229023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brigitte!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, we don't set my_cust_firewall_on. Anyway, looks like it has to be set to 'X' (= mmpur_yes), otherwise this check will end the execution of method set_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not the usual BADI way - all the complex handling via interface is a special technic for the PO (and maybe somewhere else), but most BADIs work just like a function module (roughly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This 'firewall' is a public instance attribute - but not of the interface, but of the implementation of im_header... So I don't know if you get direct access (at least in debugger you can see this attribute below im_header).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a lot of places, where this is set. Make some tests to figure out what's going on. A watchpoint might help, also try manual creation via ME21N (then it's OK for us)...&lt;/P&gt;&lt;P&gt;I couldn't find any documentation on this part, so it's your own investigation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 08:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492546#M229023</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-09-01T08:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: ME_PROCESS_PO_CUST~PROCESS_HEADER</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492547#M229024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I worked out what needed to be done &amp;amp; thought I should post it in case it helped somebody in the future.  After the last ENDIF, i've changed the code to:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Update the attributes in the im_header interface, so &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;that SAP standard fields can actually be modified.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if ch_po is initial.&lt;/P&gt;&lt;P&gt;    ch_po ?= im_header.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  ch_po-&amp;gt;my_ibs_firewall_on  = 'X'.&lt;/P&gt;&lt;P&gt;  ch_po-&amp;gt;my_cust_firewall_on = ' '.&lt;/P&gt;&lt;P&gt;  im_header-&amp;gt;set_data( im_data = ls_mepoheader ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2006 03:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me-process-po-cust-process-header/m-p/1492547#M229024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-27T03:21:31Z</dc:date>
    </item>
  </channel>
</rss>

