Application Development 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: 

Module pool logic

Former Member
0 Kudos

Hello Friends,

I am new to ABAP, check the following image

<a href="http://server6.theimagehosting.com/image.php?img=LOGIC1s.JPG">Image</a>

I want to create a module pool program, so that when I click on FAIL radio button, the other radio button group must be disable or deactive(should not take any input values).

Please explain in detail.

Thank You.

1 ACCEPTED SOLUTION

dani_mn
Active Contributor
0 Kudos

HI,

in module of PBO flow logic do like this.

first assign the all radio buttons you want to disable to a group such as 'DIS'. and then code like that.

MODULE disable_radio output.

IF fail = 'X'

LOOP AT SCREEN.

if screen-group1 = 'DIS'.

screen-input = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

ENDIF.

Regards,

ENDMODULE.

6 REPLIES 6

Former Member
0 Kudos

Hi,

When you click the Radio button then in the PAI event,you can loop at screen internal table, check for that radio button group and then disable it.Try this out.

dani_mn
Active Contributor
0 Kudos

HI,

in module of PBO flow logic do like this.

first assign the all radio buttons you want to disable to a group such as 'DIS'. and then code like that.

MODULE disable_radio output.

IF fail = 'X'

LOOP AT SCREEN.

if screen-group1 = 'DIS'.

screen-input = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

ENDIF.

Regards,

ENDMODULE.

Former Member
0 Kudos

Hello Wasim.

How to assign the radio buttons to a group as 'DIS'.

I do not know the syntax.

0 Kudos

select all the radio buttons and right click on it and define Radiobutton Group - > Define.

Thanks

Gopi

Former Member
0 Kudos

Hello,

I can't understand your question.

Case 1:

=======

But, assuming that you have two radio buttons and you want to select only one, in such case declare radio button as a group.

PARAMETERS: p_rad1 radiobutton group rad default 'X',

p_rad2 radiobutton group rad.

The above declarations will facilitate you to select only one radio button at a time.

Case 2:

=======

Assume that you have two groups and in each group you have 2 radio buttons.

PARAMETERS: p_rad1 radiobutton group rad default 'X',

p_rad2 radiobutton group rad,

p_rad3 radiobutton group rad1 default 'X',

p_rad4 radiobutton group rad1.

Now if you want to disable group2 depending on some value then do the logic in AT-SELECTION SCREEN OUTPUT,

LOOP AT SCREEN.

IF 'do the check' and screen-group1 EQ RAD2.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Regs,

Venkat

Former Member
0 Kudos

hi,

For first set of radiobutton group, assign a function code. You can assign it in the properties of the radiobutton which you get when you double click on radiobutton ( similar to the way we do for push buttons).

Now, in PAI.

  
  if rb2 = 'X'.
    v_second = 'X'.
  endif.

Now in PBO.

  if v_second = 'X'.
    loop at screen.
      if screen-name = 'RB3' or 
         screen-name = 'RB4' or 
         screen-name = 'RB5'.  
       screen-input = '0'.
       modify screen.
    endloop.
  else.
    loop at screen.
      if screen-name = 'RB3' or 
         screen-name = 'RB4' or 
         screen-name = 'RB5'.  
       screen-input = '1'.
       modify screen.
    endloop.
  endif.

As you have set a function code for the first radiobutton group, PAI gets triggered as soon as you select any of the two radiobuttons.

Regards,

Sailaja.