2008 Jul 03 6:03 AM
Hi Experts ,
In the selection screen i want to give a information message if the user enters wrong text and the it should not go to the output screen. It should come back to the selection screen.
Note : i want to use Information message.
Correct Answers will be appriciated with good points.
Regards,
Sunita.
2008 Jul 03 6:20 AM
Hi,
Check this out..
AT SELECTION-SCREEN .
If condition.
Message I001(message id) .
Stop. <-- U can use Exit too
LEAVE LIST-PROCESSING.
Endif.
Revert back if any issues.
Regards
Naveen
2008 Jul 03 6:07 AM
IF <put the codition>.
MESSAGE.
ENDIF.
in the message put an information message...like
IF pa_rpath IS INITIAL.
MESSAGE i999(message class) WITH text-016 .
endDIF.
in the text element u can write ur required message
Edited by: Rudra Prasanna Mohapatra on Jul 3, 2008 7:07 AM
Edited by: Rudra Prasanna Mohapatra on Jul 3, 2008 7:08 AM
Edited by: Rudra Prasanna Mohapatra on Jul 3, 2008 7:08 AM
2008 Jul 03 6:08 AM
Hi sunetha,
u can use the message class for the error display.
or
in the selection screen u can the parameter or selectoption as obligatery .
then it will display error
2008 Jul 03 6:08 AM
In that case do the validation inside START-OF-SELECTION.
If validation fails give and information message and use key word EXIT to come to the selection screen.
PARAMETERS: P_TEST(10) TYPE C.
START-OF-SELECTION.
IF P_TEST NE 'XYZ'.
MESSAGE 'Please enter valid value' type 'I'.
exit.
ENDIF.
other selections.
regards,
Mouli.
2008 Jul 03 6:11 AM
Hi
you will have to make use of Statement AT SELECTION-SCREEN
Have a look at below code for Reference
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
Regards,
Nikhil
2008 Jul 03 6:12 AM
HI
Create a message class and place the information message u want to display in that message class.
use that in your program
in the AT selection screen event, check for the input entered,
if that is not corret, display dat message and exit.
2008 Jul 03 6:15 AM
Hi ,
For validation in selection screen:
Suppose you are having vbeln in selection screen as s_vbeln.
select-options:s_vbeln for vbap-vbeln.
Now you have to validate s_vbeln.
data : l_vbeln type vbap-vbeln.
select single vbeln
from vbap into l_vbeln
where vbeln in s_vbeln.
if sy-subrc ne 0.
message I001. "Enter correct no.
endif.
Rgds.
2008 Jul 03 6:18 AM
Hi Sunita,
Raise a warning message and use Leave List processing.
AT SELECTION-SCREEN .
If condition.
Message Woo1(message id) .
LEAVE LIST-PROCESSING.
Endif.
Reward If helpful.
Regards,
Sachin M M
2008 Jul 03 6:20 AM
Hi,
Check this out..
AT SELECTION-SCREEN .
If condition.
Message I001(message id) .
Stop. <-- U can use Exit too
LEAVE LIST-PROCESSING.
Endif.
Revert back if any issues.
Regards
Naveen