cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Complex - table - Hide column @ Runtime

Former Member
0 Kudos

Hi All,

I do have a table in the Layout of a view! This table is binded to a table in the context....

The fact is that @ Runtime i'd like to hide some fields of the table is it doable ? How ????

Thanks for the help!

Stephna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stephan,

Yeah you can do this. Create a context attribute 'show_field' of type char01. In the view layout, bind the 'Visible' property of your table cell editor for the particular column(which you wish to hide) to this context attribute. Whenever you want to hide the field, do a set_attribute passing abap_false. Set the attribute to true when you want to make the field visible.

Regards

Nithya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stephan,

You can bind the visibility of your column to an attribute in the context. Depending on your business logic, you can just set this attribute to true or false.

Regards,

Neha

Former Member
0 Kudos

cAN i CREATE THE LAYOUT OF THE TABLE DYNAMICALLY?????

Regards,

Former Member
0 Kudos

Why do you want to create the table dynamically? Dynamic creation is necessary only if the structure of the context node itself is unknown. Otherwise you can simply create it at design time and manipulate only the columns at run time.

Anyway, you can create a table dynamically. You should do it in the modifyview method.

Regards

Nithya

Former Member
0 Kudos

That is also an option...but quite tedious!!

You can get the reference of the view in wddomodifyview (it is an importing parameter), then navigate to your table (using ID) and call ADD_COLUMN method.

The runtime class for a table is CL_WD_TABLE.

Regards,

Neha