2012 Jan 17 11:31 AM
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>.
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>.
2012 Jan 17 1:51 PM
Hi,
Try this way.
Loop at field cat log.
where columnnane = ' '.
change to your required column name.
endloop.
cheers
2012 Jan 17 1:54 PM
Hi powerstar,
The required name of the field is the system name. So, I want to collect it automatically.