‎2007 Oct 25 11:29 AM
hi friends,
i am working on a lav list display program and im using the class cl_salv_table to display my itab
now i have given specific field heading to certain fields
DATA: lr_columns TYPE REF TO cl_salv_columns,
lo_columns TYPE REF TO cl_salv_columns_table,
lo_column TYPE REF TO cl_salv_column.
lr_columns = alv->get_columns( ).
lo_columns = alv->get_columns( ).
lo_column = lo_columns->get_column( 'SETS' ).
lo_column->set_technical( '' ).
lo_column->set_medium_text( 'sets shipped' ).
my problem is for column SETS i cant give short text since 'sets shipped' doesnt fit in,also if i use medium text that is not reflected in the output until i stretch the column.
wat do to 2 get the heading without strecthing the column
‎2007 Oct 25 12:19 PM
Hi Amit,
Just add the following line in your code.
lr_columns->set_optimize( if_salv_c_bool_sap=>true ).
hope it will help you.
regards,
ABHIJIT ZOPE
‎2007 Oct 25 12:19 PM
Hi Amit,
Just add the following line in your code.
lr_columns->set_optimize( if_salv_c_bool_sap=>true ).
hope it will help you.
regards,
ABHIJIT ZOPE
‎2007 Oct 25 12:28 PM
i have done that already,
any other thing which i can do to get the desired output
‎2007 Oct 25 2:08 PM
Hi Amit,
ok means you want the default size of column..then remove this line from you code...
regards,
ABHIJIT ZOPE
‎2007 Oct 25 2:17 PM
Not exactly sure what you are reaching for here, but you can set the column width to what ever you want.
DATA: lr_columns TYPE REF TO cl_salv_columns,
lo_columns TYPE REF TO cl_salv_columns_table,
lo_column TYPE REF TO cl_salv_column.
lr_columns = alv->get_columns( ).
lo_columns = alv->get_columns( ).
lo_column = lo_columns->get_column( 'SETS' ).
lo_column->set_technical( '' ).
lo_column->set_short_text( 'Sets Shp').
lo_column->set_medium_text( 'Sets Shipped' ).
lo_column->set_long_text( 'Sets Shipped' ).
lo_column->set_output_length( '15' ).Regards,
Rich Heilman
‎2007 Oct 26 7:16 AM
hello sir,
i will tell u wat exactly my problem is, in my internal i have field called
sets type mseg menge
now i have use lo_column->set_medium_text( 'Sets Shipped' ).
i cant use short text bcoz Sets Shipped doesnt fit in.
but wen i run the report the heading for my column is "Quanity" ( which is for mseg-menge),only wen i increase the width of the column i can see Sets Shipped.
i also tried lo_column->set_output_length( '15' ) but even after doing the heading remains "Quantity".
i have also used lo_column->set_technical( '' ).