Application Development and Automation 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: 
Read only

Select-option Custom Error Message

Former Member
0 Likes
1,166

How can I show a custom error message for a select-option when the lower limit is higher than the upper limit.

I tried writing the code in AT SELECTION SCREEN but it doesnt work and shows standard message instead "Lower Limit is greater than upper limit". What if i want to show my own information message and override the standard message functionality.

Berry

9 REPLIES 9
Read only

Former Member
0 Likes
991

Hi Gaurav,

u can write in the event :

at selection-screen on end of field

- Selvapandian Arunachalam

Read only

0 Likes
991

Tried...Still no luck

Read only

Former Member
0 Likes
991

HI

GOOD

THE ERROR YOU R GETTING IS NATURAL ERROR ,BUT YOU CAN REPLACE THAT WITH BY DISPLAYING AN ERROR MESSAGE IN THE STATUS BAR USING THE MESSAGE STATEMENT.

GO THROUGH THIS LINK

http://www.geocities.com/SiliconValley/Grid/4858/sap/ABAPCode/SelectOptions.htm

THANKS

MRUTYUN

Read only

0 Likes
991

This is the code snippet

At selection-screen on s_budat.

if s_budat-low > s_budat-high.

message e001.

endif.

but whats happening is the standard error(msg type 'E') is being displayed first and this code is never executed.

Berry

Read only

0 Likes
991

By the way why you need a condition there, without a condition itself sap will check the greater than condition.

rgds,

TM

Read only

0 Likes
991

Hi,

try this code.

It will trigger only u close the multiple selection window. that is execute button in the multiple selection window.

At selection-screen <b>on end of</b> s_budat.

if s_budat-low > s_budat-high.

message e001.

endif.

Read only

0 Likes
991

Hi Thomas,

As I mentioned I need to display my own custom message instead of the standard one, Thats why.

Regards

Gaurav Berry

Read only

0 Likes
991

Hi Selvapandian,

still not working...still showing the same standard message only

Read only

0 Likes
991

this is my suggestion. Pls try.

At selection-screen on end of s_budat.

if s_budat-low > s_budat-high.

message e001(<b>your own message class name</b>)

with <b>"your own custom message"</b>.

endif.