Hi Sneha,
Please find the below code.
data: gr_columns type ref to cl_salv_columns_table.
data: gr_column type ref to cl_salv_column_table.
gr_columns = gr_table->get_columns( ).
gr_column ?= gr_columns->get_column( 'Field_Name' ).
gr_column->set_long_text( 'Long Text' ).
gr_column->set_medium_text( 'Medium Text' ).
Also find the below link
USING HIERARCHICALLY -SEQUENTIAL TABLE Factory method - Community Profiles - SCN Wiki
ALV Object Model - Simple 2D Table - The Basics
Regards
Rajkumar Narasimman
Moderator message: Linking farming is not allowed. Points removed
Message was edited by: Suhas Saha