Skip to Content
author's profile photo Former Member
Former Member

Check box visible in tabstrip of module pool

Hi,

I have 3 radiobuttons namely R1,R2 and R3. And also 2 checkboxes C1 and C2.

These are all placed in tab1.

Whenever i select R3,checkboxes should be visible and whenever i select R1 or R2,the check boxes should be

invisible.How to achive this?.

Thanks,

Sri

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 09:20 AM

    Hello,

    Try this I have tested the same on a small program.

    On your screen you have 3 radio buttons R1, R2 and R3 and 2 checkboxes C1 and C2. Define group on the radio buttons and assign a FCT code say F1 to it.

    Now in the PBO inside the module code as follows

    if r3 = 'X'.
      loop at screen.
        if screen-name = 'C1' or screen-name = 'C2'.
          screen-invisible = 0.
          modify screen.
        endif.
      endloop.
    else.
      loop at screen.
        if screen-name = 'C1' or screen-name = 'C2'.
          screen-invisible = 1.
          modify screen.
        endif.
      endloop.
    endif.
    

    When you click on R3 C1 and C2 will be visible but as soon as you select the R1 or R2 radiobuttons C1 and C2 will be invisible.

    Regards,

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 06:58 AM

    HI Sri,

    Use the 'LOOP AT SCREEN' statement in the PAI event. Here is a sample code.

    LOOP AT SCREEN.

    if c1 = 'X'.

    Screen-active = 'X'.

    else.....

    Go through the documentation of the statement also.

    Regards,

    Amuktha

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sridhar Meesala

      Hi Again ,

      I gave my initial solution based on report eventing . But in module pool once you do a user action the processing will again load the contents from PBO so the check boxes will again be visible . I doubt if we can make them invisible immediately after the user action cause the place holders for check boxes will hold true. Never tried it but im waiting for a better alternative .

      Br,

      Vijay.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 07:02 AM

    Hi Its simple..

    REPORT ZEX_VIJ1.

    PARAMETERS:r1 RADIOBUTTON GROUP gr1 USER-COMMAND ucom1 DEFAULT 'X',

    r2 RADIOBUTTON GROUP gr1,

    r3 RADIOBUTTON GROUP gr1.

    PARAMETERS:c1 AS CHECKBOX,

    c2 AS CHECKBOX.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF r1 = 'X' or r2 = 'X'.

    IF screen-name = 'C1'.

    screen-active = '0'.

    MODIFY SCREEN.

    ENDIF.

    IF screen-name = 'C2'.

    screen-active = '0'.

    MODIFY SCREEN.

    ENDIF.

    ELSEIF r3 = 'X'.

    IF screen-name = 'C1'.

    screen-active = '1'.

    MODIFY SCREEN.

    ENDIF.

    IF screen-name = 'C2'.

    screen-active = '1'.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    Br,

    Vijay.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2010 at 07:03 AM

    Hello Sri,

    Group the CheckBoxes, group1 with CHK, so that the loop process only the check box screen elements.

    If RadioButtons have function code : RADIO,

    write a PBO module :

    DATA: r1(1) TYPE c, r2(1) TYPE c, r3(1) TYPE c.
    CASE ok_code.
      WHEN 'RADIO'.
        IF r1 = 'X'. 
          LOOP AT SCREEN WHERE group1 = 'CHK'.
            screen-active = '1'.
            screen-invisible = '0'.
           MODIFY SCREEN.
          ENDLOOP.
        ELSEIF r2 = 'X' or r3= 'X'. 
          LOOP AT SCREEN WHERE group1 = 'CHK'.
            screen-active = '0'.
            screen-invisible = '1'.
           MODIFY SCREEN.
          ENDLOOP.
    ENDCASE.
    

    Cheers,

    Remi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 07:03 AM

    Hello,

    Try something like mentioned below

    Say RB1,RB2 and RB3 are the radio buttons and they are assigned a group g1. Also assign a function code the group say USR

    If ch1 and ch2 are the checkboxes, double click on each and assign say 111 to group1 in the screen attributes.

    Now in the PBO of the subscreen on which you have inserted the check box and radio buttons

    PBO
    module disable output.
    

    In the module write

    if rb3 = 'X'.
     loop at screen.
      if screen-group1 = '111'.
       screen-invisible = 0.
       modify screen.
      endif.
     endloop.
    endif.
    

    You may have to modify the code a little bit as I have not tested it yet but this is how it can be attained.

    Regards,

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 07:04 AM

    >

    > Hi,

    > I have 3 radiobuttons namely R1,R2 and R3. And also 2 checkboxes C1 and C2.

    > These are all placed in tab1.

    > Whenever i select R3,checkboxes should be visible and whenever i select R1 or R2,the check boxes should be

    > invisible.How to achive this?.

    >

    >

    > Thanks,

    > Sri

    Hi

    You will have to use user comman and modif id in the selection screen build up

    as below.

    selection-screen begin of block blk0 with frame title text-000.
    
      selection-screen begin of block blk1 with frame title text-001.
    
      parameter : p_sbom as checkbox modif id sl1 user-command ucom.
    
      selection-screen skip 1.
      parameter   p_file1(128)   type c modif id sl1.
    
      selection-screen end of block blk1.
    
      selection-screen begin of block blk2 with frame title text-002.
    
      parameter : p_rpbom as checkbox modif id sl2 user-command ucom.
      selection-screen skip 1.
    
      parameter   p_file2(128)   type c modif id sl2.
    
      parameter   p_file5(128)   type c modif id sl2.
    
      selection-screen end of block blk2.
    
      selection-screen begin of block blk3 with frame title text-003.
    
      parameter : p_sbom1 as checkbox modif id sl3 user-command ucom.
    
      selection-screen skip 1.
      parameter   p_file3(128)   type c modif id sl3.
    
    *SELECTION-SCREEN SKIP 1.
    *PARAMETER : p_active     RADIOBUTTON GROUP pr,
    *            p_inact      RADIOBUTTON GROUP pr.
    
      selection-screen end of block blk3 .
    
      selection-screen begin of block blk4 with frame title text-004.
    
      parameter : p_mm as checkbox modif id sl4 user-command ucom.
      selection-screen skip 1.
      parameter   p_file4(128)   type c modif id sl4.
    
      selection-screen end of block blk4.
    
      selection-screen end of block blk0.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 07:06 AM

    herez a rough solution,

    in PBO, in loop at screen,

    check the status of radiobutton R3.

    if it is set, set a flag - say (rb3_flg = 1)

    check the status of radiobutton R2.

    if it is set, set a flag - say (rb2_flg = 1)

    check the status of radiobutton R1.

    if it is set, set a flag - say (rb1_flg = 1)

    now when the loop comes on checkbox(c1),

    if rb3_flg = 1.

    c1 = inactive.

    clear rb3_flg.

    endif.

    ... same for c2.

    endloop.

    Regards,

    Sumit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 09:19 AM

    hi,

    if r1 = 'X' or r2 = 'X'.

    loop at screen.

    if screen-name = 'C1'or screen-name = 'C2'.

    screen-active = 0.

    modify screen.

    endif.

    endloop.

    else.

    if screen-name = 'C1'or screen-name = 'C2'.

    screen-active = 1.

    modify screen.

    endif.

    endloop.

    regards,

    sakshi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 09:46 AM

    Thank U all,it is working fine now.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.