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 problem

Former Member
0 Likes
675

Hi all,

Hw to make mandatory for two radio buttons in selection-screen.

if i click first radio-button the parameter p_adit should be enable & madaory and second radio-button parameter p_adit1 should be disable. The same thing for second radio-button

thanks if yu help for me

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
641

Hope this is what you are looking for:

selection-screen begin of line.
  parameters:p_rad1 radiobutton group rad1 default 'X' user-command RAD,
             p_adit(10) type c.
selection-screen end of line.
selection-screen begin of line.
  parameters: p_rad2 radiobutton group rad1,
              p_adit1(1) type c.
selection-screen end of line.

at selection-screen output.
   loop at screen.
     case screen-name.
     when 'P_ADIT'.
        if not p_rad1 is initial.
           screen-active = 1.
           screen-required = 1.
        else.
           screen-active = 0.
           screen-required = 0.
        endif.
     when 'P_ADIT1'.
        if not p_rad1 is initial.
           screen-active = 0.
           screen-required = 0.
        else.
           screen-active = 1.
           screen-required = 1.
        endif.
     endcase.
     modify screen.
   endloop.

Kind Regards

Eswar

6 REPLIES 6
Read only

Former Member
0 Likes
641

Hi,

in the AT SELECTION SCREEN OUTPUT u should check wether p_audit is initial..

by using IF statements.

Read only

Former Member
0 Likes
641

write code in at selection screen on radio group rg1.

if r1 = 'X'.

loop at screen.

r2 = '0'. (disabled)

r1 = '1' (enabled).

modify screen.

endloop.

endif.

the code is vice versa for other one...

Read only

Former Member
0 Likes
641

Hi,

LOOP AT SCREEN.

if first radiao button is selected.

IF screen-group1 = 'ACC'.

screen-active = 1.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ACC1'

screen-active = 0.

MODIFY SCREEN.

ENDIF.

else.

IF screen-group1 = 'ACC'.

screen-active = 0.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ACC1'

screen-active = 1.

MODIFY SCREEN.

ENDIF.

endif.

ENDLOOP.

And for mandatory check at the at selection-screen event.

if not p_radio1 is initial and

p_adit is initial.

message e000 with 'Please enter the value'.

endif.

if p_radio1 is initial and

p_adit1 is initial.

message e000 with 'Please enter the value'.

endif.

Regards,

Satya.

Read only

Former Member
0 Likes
641

hi

good

i dont think you cant make a radio button mandatory in a selection screen , there is no such option to do that , but in webdynpro you can make a radio button mandatory.

thanks

mrutyun^

Read only

Former Member
0 Likes
641

Hi,

this can be done in the event at selection-screen output.

by default you will make one radio button will be checked, thats how radio button works, so you need not to do any extra thing here.

but making ediable and mandatory then loop at screen.and modify the screen attributes for the field.

mandatroy check can be done at at selection-screen event.

you can give error message when it is initial(if no data entered by user)/

check the below code.

REPORT  ZTEST             .


parameters: r1  radiobutton group g1 user-command ABC,
            p_adit(10),
            r2  radiobutton group g1,
            p_adit1(10).

at selection-screen output.

if r1 = 'X'.
loop at screen.
if screen-name = 'P_ADIT'.
screen-input = 1.
endif.
if screen-name = 'P_ADIT1'.
screen-input = 0.
endif.
modify screen.
endloop.
else.
loop at screen.
if screen-name = 'P_ADIT1'.
screen-input = 1.
endif.
if screen-name = 'P_ADIT'.
screen-input = 0.
endif.
modify screen.
endloop.

endif.

Regards

Vijay

Read only

Former Member
0 Likes
642

Hope this is what you are looking for:

selection-screen begin of line.
  parameters:p_rad1 radiobutton group rad1 default 'X' user-command RAD,
             p_adit(10) type c.
selection-screen end of line.
selection-screen begin of line.
  parameters: p_rad2 radiobutton group rad1,
              p_adit1(1) type c.
selection-screen end of line.

at selection-screen output.
   loop at screen.
     case screen-name.
     when 'P_ADIT'.
        if not p_rad1 is initial.
           screen-active = 1.
           screen-required = 1.
        else.
           screen-active = 0.
           screen-required = 0.
        endif.
     when 'P_ADIT1'.
        if not p_rad1 is initial.
           screen-active = 0.
           screen-required = 0.
        else.
           screen-active = 1.
           screen-required = 1.
        endif.
     endcase.
     modify screen.
   endloop.

Kind Regards

Eswar