Skip to Content
0

salv Column issue.

Nov 30, 2017 at 11:11 AM

29

avatar image
Former Member

* get columns object
lo_cols = lo_salv_table->get_columns( ).

*#Individual Column Names
LOOP AT gt_component INTO ls_component.
TRY.
col_name = ls_component-name.
lo_column = lo_cols->get_column( col_name ). " < <

IF col_name = 'BATCHNO'.
col_desc = 'BatchNo'.

ELSEIF col_name = 'MATNR'.
col_desc = 'Material Number'.

ELSEIF col_name = 'WERKS'.
col_desc = 'Plant'.

ELSEIF col_name = 'BUDAT'.
col_desc = 'Posting Date'.

ELSEIF col_name = 'PRUEFLOS'.
col_desc = 'Inspection Lot Number'.

ELSEIF col_name = 'FLAG'.
col_desc = 'SAP Update'.

ELSEIF col_name = 'CREATEDBY'.
col_desc = 'Created by'.

ELSEIF col_name = 'ENTRYDATE'.
col_desc = 'Entry Date'.

ELSEIF col_name = 'CREATEDTM'.
col_desc = 'Entry Time'.

else.
*move col_name to col_desc.
CONCATENATE col_name '.' INTO col_desc.

*lo_column->set_medium_text( col_desc ).
*lo_column->set_output_length( 10 ).
ENDIF.
*lo_column->set_long_text( col_desc ).
lo_column->set_medium_text( col_desc ).
*lo_column->set_short_text ( col_desc ).
lo_column->set_output_length( 14 ).

CATCH cx_salv_not_found.
ENDTRY.
ENDLOOP.

this is my output of the report. In my system or dev server, it is showing absolutely perfect.

but when am checking this one in quality after "created time " all the fields heading are coming as 'text'. this a dynamic alv report and i have used RTTS method.

Please suggest.

Thanks

Dibya.

error.png (44.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mike Pokraka Nov 30, 2017 at 11:22 AM
0

This is always a red flag in code:

CATCH cx_salv_not_found.
ENDTRY.

If you ignore an error you will not know what's wrong.

Share
10 |10000 characters needed characters left characters exceeded