07-02-2007 5:52 AM
Hi Everybody,
I need urgent help on this.My requirement is in ME51n after entering a value in the account assignment category we get into the next screen.Here in the Account Assignment tab when user enters a value starting with 'CP' in the WBS element,an error message will be generated.
For the above requirement I have found the enhancment MEREQ001 where I have the EXIT_SAPLMEREQ_005.Here in the include program I have written the following code
tables:ebkn."Purchase Requisition Account Assignment
data:itab like ebkn occurs 0 with header line.
data:wa_ebkn like ebkn.
select * from ebkn into wa_ebkn where ps_psp_pnr = '00002090'."wbs element
append itab.
endselect.
loop at itab.
if itab-ps_psp_pnr eq '00002090'.
message e398(00) with 'please enter capex approv no in recipient'.
endif.
endloop.
Even after activating the project the message is not getting fired.
Please anybody suggest something as the requirement is urgent.
Thanks in advance.
Nazmul
07-02-2007 6:11 AM
Hi
Here you should insert a warming message instead of error one.
The message type E should be place in the exit for the final validations.
Perhaps you can use FM POPUP_DISPLAY_MESSAGE instead.
...
CALL FUNCTION 'POPUP_DISPLAY_MESSAGE'
EXPORTING
TITEL = 'Error Message'
MSGID = 'BD'
MSGTY = 'E'
MSGNO = '899'
MSGV1 = 'Data input error'.
IF SY-UCOMM = 'OKAY'. *Continue button
...
ELSEIF SY-UCOMM = 'RW'. *Cancel button
...
ELSE.
...
ENDIF.
<b>Reward points</b>
Regards
07-02-2007 6:11 AM
Hi
Here you should insert a warming message instead of error one.
The message type E should be place in the exit for the final validations.
Perhaps you can use FM POPUP_DISPLAY_MESSAGE instead.
...
CALL FUNCTION 'POPUP_DISPLAY_MESSAGE'
EXPORTING
TITEL = 'Error Message'
MSGID = 'BD'
MSGTY = 'E'
MSGNO = '899'
MSGV1 = 'Data input error'.
IF SY-UCOMM = 'OKAY'. *Continue button
...
ELSEIF SY-UCOMM = 'RW'. *Cancel button
...
ELSE.
...
ENDIF.
<b>Reward points</b>
Regards