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

Selection Screen

Former Member
0 Likes
405

Hi

I have placed two select-options in the selection-screen. As per the requirement; i want to allow execution of the program only if one of these two fields are populated with some value/s.

So I would like to throw a message if the user has not entered any value in any of the two select-options. Also after the display of the message control should be returned on that page only so that user can enter some value.

Could you please guide me on this problem?

Thanks & Regards

JIgar Shah.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
375

Hello Jigar,

This is pretty simple.

Selection screen begin of block blk,

Select-options : p_matnr type mard-matnr.

Select-options: p_werks type mard-werks.

AT selection screen on block blk.

If p_matnr is initial.

if p_werks is initial.

Message e(999) "Enter valid plant or material

endif.

endif.

Hope this helps.

Regards,

C

3 REPLIES 3
Read only

Former Member
0 Likes
375

Hi,

Use Obligatory addition to your select option.

Example:

tables mara.

select-options : s_matnr1 for mara-matnr obligatory.

select-options : s_matnr2 for mara-matnr obligatory.

-


Ok. If you need atleast one selection, Use this.

tables mara.

select-options : s_matnr1 for mara-matnr.

select-options : s_matnr2 for mara-matnr.

At selection-screen.

if s_matnr1 is initial and s_matnr2 is initial.

message E000(0) with 'please enter atleast one selection'.

endif.

Edited by: senthil kumar on Sep 9, 2008 12:04 AM

Read only

Former Member
0 Likes
375

Hi,

Either you make the fields as the Obligatory ones or

in the event AT SELECTION SCREEN on <field>.

check the values of both the select option fields is intitial or not.

If s_matnr is not initial and s_werks is not initial.

message ' -


' type 'I' or type 'E'.

endif.

Regards

Lekha

Read only

Former Member
0 Likes
376

Hello Jigar,

This is pretty simple.

Selection screen begin of block blk,

Select-options : p_matnr type mard-matnr.

Select-options: p_werks type mard-werks.

AT selection screen on block blk.

If p_matnr is initial.

if p_werks is initial.

Message e(999) "Enter valid plant or material

endif.

endif.

Hope this helps.

Regards,

C