‎2013 Jan 02 12:21 PM
Hi All,
I am trying to put an ABAP check in user exit: EXIT_SAPLMEREQ_008 for the T-Code: ME51N .
Following is the code i am using but while changing the Material Group i am getting screen locked.
Please help me out and suggest if User Exit is not correct.
if sy-tcode = 'ME51N' or sy-tcode = 'ME52N'.
select name low from tvarvc into table it_tvarvc where name = 'SAP_SCMA_CJPR'.
loop at im_eban_changes into wa_eban_changes.
loop at it_tvarvc.
if wa_eban_changes-matkl eq it_tvarvc-low.
if wa_ebkn_changes-ps_psp_pnr is initial.
v_flag1 = 'Y'.
endif.
endif.
endloop.
loop at im_ebkn_changes into wa_ebkn_changes where banfn = wa_eban_changes-banfn
and bnfpo = wa_eban_changes-bnfpo.
if wa_ebkn_changes-sakto is initial.
v_flag = 'Y'.
exit.
endif.
endloop.
endloop.
endif.
if v_flag1 = 'Y'.
message e000(zv) with 'Please enter Valid Project Code.'.
endif.
if v_flag = 'Y'.
message e000(zv) with 'Not a valid GL Alignment.' 'Please Enter' 'valid material group - Line Item' wa_ebkn_changes-bnfpo.
endif.
‎2013 Jan 02 1:08 PM
Hello Pratyush,
To have custom validation in ME51N or ME52N (enjoy transaction) you can use BAdI ME_PROCESS_REQ_CUST. For your case you can implement your logic in method PROCESS_ITEM
Regards,
Puneet Desai
‎2013 Jan 02 1:08 PM
Hello Pratyush,
To have custom validation in ME51N or ME52N (enjoy transaction) you can use BAdI ME_PROCESS_REQ_CUST. For your case you can implement your logic in method PROCESS_ITEM
Regards,
Puneet Desai