cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide label of a webdynpro ALV column?

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have a webdynpro for ABAP ALV report. It has 4 columns namely, Material, Stock_Qty and Reconcile. I have to hide the label of the column 'Reconcile'. In other words, I want the last column without a label. Please note that I am not hiding the whole column.

Currently it shows like this:

-


Materal | Stock_Qty | Reconcile |

-


What I want:

-


Materal | Stock_Qty | |

-


Kindly help me. Any code snippet will be really appreciated.

Thanks

Gopal

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Balgia,

I suppose you are viewing ALV output in external view with ALV configuration model. Then follow the below steps.

In ALV View WDDOINIT() method, add the below code. First get the column object and get header of it. Then change it to null.



*  declare column, settings, header object
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.

* get column by specifying column name.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).

* set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( ' ' ).

If you have further queries, pls let me know.

I hope it helps

Regards,

Rakesh.