<?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: Avoid saving data when holding purchase order in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193995#M1981054</link>
    <description>&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;Do you get the popup as shown below? It's not enough to allow user to chose between hold and keep editing?&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1810487-hold-error-popup.jpg" /&gt;&lt;/P&gt;&lt;P&gt;If this is the case, then I found a small hack for you. You need to set the GF_NO_HOLD flag to Yes ('X').&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS:
  &amp;lt;lv_no_hold&amp;gt; TYPE any.

IF error = abap_true. " execute for some condition which should disable hold possibility
  ASSIGN ('(SAPLMEPO)GF_NO_HOLD') TO &amp;lt;lv_no_hold&amp;gt;.
  IF sy-subrc = 0. " just in case
    &amp;lt;lv_no_hold&amp;gt; = abap_true. " hold is not an option in this case
  ENDIF.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;Regards,&lt;BR /&gt;Mateusz</description>
    <pubDate>Thu, 21 May 2020 09:29:40 GMT</pubDate>
    <dc:creator>MateuszAdamus</dc:creator>
    <dc:date>2020-05-21T09:29:40Z</dc:date>
    <item>
      <title>Avoid saving data when holding purchase order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193992#M1981051</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
  &lt;P&gt;I need to make some checks before saving a purchase order. I'm using badi IF_EX_ME_PROCESS_PO_CUST. If I change Payment termns at header level (and some other conditiones) an error message must be shown . &lt;/P&gt;
  &lt;P&gt;At method PROCESS_HEADER it's working fine, I compare all fields required and then I give the error&lt;/P&gt;
  &lt;P&gt; mmpur_business_obj_id lw_mepoheader-id.&lt;/P&gt;
  &lt;P&gt;mmpur_message_forced 'E' 'ZMM01' '049' l_zterm '' '' ''.&lt;/P&gt;
  &lt;P&gt;At method CHECK I do the same.&lt;/P&gt;
  &lt;P&gt;When I save the PO I get the error and it's not possible to save.&lt;/P&gt;
  &lt;P&gt;The problem is when I change Payment terms and hold the PO (this is the first time I use the button "Hold"). PROCESS_HEADER and CHECK work fine but at the end the PO is saved with the wrong data, I want to keep the previous payment terms. Even if I call to method set_data at method CHECK, when I debug method POST I have the new value.&lt;/P&gt;
  &lt;P&gt;Is there anything I can do so when holding the PO this field is not changed?&lt;/P&gt;
  &lt;P&gt;thanks in advance,&lt;/P&gt;
  &lt;P&gt;Maria&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 14:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193992#M1981051</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2020-05-20T14:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid saving data when holding purchase order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193993#M1981052</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;maria.merino&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Why not simply show the message with the MESSAGE keyword?&lt;/P&gt;&lt;P&gt;Are you setting the CH_FAILED to YES ('X') in your CHECK method implementation?&lt;/P&gt;Regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Wed, 20 May 2020 15:16:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193993#M1981052</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-05-20T15:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid saving data when holding purchase order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193994#M1981053</link>
      <description>&lt;P&gt;Yes I set CH_FAILED = 'X':&lt;/P&gt;&lt;P&gt;ch_failed = 'X'.&lt;BR /&gt;lw_header-zterm = l_zterm.&lt;BR /&gt;im_header-&amp;gt;set_data( lw_header ).&lt;/P&gt;&lt;P&gt;in Set_data both my_ibs_firewall_on and my_cust_firewall_on are blank so the field is not being modified.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 08:26:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193994#M1981053</guid>
      <dc:creator>maria_merino</dc:creator>
      <dc:date>2020-05-21T08:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid saving data when holding purchase order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193995#M1981054</link>
      <description>&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;Do you get the popup as shown below? It's not enough to allow user to chose between hold and keep editing?&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1810487-hold-error-popup.jpg" /&gt;&lt;/P&gt;&lt;P&gt;If this is the case, then I found a small hack for you. You need to set the GF_NO_HOLD flag to Yes ('X').&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS:
  &amp;lt;lv_no_hold&amp;gt; TYPE any.

IF error = abap_true. " execute for some condition which should disable hold possibility
  ASSIGN ('(SAPLMEPO)GF_NO_HOLD') TO &amp;lt;lv_no_hold&amp;gt;.
  IF sy-subrc = 0. " just in case
    &amp;lt;lv_no_hold&amp;gt; = abap_true. " hold is not an option in this case
  ENDIF.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;Regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Thu, 21 May 2020 09:29:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193995#M1981054</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-05-21T09:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid saving data when holding purchase order</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193996#M1981055</link>
      <description>&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;Please have a look at the ME_HOLD_PO BADI. &lt;/P&gt;&lt;P&gt;I think this is what you're looking for in terms of disabling the HOLD button when document has an error.&lt;/P&gt;Regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Thu, 21 May 2020 13:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoid-saving-data-when-holding-purchase-order/m-p/12193996#M1981055</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-05-21T13:05:34Z</dc:date>
    </item>
  </channel>
</rss>

