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

Suggest the way while validating fields in selection-screen

Former Member
0 Likes
320

Hi Experts,

I am not able to open multiple selection screen for select-options because when i tried to open, it triggers AT selection-screen event in which some validations are happened.

If any of the validation fails, it will give message.

Please suggest me the way how i can avoid that.

Thank you very much for your help

Regards

Gopal

2 REPLIES 2
Read only

Former Member
0 Likes
285

Hi,

Check the sy-ucomm in the at selection-screen...

AT SELECTION-SCREEN.

if sy-ucomm = 'xxxxx'.  " Function code to open another selection screen.
   EXIT.
ENDIF.

Thanks

Naren

Read only

Former Member
0 Likes
285

Hello,

I believe you are talking about the Multiple Selections Option.

There are two cases here. For both the Cases, use the Following Logic in the At-Selection Screen Event.

If your Select-Options Variable is not declared as OBLIGATORY, then use this Logic.

In the At Selection-Screen Event, check the following Condition.

IF SY-UCOMM NE SSCRFIELDS-UCOMM.

Message 'Enter atleast 1 Value' Type 'E'.

ENDIF.

This will avoid throwing an Error when you click on the Multiple Selections Option.

If your Select-Options Variable is Declared as Mandatory, the above logic does not work. So, what you can do is,

Do not make it Obligatory. But use the below Logic.

IF S_MATNR is Initial.

CHECK NOT SY-UCOMM EQ SSCRFIELDS-UCOMM.

Message 'Enter atleast 1 Value' Type 'E'.

ENDIF.

Hope it was helpful.

Thanks and Regards,

Venkat Phani Prasad Konduri

Edited by: Konduri Venkata Phani Prasad on Sep 12, 2008 2:48 AM