cancel
Showing results for 
Search instead for 
Did you mean: 

hiding a column in the ALV in a webdynpro component(standrad one)

selvakumar_mohan
Active Participant
0 Kudos

Hi,

i have an requirement of hiding a column inside a ALV output of a web dynpro component which is a standrad one. please help me finding the way to do the same.

thanks,

selvakumar M.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You have to enhance that standard component.

In enhancement mode you can write your own code in post-exit of the method where this ALV is being initialized.

the code what abhi is suggested can be written in that post-exit method.

I hope this is clear.

-Haresh

abhimanyu_lagishetti7
Active Contributor
0 Kudos

data: l_ref_usage type ref to if_wd_component_usage.

l_ref_usage = wd_this->wd_CpUse_Alv( ).

if l_ref_usage->has_active_component( ) = abap_false.

l_ref_usage->create_component( ).

endif.

DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

l_ref_INTERFACECONTROLLER = wd_This->wd_CpIfc_Alv( ).

data:

l_VALUE type ref to Cl_Salv_Wd_Config_Table.

l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model(

).

data: lr_column type ref to CL_SALV_WD_COLUMN.

lr_column =

l_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' ).

lr_column->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).

Abhi

selvakumar_mohan
Active Participant
0 Kudos

hi Abi,

Thanks for your quick reply, but in which exit should i write this code. please help me that too.

thanks,

selva

abhimanyu_lagishetti7
Active Contributor
0 Kudos

write it in WDDOINIT in the view where you are showing the ALV

Abhi

Former Member
0 Kudos

you are right Abhi, but to wirite code Selva has to enhance the component as it is the standard one.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

I mean, WDDOINIT of the custom component where the ALV is being used.

Oops sorry, if you want to change something in ALV it self this is not the solution, and we should not change ALV as it keeps on changing with every version

Abhi

Edited by: Abhimanyu Lagishetti on Aug 11, 2008 2:36 PM