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: 

Displaying error message on screen

Former Member
0 Kudos
640

Hello All:

I have couple of fields on selections screen that I need to validate at least one of them is populated. Making them mandatory is not an option for them but I have some code below, I have put in Start-of-selection event:

IF p_full EQ 'X'.

IF S_PERNR-LOW IS INITIAL

AND S_KOSTL-LOW IS INITIAL.

v_error = 'X'.

MESSAGE E002(sy) WITH 'Pernr or costctr must be entered to run full file'.

STOP.

ENDIF.

ENDIF.

It works fine with displaying error message on the bottom but it takes me to the blank screen instead of staying on the selection screen. I already tried "at selection screen output event" but doesn't work for me! If anyone has any suggestions, please let me know.

Thanks.

--Mithun

1 ACCEPTED SOLUTION

Former Member
0 Kudos
333

Put your validation in 'at selection-screen' Then error messg is displayed at the bottom and you will be in selection screen.

2 REPLIES 2

Former Member
0 Kudos
334

Put your validation in 'at selection-screen' Then error messg is displayed at the bottom and you will be in selection screen.

0 Kudos
333

Thanks Janardhan. That did it and rewarded full points.

Mithun