‎2007 May 24 1:44 PM
I was writng a function module for dyanamic operations on the table. We are using the field symbols, function module is unicode enabled.
Assign statements are working fine, with which we created work are <fs_wa_header> and internal table <fs_tb_item> dynamically based on the table name (IM_TB_HENAME) which we get as import parameter.
we have query which is giving us dump.
INSERT (IM_TB_HENAME) FROM <FS_WA_HEADER>.
‎2007 May 24 1:48 PM
Check the entry in (IM_TB_HENAME) is already exist, and change INSERT on MODIFY. May be it's help you ...
‎2007 May 24 1:52 PM
Hi
INSERT (IM_TB_HENAME) FROM <FS_WA_HEADER> is good for inserting a line in the database, so IM_TB_HENAME has to have the name of dictionary table.
U should write:
INSERT <FS_WA_HEADER> INTO (IM_TB_HENAME).
But I believe you can't use the variable IM_TB_HENAME, you should use another field-symbols:
ASSIGN (IM_TB_HNAME) TO <FS_TB_ITEM>.
INSERT <FS_WA_HEADER> INTO <FS_TB_ITEM>.
Max
‎2007 May 24 2:06 PM
Hi Max
IM_TB_HENAME is the import parameter for table name which is a dictionary table not an internal table, then how we can assign it to any field symbol.
I want to make it very much clear IM_TB_HENAME is name for database table.
‎2007 May 24 2:41 PM
So I suppose you've a code like this (?):
LOOP AT <FS_TB_ITEM> ASSIGNING <FS_WA_HEADER>.
INSERT (IM_TB_HNAME) FROM <FS_WA_HEADER>.
ENDLOOP.If it's so, you should know us which dump you're obtaining.
Max
‎2007 May 24 1:53 PM
Hi,
Try to use Modify or Move-corresponding instead of Insert.
Regards,
Anoop
‎2007 May 24 2:08 PM
IM_TB_HENAME is the name of dictionary table which we taking as import parameter, for making it dynamic, it is not an internal table so no move-corresponding or move statement will work