cancel
Showing results for 
Search instead for 
Did you mean: 

alv shows the entire fileds

Former Member
0 Kudos

Hi,

alv (SALV_WD_TABLE) shows the entire fileds of the dictionary table on the output (browser)

Can I restrict so it shows only columns which are needed to display ?

Regards

sas

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes. At runtime any user can go into the ALV settings and hide any columns they want. They can save their settings as a reusable layout. Admins can also use the same tools and save the settings as the default layout.

If you want to control this programatically, you can do so.

data l_salv_wd_table type ref to iwci_salv_wd_table.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  data l_table type ref to cl_salv_wd_config_table.
  l_table = l_salv_wd_table->get_model( ).
  data l_column type ref to cl_salv_wd_column.
  l_column = l_table->if_salv_wd_column_settings~get_column( 'CLIENT' ).
  l_column->set_visible( cl_wd_uielement=>e_visible-none ).

Answers (1)

Answers (1)

Former Member
0 Kudos

Pls refer to this [Link|]

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Pls refer to this [Link|]

Are you sure you posted the correct link. I followed it and it doesn't appear to have anything to do with the topic of this thread. It is talking about calling a BAPI and this thread was about ALV.

Former Member
0 Kudos

Yes it is a correct link.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Interesting. The link pulled up a completely different forum thread earlier. I even opened it twice to make sure, becuase what it opened was so off topic I didn't see how it could possibly be related. Now it seems to be opening correctly to a thread that discusses ALV columns. Sorry for the confusion - guess I will just chalk this up to strangeness in the forums.