cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Columns In ALV output

selvakumar_mohan
Active Participant
0 Kudos

Hi All,

I used ALV to show a table as list in the output. thing now is that i need only certain fields in the table. i was successful in writing the query and i get the data only of the desired fields. but the problem is i have the blank columns of the fields which i dont need in the output. please help me in removing those columns.

thanks,

Selvakumar M.

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

data: lr_comp type ref to iwci_salv_wd_table.

data: lr_model type ref to CL_SALV_WD_CONFIG_TABLE.

lr_comp = wd_this->wd_cpifc_<usage_name>( ).

lr_model = lr_comp->get_model( ).

lr_model->IF_SALV_WD_COLUMN_SETTINGS~DELETE_COLUMN( '<field name>').

use the method IF_SALV_WD_COLUMN_SETTINGS~DELETE_COLUMN( '<field name>')

Abhi

Edited by: Abhimanyu Lagishetti on Jun 17, 2008 8:25 AM

Edited by: Abhimanyu Lagishetti on Jun 17, 2008 8:27 AM

selvakumar_mohan
Active Participant
0 Kudos

Hi Abi,

Would you please guide in which method should this code must be put in, in a particular view where the ALV is displayed.

thanks,

Selva M,

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

You can put the code in WDDOINIT or WDDOMODIFYVIEW

in WDDOMODIFYVIEW just put this code inside this condition

if firsttime = abap_true.

<place the code >

Endif.

Abhi

Former Member
0 Kudos

Instead of writing any code,If you used the dictionary structure while creating the output node then just remove that name of the table,because it will display all the fields of the table if you dont remov

selvakumar_mohan
Active Participant
0 Kudos

Hi Abi & Tamil,

I tried Both the ways you guys have told. Matter of fact s both worked correctly. thank you. i cant give both replies as solved problem. so i gave Abi with two useful answers and tamil solved problem. thank you guys

Thanks,

selva M.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Remove the dictionary structure name in the node in which you have the output fields to display

Hope this helps U

Thanks and regards

Tamilselvan.K