09-14-2017 6:46 AM
If the net price difference between old PO and edited net price of the same PO is more than $499, we need to re trigger the release strategy of PO.
But when it is less than $499 , the normal release strategy tab should be available in the transaction.
How to do it from EXIT_SAPLEBND_002?
My CODE:What additional validation needed in the code ?
CLEAR:w_reset.
wa_cekko = i_cekko .
*Check if the limit is passed.
LOOP AT it_bekpo INTO wa_bekpo .
SELECT SINGLE netwr FROM ekpo INTO wa_ekpo-netwr WHERE ebeln EQ wa_bekpo-ebeln AND ebelp EQ wa_bekpo-ebelp.
IF sy-subrc EQ 0.
z_netwr = z_netwr + wa_ekpo-netwr.
ENDIF.
wa_cekko-usrc1 = wa_bekpo-knttp.
e_cekko-usrc1 = wa_cekko-usrc1.
ENDLOOP.
z_netwr_diff = i_cekko-gnetw - z_netwr.
IF z_netwr_diff GT 499.
w_reset = 'X'.
ENDIF.
*IF limit passed - reset the value to high limit beyond tolerance.
IF w_reset = 'X'.
e_cekko-gnetw = wa_cekko-gnetw.
ENDIF.
09-23-2017 9:28 PM
First off : Check SAP-KBA 371667 : link
E_CEKKO = I_CEKKO. "Mandatory Statement ...
There are many Blogs / Tutorials on the SAP Community and the Internet as a whole, do some proper search there.
If you are facing unknown issues in testing, check SAP-KBA 2445131 "[EXPERT WEBINAR] Identify and resolve common issues in Release Strategies for Purchasing Documents".