‎2013 Jan 14 6:23 PM
Hello,
I want to create a new query with selection screen but I want to know if it's possible to have an error message when a condition in the screen isn't satisfied.
Can you please help me? If yes, how can I do it?
Thank you in advance
‎2013 Jan 14 7:38 PM
Hi HK,
You can use the AT SELECTION-SCREEN event to validate the selection screen inputs and issue error message as needed. For example...
AT SELECTION-SCREEN.
IF carrid-low IS INITIAL OR
city_from IS INITIAL OR
city_to IS INITIAL.
MESSAGE e000(hb).
ENDIF.
Cheers,
Amy
‎2013 Jan 14 7:38 PM
Hi HK,
You can use the AT SELECTION-SCREEN event to validate the selection screen inputs and issue error message as needed. For example...
AT SELECTION-SCREEN.
IF carrid-low IS INITIAL OR
city_from IS INITIAL OR
city_to IS INITIAL.
MESSAGE e000(hb).
ENDIF.
Cheers,
Amy
‎2013 Jan 15 8:11 AM
Hello Amy,
Thank you for your answer.
When you talk about the at selection-sreen event, you mean that I can modify the genereted program of the query?
Kind regards.
HK
‎2013 Jan 15 1:31 PM
Hi HK,
My reply assumed you are writing the code for the selection screen in a custom report, is that incorrect? Are you instead using a tool like Quickviewer or SAP Query? If so, please take a look at the following discussions in SCN:
Cheers,
Amy
‎2013 Jan 15 7:03 PM
Hi Amy,
Thank you for the answer.
I'm using SAP Query. THank you for the links. I'll have a look at them.
thank you so much.