Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV output header description

Former Member
0 Likes
757

Hello,

I have created a program that extract the output of an another program with its variant. What I need is the ALV header description. For example; I need to keep "Tax Number" instead of "KNA1-STCKD1" in my internal table for a later use.

Thank you.

Here is my related code:

cl_salv_bs_runtime_info=>set(
EXPORTING display  = abap_false
  metadata = abap_true
  data     = abap_true ).
Submit (program)  USING SELECTION-SET variant
          AND RETURN.

TRY.
    cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lf_ref ).
    ASSIGN lf_ref->* TO <lt_data>.
  CATCH cx_salv_bs_sc_runtime_info.
    MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
CREATE DATA lf_ref1 LIKE LINE OF <lt_data>.
ASSIGN lf_ref1->* TO <lt_line>.

2 REPLIES 2
Read only

Former Member
0 Likes
556

Hi,

Try this way.

Loop at field cat log.

where columnnane = ' '.

change to your required column name.

endloop.

cheers

Read only

Former Member
0 Likes
556

Hi powerstar,

The required name of the field is the system name. So, I want to collect it automatically.