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
680

Hi,

I have done an Selection screen with some radiobuttons. After a radiobutton was checked, I want to show some parameter fields, specific ones for each radiobutton. (Something like another selection screen for each radiobutton).

How can I do that?

Regards Michael

1 ACCEPTED SOLUTION
Read only

vinod_gunaware2
Active Contributor
0 Likes
659

**********************************************************************

      • SELECTION SCREEN

**********************************************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_ver RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X',

p_sab RADIOBUTTON GROUP g1 .

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.

PARAMETERS: p_dwfile TYPE rlgrap-filename

DEFAULT 'C:\test1.txt' MODIF ID gr2, "#EC NOTEXT

p_upfile TYPE rlgrap-filename

DEFAULT 'C:\test.txt' MODIF ID gr3. "#EC NOTEXT

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_sab = 'X'.

IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.

screen-active = '0'.

screen-invisible = '1'.

ELSE.

screen-active = '1'.

screen-invisible = '0'.

ENDIF.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'GR3'.

screen-active = '0'.

screen-invisible = '1'.

ELSE.

screen-active = '1'.

screen-invisible = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

regards

vinod

6 REPLIES 6
Read only

vinod_gunaware2
Active Contributor
0 Likes
660

**********************************************************************

      • SELECTION SCREEN

**********************************************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_ver RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X',

p_sab RADIOBUTTON GROUP g1 .

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.

PARAMETERS: p_dwfile TYPE rlgrap-filename

DEFAULT 'C:\test1.txt' MODIF ID gr2, "#EC NOTEXT

p_upfile TYPE rlgrap-filename

DEFAULT 'C:\test.txt' MODIF ID gr3. "#EC NOTEXT

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_sab = 'X'.

IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.

screen-active = '0'.

screen-invisible = '1'.

ELSE.

screen-active = '1'.

screen-invisible = '0'.

ENDIF.

MODIFY SCREEN.

ELSE.

IF screen-group1 = 'GR3'.

screen-active = '0'.

screen-invisible = '1'.

ELSE.

screen-active = '1'.

screen-invisible = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

regards

vinod

Read only

Former Member
0 Likes
659

By default one of the radiobuttons will be checked when you create radiobuttons in a radiogroup.

for ex:

parameters:

r1 type radiobutton group 'G1',

p1 type c modif id 'ABC',

r2 type radiobutton group 'G1',

p2 type c modif id 'DEF'.

at selection-screen output.

if r1 = 'X'.

loop at screen.

if screen-group1 = 'ABC'.

screen-input = 1.

screen-invisible = 0.

modify screen.

elseif screen-group1 = 'DEF'.

screen-input = 0.

screen-invisible = 1.

modify screen.

endif.

endloop.

elseif r2 = 'X'.

loop at screen.

if screen-group1 = 'ABC'.

screen-input = 0.

screen-invisible = 1.

modify screen.

elseif screen-group1 = 'DEF'.

screen-input = 1.

screen-invisible = 0.

modify screen.

endif.

endloop.

endif.

Read only

Former Member
0 Likes
659

Hi,

You will have to use AT SELECTION SCREEN OUTPUT event.

You will have to group the screen elements using MODIF ID and then make the group visible/invisible according to which radio button is clicked.

ex.

loop at screen.

if screen-group1 = 'MODIFID1'.

screen-active = 1.

else.

screen-active = 0.

endif.

modify screen.

endloop.

Regards,

Shshank

Read only

Former Member
0 Likes
659

Hi Michael,

If radi button is 'X'.

then

call SELECTION-SCREEN scr STARTING AT x1 y1 ... ENDING AT x2 y2

endif.

I think this will help you.

Regards

Anil Kuamr K

Read only

Former Member
0 Likes
659

Hi Michael,

If radi button is 'X'.

then

call SELECTION-SCREEN scr STARTING AT x1 y1 ... ENDING AT x2 y2

endif.

I think this will help you.

if this does not suit to your requirement

please let me know your requirement in detail.

Regards

Anil Kumar K

Read only

0 Likes
659

Hi Michael,

Radiobuttons can be defined on selection screens as follows:

PARAMETERS: <butn_name> RADIOBUTTON GROUP <grp_name> USER-COMMAND <cmd_name>.

A minimum of 2 radio buttons have to be assigned to a radiobutton group.One USER-COMMAND can be assigned to all the radiobuttons in the radiobutton group.

So depending upon the group in which the selected radiobutton belongs to , we can call different selection screens.

Here is a sample code.

REPORT ZSHAIL_RADIO .

TABLES sscrfields.

PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND RADIO1,

rad3 RADIOBUTTON GROUP rad.

PARAMETERS: rad2 RADIOBUTTON group rai user-command RADIO2 ,

rad4 RADIOBUTTON group rai.

AT SELECTION-SCREEN on RADIOBUTTON GROUP RAD.

    • call the required selection screen or whatever

    • processing you want to do..

Similarly you can use other radio buttons...

Regards,

Sylendra.