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

REGARDING RADIOBUTTON

Former Member
0 Likes
810

HI GURUS,

I have 2 groups.in one group 2 radiobuttons,pdhplant,pp plant

in 2nd group , ihave 4 radio buttons,offspec,linespec,line1&line2.

my requirement is if i click,pdh plant then all the 2nd group radio buttons will disable mode& if i select pp plant then again

my 2nd group radiobuttons in actibe state.

how to achive , please help me.

thanks

subhasis

9 REPLIES 9
Read only

Former Member
0 Likes
734

Hi,

Try using the below code.

SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME.

PARAMETER: P_pdh RADIOBUTTON GROUP GRP1 USER-COMMAND ucomm DEFAULT 'X',

P_pp RADIOBUTTON GROUP GRP1.

SELECTION-SCREEN: END OF BLOCK BLK1.

SELECTION-SCREEN: BEGIN OF BLOCK BLK2 WITH FRAME.

PARAMETER: P_offsp RADIOBUTTON GROUP GRP2 USER-COMMAND ucomm,

P_linesp RADIOBUTTON GROUP GRP2,

P_line_1 RADIOBUTTON GROUP GRP2,

p_line_2 RADIOBUTTON GROUP GRP2.

SELECTION-SCREEN: END OF BLOCK BLK2.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF P_pdh = 'X'.

IF SCREEN-NAME = 'P_OFFSP' or SCREEN-NAME ='P_LINESP' or screen-name = 'P_LINE_1' or screen-name = 'P_LINE_2'.

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward if useful & close the thread once answered.

Regards,

Sayee

Read only

nivaskumar2
Explorer
0 Likes
734

SELECTION-SCREEN BEGIN OF BLOCK rad1

WITH FRAME TITLE text-002.

PARAMETERS r1 RADIOBUTTON GROUP gr1.

PARAMETERS r2 RADIOBUTTON GROUP gr1.

SELECTION-SCREEN END OF BLOCK rad1.

SELECTION-SCREEN BEGIN OF BLOCK rad2

WITH FRAME TITLE text-002.

PARAMETERS r3 RADIOBUTTON GROUP gr2.

PARAMETERS r4 RADIOBUTTON GROUP gr2.

SELECTION-SCREEN END OF BLOCK rad2.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF r1 = 'X'.

CLEAR: r2.

IF SCREEN-NAME = 'r3' or SCREEN-NAME ='r4' .

SCREEN-INPUT = 0.

ELSE.

SCREEN-INPUT = 1.

ENDIF.

MODIFY SCREEN.

ELSEIF r2 = 'X'.

IF SCREEN-NAME = 'r3' or SCREEN-NAME ='r4' .

SCREEN-INPUT = 1.

ELSE.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

former_member655569
Participant
0 Likes
734

Hi,

Try the code below.

----


  • SCREEN GUI

----


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

PARAMETERS : pdhplant RADIOBUTTON GROUP rb1 USER-COMMAND rad1 DEFAULT 'X',

ppplant RADIOBUTTON GROUP rb1 ." OTHERS

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS : offspec RADIOBUTTON GROUP rb2 MODIF ID oth ,

linespec RADIOBUTTON GROUP rb2 MODIF ID oth,

line1 RADIOBUTTON GROUP rb2 MODIF ID oth,

line2 RADIOBUTTON GROUP rb2 DEFAULT 'X' MODIF ID oth.

SELECTION-SCREEN END OF BLOCK b2.

----


  • AT SELECTION-SCREEN OUTPUT

----


AT SELECTION-SCREEN OUTPUT.

IF pdhplant EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'OTH'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

reward points if this is useful..

Read only

Former Member
0 Likes
734

The code given by ppl above helps u a lot....u need to know one thing .

Screen can be compared to an internal table. The fields of the current screen will be stored

in this SCREEN table.

Overview of all SCREEN fields:

Field Length Type Meaning

SCREEN-NAME 30 C Field name

SCREEN-GROUP1 3 C Analysis of

Modif group 1

SCREEN-GROUP2 3 C Analysis of

Modif group 2

SCREEN-GROUP3 3 C Analysis of

Modif group 3

SCREEN-GROUP4 3 C Analysis of

Modif group 4

SCREEN-REQUIRED 1 C Required field

SCREEN-INPUT 1 C Field ready for input

SCREEN-OUTPUT 1 C Displayed field

SCREEN-INTENSIFIED 1 C Field intensified

SCREEN-INVISIBLE 1 C Field invisible

SCREEN-LENGTH 1 X Field length

SCREEN-ACTIVE 1 C Field active

ie when u say screen-input = 0, it implies u are making tht particular field not eligible for

"input" , it goes jus into the "display" mode, wont take any inputs(disabled).

U can make the required fields as "input" or "output" and then say "Modify", this ll reflect in ur

"screen" table. U can check this during "debugging".

Try out.

Reward points if useful.

Regards,

Ramya Shree

Edited by: Ramya Shree on Mar 17, 2008 12:29 PM

Read only

Former Member
0 Likes
734

Hi,

Try the below code.



parameters: pdhplant radiobutton group g1 user command u1.
parameters: ppplant radiobutton group g1.
 
parameters: offspec radiobutton group g2 modif id m1.
parameters: linespec radiobutton group g2 modif id m1.
parameters: line1 radiobutton group g2 modif id m1.
parameters: line2 radiobutton group g2 modif id m1.
 
at selection-screen output.
  loop at screen.
    if screen-group1 = 'M1'.
      if pdhplant = 'X'.
"screen-active = 0 will make it invisible
        screen-active = 0.  
      else.
"screen-active = 1 will make it visible and available for i/p
        screen-active = 1.  
      endif.
      modify screen.
    endif.
  endloop.
endif.

Hope this helps.

Thanks,

Balaji

Read only

Former Member
0 Likes
734

Hi,

Try This Code



*FIRST Block
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETER : pdh_plnt RADIOBUTTON  GROUP g1 DEFAULT 'X' USER-COMMAND change,
            pp_plant  RADIOBUTTON GROUP g1.
SELECTION-SCREEN:END OF BLOCK blk2.

*SECOND Block
SELECTION-SCREEN : BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.
PARAMETER : offspec RADIOBUTTON   GROUP g2 MODIF ID m3,              "Variant Part
            linespec RADIOBUTTON  GROUP g2 MODIF ID m3 ,
            line1 RADIOBUTTON     GROUP g2 MODIF ID m3,
            line2 RADIOBUTTON     GROUP g2 MODIF ID m3.
SELECTION-SCREEN:END OF BLOCK blk3.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'M3'.
      IF pdh_plnt EQ 'X'.

        screen-INPUT = 0.
      ELSE.

        screen-INPUT = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

regards

Sandipan

Read only

Former Member
0 Likes
734

Hi,

Try this one

*Declare the parameters fist

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: PA_PDHP RADIOBUTTON GROUP RG1 USER-COMMAND ACTION,

PA_PPP RADIOBUTTON GROUP RG1.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN END OF BLOCK B2 WITH FRAME TITLE TEXT-002.

PARAMETERS: PA_OFFSP RADIOBUTTON GROUP RG2,

PA_LINSP RADIOBUTTON GROUP RG2,

PA_LINE1 RADIOBUTTON GROUP RG2,

PA_LINE2 RADIOBUTTON GROUP RG2.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT. " (to modify the *characteristics of selection screen fields)

*here we are using SCREEN structure which contains the *attributes of fields

IF PA_PDHP EQ 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'RG2'.

SCREEN-ACTIVE = 0. "ACTIVE is a field in a SCREEN *structure which contains the visibility characteristics

MODIFY SCREEN.

ENDLOOP.

ELSE IF PA_PPP EQ 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP = 'RG2'.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
734

Hi subhasis,

parameters: pdhplant radiobutton group g1 user command u1.

parameters: ppplant radiobutton group g1.

parameters: offspec radiobutton group g2 modif id m1.

parameters: linespec radiobutton group g2 modif id m1.

parameters: line1 radiobutton group g2 modif id m1.

parameters: line2 radiobutton group g2 modif id m1.

at selection-screen output.

if pdhplant = 'X'.

loop at screen.

if screen-group1 = 'M1'.

screen-active = 0.

continue.

modify screen.

endif.

endloop.

elseif ppplant = 'X'.

loop at screen.

if screen-group1 = 'M1'.

screen-active = 1.

modify screen.

endif.

endloop.

endif.

This will resolve your problem

Dont forget to Reward points

Read only

Former Member
0 Likes
734

This message was moderated.