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
648

hi all,

i have a requirement. i have two fields on the screen.

A- radio button.

B-parameter.

only wen i check the radio button the field B is to be ready for input, else greyed out.

all answers rewarded

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
626

Try this code:"

REPORT  ZTEST_NP.

PARAMETERS: P_RD1 RADIOBUTTON GROUP RD1 USER-COMMAND USR1,
            P_RD2 RADIOBUTTON GROUP RD1 DEFAULT 'X'.

PARAMETERS: P_DATE TYPE BKPF-BUDAT MODIF ID GP1.

AT SELECTION-SCREEN OUTPUT.
  IF P_RD1 IS INITIAL.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'GP1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ENDIF.

Regards,

Naimesh Patel

7 REPLIES 7
Read only

Former Member
0 Likes
626

Hi,

follow the below code.

at selction-screen output.

if radio button A = 'X'.

loop at screen.

if screen -NAME = 'Parameter field name'.

screen-INPUT = 1.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen -NAME = 'Parameter field name'.

screen-INPUT = 0.

modify screen.

endif.

endloop.

endif.

reward if needful.

Thanks,

Sreeram.

Read only

JozsefSzikszai
Active Contributor
0 Likes
626

hi Sampath,

PARAMETERS : p_rb TYPE c RADIOBUTTON GROUP 1 
                                 USER COMMAND 'UC01',
                          p_cb AS CHECKBOX MODIF ID 001.

...

AT SELECTION SCREEN OUTPUT.
IF p_rb IS NOT INITIAL.
LOOP AT screen.
IF screen-group1 EQ '001'.
screen-input = '1'.
ELSE.
screen-input = '0'.
ENDIF.
MODIFY screen.
ENDLOOP.
ENDIF.

hope this helps

ec

Read only

naimesh_patel
Active Contributor
0 Likes
627

Try this code:"

REPORT  ZTEST_NP.

PARAMETERS: P_RD1 RADIOBUTTON GROUP RD1 USER-COMMAND USR1,
            P_RD2 RADIOBUTTON GROUP RD1 DEFAULT 'X'.

PARAMETERS: P_DATE TYPE BKPF-BUDAT MODIF ID GP1.

AT SELECTION-SCREEN OUTPUT.
  IF P_RD1 IS INITIAL.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'GP1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.

    ENDLOOP.
  ENDIF.

Regards,

Naimesh Patel

Read only

0 Likes
626

thanks to all and naimesh,

i tried out ur code...'but my code is as follows..

PARAMETERS: A TYPE C AS CHECKBOX .

PARAMETERS: B(10) TYPE C MODIF ID SC1.

AT SELECTION-SCREEN OUTPUT.

if A IS INITIAL .

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

so wen i check the radio button...the field is not being active...its still greyed out..can u suggest on this?

Read only

0 Likes
626

You need to add the UESR COMMAND addition to checkbox.

REPORT  ZTEST_NP.

PARAMETERS: A TYPE C AS CHECKBOX user-command usr1.  " <<<
PARAMETERS: B(10) TYPE C MODIF ID SC1.

AT SELECTION-SCREEN OUTPUT.

if A IS INITIAL .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
626

hai friend..firrst u have to do r @& d and u have to say this wewya i triend and i am not geeting then it will be helpfuyll for u ok opther wise its of no use..

ok i am giving code..

parameterss: x( 10).

hey 1 radio button dont allow..ok..i think u ned to writE: check obox ok..

pameter: y as check box.

if y = 'x'.

loop at screen.

if screen-name = x.

screen-input = 1.

endif.

else .

screen-input = 0.

endif.

regards points if helpfull..

thanks alot..

Read only

Former Member
0 Likes
626

Hi Sampath,

Try the below code. Surely it will solve ur problem.

PARAMETERS: R_A1 RADIOBUTTON GROUP RB1 USER-COMMAND UC,

R_A2 RADIOBUTTON GROUP RB1 DEFAULT 'X'.

PARAMETERS: C_B1 AS CHECKBOX MODIF ID SCR.

AT SELECTION-SCREEN OUTPUT.

IF R_A1 IS INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SCR'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.