2008 Jun 10 6:57 AM
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.
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.
2008 Jun 10 7:04 AM
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
2008 Jun 10 7:05 AM
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.
2008 Jun 10 7:11 AM
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
2008 Jun 10 7:06 AM
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.
2008 Jun 10 7:08 AM
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
2008 Jun 10 7:34 AM
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.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |