Skip to Content
0
Sep 01, 2023 at 11:39 AM

get SALV columns in wrong order

55 Views Last edit Sep 01, 2023 at 11:51 AM 6 rev

Hi folks

I'm building a header line from my SALV table to use it in my CSV-File by this method.

  METHOD get_headerline_from_salv.
* build a header line
LOOP AT i_salv->get_columns( )->get( ) INTO DATA(ls_col).
r_result = |{ r_result }{ ls_col-r_column->get_long_text( ) }{ i_sep }|.
ENDLOOP.
ENDMETHOD.

Most of the time this works fine, especially when I debug and try to find the bug it is always perfectly fine. But if I don't watch, sometimes the colums are in a wrong order?!?

Any idea why? What can I do about it?

Cheers Jan