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

Radiobutton on Selection Screen

Former Member
0 Likes
14,593

Hi Guys,

I have a radiobutton on selection screen, When I check the radiobutton, a field should be made inactive. This can be acheived in At selections-screen output event. But my requirement is that after checking the radiobutton, I will not press enter, then at selection screen output will not trigger. So how to change that when user is not pressing enter button.

Regards.

Harish.

1 ACCEPTED SOLUTION
Read only

Former Member
4,879

Hi,

Assign USER COMMAND to Radiobutton as follows :

PARAMETERS : RADIO1 RADIOBUTTON GROUP G! USER-COMMAND 'TEST'.

Then use CASE SY-UCOMM.

if SY-UCOMM = 'TEST'.

Set some flag.

Then in AT SELECTION-SCREEN OUTPUT check the value of flag and make the screen field inactive.

Regards,

Himanshu

Hi,

Assign USER COMMAND to Radiobutton as follows :

PARAMETERS : RADIO1 RADIOBUTTON GROUP G! USER-COMMAND 'TEST'.

Then use CASE SY-UCOMM.

if SY-UCOMM = 'TEST'.

Set some flag.

Then in AT SELECTION-SCREEN OUTPUT check the value of flag and make the screen field inactive.

Regards,

Himanshu

4 REPLIES 4
Read only

Former Member
4,880

Hi,

Assign USER COMMAND to Radiobutton as follows :

PARAMETERS : RADIO1 RADIOBUTTON GROUP G! USER-COMMAND 'TEST'.

Then use CASE SY-UCOMM.

if SY-UCOMM = 'TEST'.

Set some flag.

Then in AT SELECTION-SCREEN OUTPUT check the value of flag and make the screen field inactive.

Regards,

Himanshu

Read only

Former Member
0 Likes
4,879

Hi Harish,

Now..you need not press <b>enter</b> key.

Just select the <b>RADIO BUTTON</b> which will trigger the event what u have mentioned...with use of <b>USER-COMMAND</b>

<b>PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND ram default 'X',

rad2 RADIOBUTTON GROUP rad,

rad3 RADIOBUTTON GROUP rad.

PARAMETERS check AS CHECKBOX USER-COMMAND check.

AT SELECTION-SCREEN.

if rad1 eq 'X'.

message i888(sabapdocu) with 'First' 'ananth' 'ram' 'kkk'.

elseif rad2 eq 'X'.

message i888(sabapdocu) with 'Second'.

else.

message i888(sabapdocu) with 'Third'.

endif.

*i888(sabapdocu)

START-OF-SELECTION.

WRITE text-002.</b>

Read only

Former Member
0 Likes
4,879

Hi,

See the sample code and do accordingly:

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

PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,

pa_lifnr TYPE lfa1-lifnr MODIF ID abc,

pa_vkorg TYPE vbak-vkorg MODIF ID abc.

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.

SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,

s_date FOR gs_lfa1-erdat MODIF ID def,

s_augru FOR gs_vbak-augru MODIF ID def,

s_vbeln FOR gs_vbak-vbeln MODIF ID def.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

reward if useful

regards,

ANJI

Read only

Former Member
0 Likes
4,879

Hi,

Use <b>User-command</b> addition for radio button.

selection-screen begin of block b1 with frame.

PARAMETERS:

<b>rad1 RADIOBUTTON GROUP rad USER-COMMAND radio.</b>

SELECT-OPTIONS:

s_carrid FOR spfli-carrid MODIF ID sl1,

s_connid FOR spfli-connid MODIF ID sl1.

PARAMETERS:

rad2 RADIOBUTTON GROUP rad.

SELECT-OPTIONS:

s_fldate FOR sflight-fldate MODIF ID sl2.

selection-screen end of block b1.

<b>at selection-screen output.</b>

<b>IF rad1 = 'X'.

IF screen-group1 = 'SL2'.

screen-active = 0.

  • ELSEIF screen-group1 = 'SL1'.

  • screen-active = 1.

ENDIF.

ELSEIF rad2 = 'X'.

IF screen-group1 = 'SL2'.

screen-active = 1.

  • ELSEIF screen-group1 = 'SL1'.

  • screen-active = 0.

ENDIF.

ENDIF.</b>

MODIFY SCREEN.

ENDLOOP.

Reward if it helps you.

Regards,

Sandhya