Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

changing fields at programming level

hi all,

how to make fields in a table control as visible and invisible at programming level?

i know how to do it at screen level.

please help me on this issue.

thanks in advance...

Tags:
replied

Hi

It can't hide a single field of table control, but only to make it available for input/output or output only.

It can do it by LOOP AT SCREEN statament into LOOOP/ENDLOOP of table control in PBO:

PROCESS PBO

LOOP AT. ....
  MODULE SCREEN.
ENDLOOP.

MODULE SCREEN.
  LOOP AT SCREEN.
     IF ......
       SCREEN-INPUT = 0.
       MODIFY SCREEN.
    ENDIF.
ENDMODULE.

It can hide a colunm changing the parameters of table control:

CONTROLS: T_CTRL TYPE TABLEVIEW .............................

* Workarea for table control
DATA: BEGIN OF WA_CTRL,
        SCREEN      LIKE SCREEN,     "Attributes struktur SCREEN
        INDEX       TYPE I,         "Position of a column on the screen
        SELECTED(1) TYPE C,          "Indicator 'column selected'
        VISLENGTH   LIKE ICON-OLENG, "Visualised length of a column
        INVISIBLE(1) TYPE C,         "Indicator 'column invisible'
      END   OF WA_CTRL.

PROCESS PBO
  MODULE CHANGE_T_CTRL.

MODULE CHANGE_T_CTRL.
   LOOP AT T_CTRL-COLS INTO WA_CTRL.
     IF .......
      WA_CTRL-INVISIBLE = 'X'.
      MODIFY T_CTRL-COLS FROM  WA_CTRL.
    ENDIF.
   ENDLOOP.
ENDMOUDLE.

Max

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question