Wednesday, December 22, 2010
Use LOOP AT TABC-COOLS(TABC table control name) to hide columns on table control. It is similar to LOOP AT SCREEN.

  • Define Columns table based on table control.
  • CONTROLS TABC TYPE TABLEVIEW USING SCREEN 100.
    DATA: COLS LIKE LINE OF TABC-COLS.
    
  • Write the below code in the PBO of the screen to hide certain fields.
  • "At runtime as TABC is deep structure which has COLS table
    "inside we have to do the following.
    LOOP AT tabc-cols INTO cols.
      IF cols-screen-name = 'ITAB-MATNR'. "Which is to be hidden
        cols-screen-active = '0'.
        MODIFY tabc-cols FROM cols INDEX sy-tabix.
      ENDIF.
    ENDLOOP.
    

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.