2007 Feb 22 12:56 PM
Hi Everybody,
I got a internal table which has a field or a variable that gets me some tables names. Now I need to retrieve the data from all these tables in that field dynamically at runtime. So could you suggest me a way out to use the select query which uses this variable as a table ?
Regards,
Mallik.
2007 Feb 23 10:49 AM
Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik.
Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik.
2007 Feb 22 12:58 PM
select * from (v_table_name) into table itab where ....
Regards,
Ravi
2007 Feb 22 12:59 PM
Hello,
LV_TABNAME = 'MARA'.
Select * from ( LV_TABNAME ) ....Vasanth
2007 Feb 22 1:03 PM
Hi Malli,
Dynamic values to the SELECT query are passed with in brackets.
DATA V_TABNAME TYPE DD02L-TABNAME.
V_TABNAME = 'VBAK'.
SELECT * FROM (V_TABNAME) INTO TABLE ITAB.
Thanks,
Vinay
2007 Feb 22 1:06 PM
2007 Feb 22 1:07 PM
Hi alik,
Parameters: Tab_name TYPE DD02L-TABNAME.
SELECT * FROM (Tab_name) INTO TABLE ITAB where ____Regards
Sudheer
2007 Feb 23 10:49 AM
Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik.
2007 Feb 23 11:22 AM
tables: mara.
DATA TABNAME(10).
SELECT-options: s_matnr FOR MARA-matnr.
TABNAME = 'MARA'.
SELECT * INTO TABLE ITAB FROM (TABNAME)
WHERE matnr IN s_matnr.
2007 Feb 23 11:40 AM
Hi judith,
Thanks for the reply, But can we use inner join or for all entries in such select statements which use variable in place of table name? if so how?
Best Regards,
Mallik
2007 Feb 23 11:42 AM
I tried and it gave an error, I gues no.
Reward if this solves ur query.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |