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
1,149

hi

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

PARAMETERS : rd1 RADIOBUTTON GROUP rg1.

SELECT-OPTIONS: cpudt FOR bkpf-cpudt.

PARAMETERS: rd2 RADIOBUTTON GROUP rg2.

SELECT-OPTIONS: budat FOR bkpf-budat.

PARAMETERS: rd3 RADIOBUTTON GROUP rg3.

SELECT-OPTIONS: augdt FOR bseg-augdt .

PARAMETERS: gjahr LIKE bkpf-gjahr.

SELECTION-SCREEN END OF BLOCK b1.

This is what iam giving in the selection screen

know if click the first radiobotton then the selection field under the rest of the two radio-buttons have to in inactive mode,

similary it should in the same with other radiobottons

9 REPLIES 9
Read only

Former Member
0 Likes
870

AT SELECTION-SCREEN OUTPUT.

if rad1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'PAR1' or SCREEN-NAME = 'PAR2'.

SCREEN-INPUT = 0. "TO make it read only

SCREEN-ACTIVE = 0. " TO Hide based on your requirement use any one line

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

Read only

Former Member
0 Likes
870

Hi,

change all the radio buttons to same group as R1

and then,

at selection screen output.

if radio1 = 'x'.

loop at screen.

if screen-name = 'SELECTIONSCREEN1-LOW'.

SCREEN-input = 0.

modify screen.

endif.

if screen-name = 'SELECTIONSCREEN1-high'.

SCREEN-input = 0.

modify screen.

endif.

endloop.

endif.

Do the same for other radi buttons and selection screen fields,

Regards,

ashok...

Read only

Former Member
0 Likes
870

Hi Vamsi

Change your selection screen as below and write the below code,

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

PARAMETERS : rd1 RADIOBUTTON GROUP rg1 user-command US1.

SELECT-OPTIONS: cpudt FOR bkpf-cpudt.

PARAMETERS: rd2 RADIOBUTTON GROUP rg2 user-command US2.

SELECT-OPTIONS: budat FOR bkpf-budat.

PARAMETERS: rd3 RADIOBUTTON GROUP rg3 user-command US3.

SELECT-OPTIONS: augdt FOR bseg-augdt .

PARAMETERS: gjahr LIKE bkpf-gjahr.

SELECTION-SCREEN END OF BLOCK b1.

              • This code has to be written in AT SELECTION-SCREEN OUTPUT event of you flow

AT SELECTION-SCREEN OUTPUT.

Loop at screen.

if rb1 is not initial.

if screen-name = 'BUDAT' or screen-name = 'AUGDT'.

screen-active = 0.

modify screen.

endif.

endif

if rb2 is not initial.

if screen-name = 'CPUDT' or screen-name = 'AUGDT'.

screen-active = 0.

modify screen.

endif.

endif

if rb3 is not initial.

if screen-name = 'BUDAT' or screen-name = 'CPUDT'.

screen-active = 0.

modify screen.

endif.

endif

endloop.

Read only

0 Likes
870

hello ramesh

friend please check it iam getting an error while executing the same code

Read only

Former Member
0 Likes
870

Hi,

try this

you have to give the same radio buttongroup so that the user can select

only one radio button

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

PARAMETERS : rd1 RADIOBUTTON GROUP rg1.

SELECT-OPTIONS: cpudt FOR bkpf-cpudt.

PARAMETERS: rd2 RADIOBUTTON GROUP rg1

SELECT-OPTIONS: budat FOR bkpf-budat.

PARAMETERS: rd3 RADIOBUTTON GROUP rg1

SELECT-OPTIONS: augdt FOR bseg-augdt .

PARAMETERS: gjahr LIKE bkpf-gjahr.

SELECTION-SCREEN END OF BLOCK b1.

and use the

at selection-screen.

if rd1 = 'X'

loop at screen.

if screen-name = 'BUDAT'.

screen-input = 0.

modify screen.

endif.

if screen-name = 'AUGDT.

screen-input = 0.

modify screen.

endif.

endloop.

elseif rd2 = 'X'

Use the above code but change the fields

elseif rd3 = 'X'.

Use the above code but change the fields

endif.

thanks & regards,

venkatesh

Read only

Former Member
0 Likes
870

Hi vamshi,

Try with this code u can understand easily.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-007.

PARAMETER:p_radio RADIOBUTTON GROUP gr1 USER-COMMAND scr11,

p_radio2 RADIOBUTTON GROUP gr1,

p_radio3 RADIOBUTTON GROUP gr1 DEFAULT 'X'.

SELECTION-SCREEN END OF BLOCK 1.

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

PARAMETER: p_file1 LIKE rlgrap-filename MODIF ID mm1.

SELECTION-SCREEN END OF BLOCK 2.

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

PARAMETER: p_file2 LIKE rlgrap-filename MODIF ID mm2.

SELECTION-SCREEN END OF BLOCK 3.

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

PARAMETER: p_file3 LIKE rlgrap-filename MODIF ID mm3.

PARAMETER: p_file4 LIKE rlgrap-filename MODIF ID mm3.

SELECTION-SCREEN END OF BLOCK 4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_radio IS NOT INITIAL.

IF screen-group1 = 'MM2' OR screen-group1 = 'MM3'.

IF screen-name = 'P_FILE2' OR screen-name = 'P_FILE3' OR screen-name = 'P_FILE4' .

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

ENDIF.

IF p_radio2 IS NOT INITIAL.

IF screen-group1 = 'MM1' OR screen-group1 = 'MM3'.

IF screen-name = 'P_FILE1' OR screen-name = 'P_FILE3' OR screen-name = 'P_FILE4' .

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

ENDIF.

IF p_radio3 IS NOT INITIAL.

IF screen-group1 = 'MM1' OR screen-group1 = 'MM2'.

IF screen-name = 'P_FILE1' OR screen-name = 'P_FILE2'.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

screen-active = 0.

screen-input = 0.

screen-invisible = 1.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Thanks,CSR

Read only

Former Member
0 Likes
870

Hi,

see this similar example.

PARAMETERS:check RADIOBUTTON GROUP rad1 USER-COMMAND RAD DEFAULT 'X',

field RADIOBUTTON GROUP rad1.

PARAMETERS:field1(10),field2(10).

PARAMETERS:check1 as CHECKBOX,

check2 AS CHECKBOX.

AT SELECTION-SCREEN OUTPUT.

if check = 'X'.

LOOP AT SCREEN.

if screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

elseif FIELD = 'X'.

LOOP AT SCREEN.

if screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

endif.

at SELECTION-SCREEN.

case sscrfields-ucomm.

when 'RAD'.

if check = 'X'.

LOOP AT SCREEN.

if screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

elseif FIELD = 'X'.

LOOP AT SCREEN.

if screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

endif.

ENDCASE.

rgds,

bharat.

Read only

Former Member
0 Likes
870

Hi ,

Try this

PARAMETERS : rd1 RADIOBUTTON GROUP rg1 <b>USER-COMMAND radio</b>.

SELECT-OPTIONS: cpudt FOR bkpf-cpudt <b>MODIF ID gr1</b>.

PARAMETERS: rd2 RADIOBUTTON GROUP rg2.

SELECT-OPTIONS: budat FOR bkpf-budat <b>MODIF ID gr2</b>.

PARAMETERS: rd3 RADIOBUTTON GROUP rg3.

SELECT-OPTIONS: augdt FOR bseg-augdt <b> MODIF ID gr3</b>.

PARAMETERS: gjahr LIKE bkpf-gjahr <b>MODIF ID gr3</b>.

SELECTION-SCREEN END OF BLOCK b1.

<b>AT SELECTION-SCREEN OUTPUT.

IF rd1 = 'X'.

LOOP AT SCREEN.

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

screen-input = '0'.

screen-active = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IF rd2= 'X'.

LOOP AT SCREEN.

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

screen-input = '0'.

screen-active = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

IFrd3= 'X'.

LOOP AT SCREEN.

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

screen-input = '0'.

screen-active = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.</b>

Read only

Former Member
0 Likes
870

HI

USE THIS CODE

tables : bkpf,bseg.

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

PARAMETERS : r1 RADIOBUTTON GROUP rg1 DEFAULT 'X' USER-COMMAND uc1.

SELECT-OPTIONS: cpudt FOR bkpf-cpudt modif id s1.

PARAMETERS: r2 RADIOBUTTON GROUP rg1.

SELECT-OPTIONS: budat FOR bkpf-budat modif id s2.

SELECTION-SCREEN END OF BLOCK b1.

******END OF SELECTION SCREEN DESIGN****************

************SCREEN MODIFICATIONS*******************

AT SELECTION-SCREEN output .

LOOP AT SCREEN .

IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2' .

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

********END OF SCREEN MODIFICATIONS*****************

REWARD IF USEFULL