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

problem in selection screen....

Former Member
0 Likes
667

Hi ,

I have one scenario for selction screen. there are Two radio buttons A,B.

Under A there are two parameters P_A1,P_A2.

Under B button there are two selct options S_b1,S_B2.

when user selects a radio button the corresponding screen elemts should be active .

The problem is all my parameters are obligatory.Suppose the user selects radio button B now user doesn't enter any values in S_A1 and S_b2 and selects button A then a message comes "Fill required fields".

i want to over come this problem .also my fields should be obligatory.Please help.

6 REPLIES 6
Read only

Former Member
0 Likes
636

Hi,

Do this way.

when you select A Radio button. then you just validate only those two parameters in A. if you select B radiobutton then validate only those two selection screen feilds. something like this

if you select A .

IF RD1(A) = 'X'.

then you just validate the two parameters.

ELSE.(i.e radio button B = 'X')

then you validate both the selection screen fields

ENDIF.

this will solve your problem.hope you understood.

Please reward points if it helps

Thanks

Vikranth

Read only

Former Member
0 Likes
636

hi!

Using AT SELECTION-SCREEN OUTPUT can achive your requirement.

as all the fields in Input screen are obligatory assign some DEFAULT VALUE to the I/P fields.

after this by looping under the selection-screen output and checking for the correct option can activate the corresponding fields.

loop at screen.

if a = X

if screen-name = 'pa1'.

screen-active = 0.

endif

if screen-name = 'pa2'

screen-active = 0.

endif.

elseif b = X

if screen-name = 'so1'

.

.

modify screen

endloop

reward me if useful.

regards,

Nagulan.

Read only

0 Likes
636

yes i am doing the LOOP at screen..but it asks for fill the required fields...but in my selection screen i can't give any defaults ... i have to show blank values

Read only

Former Member
0 Likes
636

Hi,

Check whether radiobutton is selected.

If R1 is selected.

Check whether corresponding fields are filled.

If no, raise an error message.

Similar for second radio button.

Read only

Former Member
0 Likes
636

HI,

you can change the attributes.

e.g.

LOOP AT SCREEN.

if P_CHECK1 eq 'X'.

if screen-GROUP4 => '011'

and screen-group4 < '015'.

screen-REQUIRED = '1'.

endif.

case screen-group4.

when: '045'.

screen-REQUIRED = '0'.

when: '052'.

screen-REQUIRED = '0'.

when: '053'.

screen-REQUIRED = '0'.

when: '022'.

screen-REQUIRED = '0'.

when: '023'.

screen-REQUIRED = '0'.

when: '024'.

screen-REQUIRED = '0'.

when: '028'.

if screen-group3 eq 'LOW'.

screen-REQUIRED = '0'.

endif.

when: '029'.

if screen-group3 eq 'LOW'.

screen-REQUIRED = '0'.

endif.

when: '035'.

screen-REQUIRED = '0'.

when: '036'.

screen-REQUIRED = '0'.

when: '038'.

screen-REQUIRED = '0'.

when: '039'.

screen-REQUIRED = '0'.

endcase.

modify screen.

endloop.

Reward points if helpfull

Nicole

Read only

Former Member
0 Likes
636

Hi,

remove the obligatory from the declaration of the selection screen parameters.

and validate them in AT SELECTION-SCREEN event.

if sy-ucomm eq 'ONLI'.

if a is not initial.

if p_a1 is initial.

error message.

endif.

endif.

endif.