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: 

help needed for user exit in ME51n

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

1 REPLY 1

Former Member
0 Kudos

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