03-10-2017 5:23 AM
Propose the error, control the Down payment in MIRO screen. while doing MIRO if PO has any down payment, need to clear while doing the MIRO. Without clearing the Down Payment user should not allow to DO MIRO. This control should only for particular Company code.
Used CHANGE_AT_SAVE method in INVOICE_UPDATE badi.
if S_RBKP_NEW-bukrs eq 'ABC'.
FIELD-SYMBOLS: <status> type any,
<status1> type any.
data: v_bewtp type ekbe-bewtp.
ASSIGN ('(SAPLMR1M)RM08M-EBELN') TO <status>.
select bewtp from ekbe into v_bewtp where ebeln = <status>.
if v_bewtp eq 'A'.
MESSAGE 'Please Clear the Down Payment for the PO to POST the MIRO' type 'E'.
Endif.
endselect.
CLEAR v_bewtp.
endif.
its working fine to get error massage while SAVING Miro with out clearing the down payment, BUT now my problem is, I clear the downpayment and save MIRO again but it throws the same error 'Please Clear the Down Payment for the PO to POST the MIRO'.
Regards,
Aman
05-05-2017 8:14 PM
Have you tried debugging this? It'd seem the reason should become rather obvious in debugger...