‎2007 Aug 14 9:32 PM
In the following command i was able to build <dyn_table> dynamically but how do we do that for <dyn_wa>. table name should be populated dynamically here.
for ex: pa0001, pa0002, .... and I have these names in an IT table
INSERT <dyn_wa> FROM TABLE <dyn_table>
ACCEPTING DUPLICATE KEYS.
Pls help...Thanks
‎2007 Aug 14 9:35 PM
Try INSERT (Table_name) FROM ....
Where Table_name has Database table name
-Kriss
‎2007 Aug 14 9:38 PM
‎2007 Aug 14 9:40 PM
You can use a string type -:)
DATA: table_name type STRING.
Greetings,
Blag.
‎2007 Aug 14 9:41 PM
‎2007 Aug 14 9:44 PM
data: tab_name type string.
INSERT <dyn_table> into tab_name
ACCEPTING DUPLICATE KEYS.
gives me error " tab_name" is not an internal table.
‎2007 Aug 14 9:47 PM
Take it as charater type.
This code works for me.
TABLES : ztest123.
DATA : tab_name(10) TYPE c.
tab_name = 'ZTEST123'.
DATA : wa LIKE ztest123.
wa-name = 'Mahesh'.
INSERT (tab_name) FROM wa.
Thanks
Mahesh
‎2007 Aug 14 9:49 PM
check ur syntax of the insert statement
it should insert(tab_name) from table Internaltable.
or
insert(tab_name)from workarea.
here tab_name is variable contains the name of the DB table
Thanks,
Mahesh
‎2007 Aug 14 9:49 PM
in my case both the internal table ( wa) and the db table are dynamic