Skip to Content

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

Table column visibility


I have a table control with 3 columns c1,c2,c3. I have a checking condition. If the condition is true, then only 2 columns c1 and c2 should be displayed on screen else all 3 columns should be displayed on screen. Plz tell me how this should be done.


Have a read of:

i.e. you may want to try hiding the columns early in your PBO using something like:

  l_tabix         like sy-tabix,
  ls_cols         type cxtab_column.

loop at g_tc_9999-cols[] into ls_cols.

  l_tabix = sy-tabix.

  if ls_cols-index = 3. "adjust as required!
    ls_cols-invisible = 1. 
    ls_cols-screen-invisible = 1. 
    modify g_tc_9999-cols from ls_cols index l_tabix.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question