on 07-12-2005 6:36 AM
*************************************************
data: h_itab like hier_out occurs 0 with header line,
table_name(30) type C.
here i declare h_itab as the variable for the table name
itab_name = input_name
input_name is imported
select * from table_name
into table h_itab
where OBJVERS = 'A'.
*********************************************
it does not allow me to use table_name in the select statement i get the error 'table_name is not defined i the abap dictionary as a table, projection view or database view'.
Any suggestions are highly appreciated.
Thanks in advance,
BWer
Hi,
You must enclose the name of the table in braces to let the compiler know that the value will be supplied at run time.
For example -
tables mara.
data table_name(30) type c.
table_name = 'MARA'.
SELECT *
FROM (table_name)
endselect.
Regards,
Anand Mandalika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
You want to use the tablename as variable name in the select statement.
If i understand you correctly, modify the select statement as
Select * from (table_name) into table h_itab
where OBJVERS = 'A'.
aasr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.