cancel
Showing results for 
Search instead for 
Did you mean: 

select-options invisible.

Former Member
0 Kudos

hi

i have some 15 select options in my screen.

in my report i want to hide some select options depending on some condition.

i have done this in at selection screen output.

for making the other select-options invisible.

i am using

loop at screen.

screen-invible = 1.

screen-active = 0.

modify screen.

endloop.

can you tell me any other way to make the select-options invisible other the 'no display' and the above logic.

Thanks in advance.

Accepted Solutions (0)

Answers (8)

Answers (8)

alessandroieva
Active Participant
0 Kudos

HI Lavaya,

PARAMETER: P_GJAHR TYPE GJAHR.

SELECT-OPTIONS:

               SO_1 TYPE ... MODIF ID G1,

               SO_2 TYPE ... MODIF ID G2,

               SO_3 TYPE ... MODIF ID G3,

AT SELECTION-SCREEN ON p_gjahr.

   LOOP AT SCREEN.

     IF p_gjahr = '2012'.

      

       IF screen-group1 = 'G1'.       

         screen-active = 1.  "->ACTIVE

         MODIFY SCREEN.       

       ELSE.       

         screen-active = 0. "->INACTIVE

         MODIFY SCREEN.

       ENDIF.

      

      

       elseif  p_gjahr = '2013'.

        

       IF screen-group1 = 'G2'.       

         screen-active = 1.

         MODIFY SCREEN.       

       ELSE.       

         screen-active = 0.

         MODIFY SCREEN.

       ENDIF. 

        

        

     ENDIF.

    

   ENDLOOP.

Former Member
0 Kudos

Hi,

try AT SELECTION-SCREEN OUTPUT. try to explore the structure  screen.

Former Member
0 Kudos

Hi Lavanya

Pls try the below example

selection-screen : begin of block b2.

parameters       :  rgb1 type c radiobutton group rgb default 'X' modif id mod1 user-command sel  ,                          

                         rgb2 type c radiobutton group rgb modif id mod2.

selection-screen : end of block b2 .


selection-screen : begin of block b1 .

select-options   : s_bukrs for t001w-ekorg modif id m1.

select-options   : s_werks for chvw-werks modif id m0 .

selection-screen : end of block b1

at selection-screen output. 

if rgb1 = 'X'.    

loop at screen.     

if screen-group1 = 'M0'.       

          screen-input = 1.       

          screen-active = 1.      

endif.     

modify screen.      

if screen-group1 = 'M1'.        

        screen-input = 0.        

        screen-active = 0.      

endif.      

modify screen.     

endloop.  

endif.   

if rgb2 = 'X'.    

loop at screen.      

        if screen-group1 = 'M0'.        

        screen-input = 0.         

        screen-active = 0.         

        screen-invisible = 1.      

       endif.       

if screen-group1 = 'M1'.        

          screen-input = 1.

          screen-active = 1.      

endif.      

modify screen.    

endloop.  

endif.

Regards

Suganya

Former Member
0 Kudos

Hi Lavanya,

You can assign all the select options under a group using a MODIF ID addition to the select option using the syntax:

SELECT-OPTIONS:

S_PTYPE FOR SAPLANE-PLANETYPE MODIF ID ABC.

While you use AT SELECTION-SCREEN OUTPUT, if the condition holds true, then check if the group1 equals the modif id and then make it invisible.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF condition is true.

LOOP AT SCREEN.

IF screen-group1 = 'ABC'. "<MODIF ID>

screen-output = 0.

screen-input = 0.

screen-invisible = 1.

Modify SCREEN.

ENDIF.

ENDLOOP.

ELSE.

<Do the converse>

ENDIF.

Former Member
0 Kudos

I believe working with the MODIF ID is the right solution indeed. It worked in a program of mine.

andreas_mann3
Active Contributor
0 Kudos

Hi,

better work with screen-groups:

SELECT-OPTIONS: 
                GJAHR FOR ANLC-GJAHR MODIF ID Z,
                BUKRS FOR ANLC-BUKRS MODIF ID Z,
                ANLN1 FOR ANLC-ANLN1 MODIF ID A,
...

    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'Z'.
        SCREEN-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

Andreas

former_member188685
Active Contributor
0 Kudos

Use Radio Buttons or Check box and Based on Your requirement you try to hide or Disable.

vijay

Former Member
0 Kudos

Hi Lavanya,

I don't think there is another method for hiding select options other than using No Display and Loop at Screen.

Regards,

Sudhakar.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hello ,

       i believe that you have to use AT SELECTION-SCREEN OUTPUT.

NOT AT SELECTION-SCREEN. THIS IS PAI EVENT.

Thanks

Sabyasachi

Former Member
0 Kudos

that is correct, AT SELECTION-SCREEN OUTPUT is where you modify the screen. both the technical and the logically correct place.

former_member188685
Active Contributor
0 Kudos

This message was moderated.