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

Radio button in module pool

aakash-neelaperumal
Active Participant
0 Likes
1,770

In ordinary report programs, if we want to change screen value according to the selection of radion button, we use user command and at user command options.

But how do i do it in module pool programming.

Like in module pool if i select one radio button some input fields should be non edidtable.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,253

Hi,

DATA: OK_CODE TYPE SY-UCOMM,

PROCESS_CODE TYPE SY-UCOMM.

<b>In PAI</b>

MODULE USER_COMMAND_0100.

PROCESS_CODE = OK_CODE.

CLEAR OK_CODE.

CASE PROCESS_CODE.

WHEN 'RADIO'. " RADIO is the function code for the radibuttons.

IF R1 = 'X'.

R2 = SPACE.

ELSEIF R2 = 'X'.

R1 = SPACE.

ENDIF.

ENDCASE.

Hope this helps.

Reward if helpful.

Regards,

Sipra

7 REPLIES 7
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,253

Hi,

If you are using CALL SCREEN to call your screen then each screen will have PAI and PBO events. You can create flowlogic for your screen. All that is done using user command can be done in the modules that you define in PAI.

Regards,

Sesh

Read only

Former Member
0 Likes
1,253
1. double click on radiobutton and assign one group to that.
2. In PAI 
 
  if rad1 eq 'X'.
    loop at screen.
     if screen-group1 = 'GRP'.
       if screen-name eq 'FIEL1'.
          screen-input = '0'.
          modify screen. 
       endif.
    endif.
endloop.
endif.
Read only

0 Likes
1,253

When changing the radio button, no even is triggered for me.

Read only

Former Member
0 Likes
1,253

Hi ,

In the PAI you can check the radiobutton data and in the pbo based on that you can code under

if r1 = 'X'

loop at screen .

screen validations

modify screen .

endloop.

Please reward if useful.

Read only

Former Member
0 Likes
1,253

Hi,

In Flow Logic PAI double click on Module user_command.

in that module check with your radio button name equal to 'x'. If yes then write in your logic whatever you would like to do.

Thanks,

Prashanth

Read only

Former Member
0 Likes
1,253

hi,

create screen groups for the input boxes or any other objects in your screen.

in PAI.

when radiobuuton1 = 'X'.

flag = 1.

in PBO.

MODULE SCREEN_INPUT.

if flag = 1.

loop at screen.

if screen-group1 = <group-name>.

screen-input = '0'

modify screen.

endif.

endif.

endmodule.

hope this helps.

Read only

Former Member
0 Likes
1,254

Hi,

DATA: OK_CODE TYPE SY-UCOMM,

PROCESS_CODE TYPE SY-UCOMM.

<b>In PAI</b>

MODULE USER_COMMAND_0100.

PROCESS_CODE = OK_CODE.

CLEAR OK_CODE.

CASE PROCESS_CODE.

WHEN 'RADIO'. " RADIO is the function code for the radibuttons.

IF R1 = 'X'.

R2 = SPACE.

ELSEIF R2 = 'X'.

R1 = SPACE.

ENDIF.

ENDCASE.

Hope this helps.

Reward if helpful.

Regards,

Sipra