Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

While doing MIRO if PO has any down payment, need to clear while doing the MIRO.

0 Kudos

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

1 REPLY 1

Jelena
Active Contributor
0 Kudos

Have you tried debugging this? It'd seem the reason should become rather obvious in debugger...