Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Modifying selection screen block using application toolbar pushbutton

$
0
0

Hi Gurus,

 

Please help know how to modify the selection screen block on click of the application toolbar push button. I want to hide block2 and block3 on click of button1 and so on. Below is my code but for some reason its not working, i tried several options like using 'AT SELECTION-SCREEN OUTPUT" event as well. However please find my code below and let me know how can i achieve this. I tried searching ABAP forum too.

 

TABLES:MARA,SSCRFIELDS.

SELECTION-
SCREENbeginofBLOCK b1 withFRAMETITLEtext-001.
SELECT-OPTIONS:s_option1 for mara-matnr MODIF ID M1,
                s_option2
for
mara-matnr MODIF ID M1.
SELECTION-
SCREENendofBLOCK b1.

SELECTION-
SCREENbeginofBLOCK b2 withframeTITLEtext-002.
select-OPTIONS:s_option3 for
mara-matnr MODIF ID M2,
                s_option4
for
mara-matnr MODIF ID M2.
SELECTION-
SCREENendofblock b2.

SELECTION-
SCREENbeginofBLOCK b3 WITHFRAMETITLEtext-003.
Select-OPTIONS:s_option5 for
mara-matnr MODIF ID M3,
                s_option6
for
mara-matnr MODIF ID M3.
SELECTION-
SCREENendofBLOCK b3.

SELECTION-
SCREEN: FUNCTIONKEY1,
                  
FUNCTIONKEY2,
                  
FUNCTIONKEY3,
                  
FUNCTIONKEY4.

INITIALIZATION.
Move'Button1'to SSCRFIELDS-FUNCTXT_01.
MOVE'Button2'to SSCRFIELDS-FUNCTXT_02.
MOVE'Button3'to SSCRFIELDS-FUNCTXT_03.
MOVE'Button4'to SSCRFIELDS-FUNCTXT_04.

AT SELECTION-SCREEN.
  
CASE SSCRFIELDS-UCOMM.
    
WHEN'FC01'.
      
LOOPATSCREEN.
      
Ifscreen-group1 = 'M1'.
           
screen-invisible = 0.
           
screen-active    = 1.
      
ELSE.
           
screen-invisible = 1.
           
screen-active    = 0.
        
MODIFYSCREEN.
      
ENDIF.
      
ENDLOOP.

      
WHEN'FC02'.
      
LOOPATSCREEN.
      
Ifscreen-group1 = 'M2'.
           
screen-invisible = 0.
           
screen-active    = 1.
      
ELSE.
           
screen-invisible = 1.
           
screen-active    = 0.
        
MODIFYSCREEN.
      
ENDIF.
      
ENDLOOP.

      
WHEN'FC03'.
      
LOOPATSCREEN.
      
Ifscreen-group1 = 'M3'.
           
screen-invisible = 0.
           
screen-active    = 1.
      
ELSE.
           
screen-invisible = 1.
           
screen-active    = 0.
        
MODIFYSCREEN.
      
ENDIF.
      
ENDLOOP.

    
WHEN'FC04'.
  
ENDCASE.


Viewing all articles
Browse latest Browse all 8332

Trending Articles