I need to check profit center for particular GL a/c. it entered profited center does not belong to entered gl a/c. it system should throw error message.
I am using EXIT_SAPLF048_001 exit. And this is working fine but after display of msg all the fields on screen getting cleared and user does not with to re-enter the all fields again. I hv used following msg type.
LOOP AT doc_item_tab INTO wa_doc_item_tab WHERE hkont EQ '0034135122'.
IF wa_doc_item_tab-prctr NE '0000010000'.
MESSAGE 'Invalid Profit Center for GL' TYPE 'I' DISPLAY LIKE 'E'.
* MESSAGE e005(zfi005). "'Invalid Profit Center for GL' TYPE 'S'.
LEAVE TO CURRENT TRANSACTION.
The message i hv used is of status message. but it is getting displayed as pop up. after pressing ok, everything getting lost.
can any one suggest some modification in above code OR should i go for other enhancements (Validations, substitutions, BTES or BAdi.)
Thanks in advance.