‎2021 Jun 13 9:23 AM
On older systems the following statement
cl_salv_table=>factory(
IMPORTING r_salv_table = DATA(lo_table)
CHANGING t_table = <fs_data> ).
must be rewritten as follows:
DATA: lo_table TYPE REF TO cl_salv_table.
cl_salv_table=>factory(
IMPORTING r_salv_table = lo_table
CHANGING t_table = <fs_data> ).
Is there a pragma or some other sort of compiler directive that would enable me to write a single version of the code?
Something like this:
#ifdef BASIS740
cl_salv_table=>factory(
IMPORTING r_salv_table = DATA(lo_table)
CHANGING t_table = <fs_data> ).
#else
DATA: lo_table TYPE REF TO cl_salv_table.
cl_salv_table=>factory(
IMPORTING r_salv_table = lo_table
CHANGING t_table = <fs_data> ).
#endif
At the moment I have to workaround it by having the unused version commented out, although technically this means the two source codes are different. I used inline declarations in this question but there are other language elements which are version-dependent.
I couldn't find anythin either in ABAPDOCU or in the forum.
Comments it is, then?
‎2021 Jun 13 9:41 AM
Nevermind: finding an answer is all about picking the right keywords.
This has been discussed before and, no, sadly it can't be done.
‎2021 Jun 13 9:41 AM
Nevermind: finding an answer is all about picking the right keywords.
This has been discussed before and, no, sadly it can't be done.