‎2019 Dec 12 2:23 PM
Hi all,
I'm scratching my head trying to achieve a little goal into inline declaration.
Using standard FMs I receive some tables into REF TO data variables, dynamically determined.
Using the following code, i can fill my internal table COND
TYPES: tty_conds TYPE STANDARD TABLE OF /vgm/ips1ybagce WITH DEFAULT KEY.
ASSIGN bckt_cond->* TO FIELD-SYMBOL(<tab>).
DATA(cond) = VALUE tty_conds( ).
cond = CORRESPONDING #( <tab> ).
My issue is: COND can have different structure than /VGM/IPS1YBAGCE, given by customizing settings.
I tried with
DATA: simo_tabname TYPE tablename_umg VALUE '/VGM/T_IPS1YBAGCE_DB'. "it's the table type for my prev structure
ASSIGN bckt_cond->* TO FIELD-SYMBOL(<tab>).
DATA(cond) = VALUE simo_tabname( ).
cond = CORRESPONDING #( <tab> ).
But, of course, SIMO_TABNAME doesn't exist.
So i tried with the ( )
DATA: simo_tabname TYPE tablename_umg VALUE '/VGM/T_IPS1YBAGCE_DB'. "it's the table type for my prev structure
ASSIGN bckt_cond->* TO FIELD-SYMBOL(<tab>).
DATA(cond) = VALUE (simo_tabname)( ).
cond = CORRESPONDING #( <tab> ).
But i got error anyway.
There is chance to achieve it?
Thanks!
Simone
EDIT
Yes, i can use
DATA cond type ref to data.
FIELD-SYMBOLS: <tab_new> type standard table
.CREATE DATA cond ('/VGM/T_IPS1YBAGCE_DB').
ASSIGN cond->* to <tab_new>.
but it wouldn't be inline 🙂
‎2019 Dec 12 2:35 PM
Constructor operators require static types so you'll have to stick to the old construct
CREATE DATA dref TYPE (dynamictype).
‎2019 Dec 12 2:35 PM
Constructor operators require static types so you'll have to stick to the old construct
CREATE DATA dref TYPE (dynamictype).
‎2019 Dec 12 2:39 PM
sandra.rossi i feared it, but since i'm still struggling here and there with the new syntax, i hope i was missing something i wasn't able to find in the help.
Would you mind to convert the comment to Answer? So i close the question 🙂