‎2011 Jun 29 10:37 AM
Hi Friends,
could we have dynamic internal table in for all entries of select statement
i.e.
i am looking for select like
here gt_table is vbak and it could be any
select vbeln
from vbap
into gt_vbap
for all entries in * (gt_table)*
where ( string clause).
hope every thing is clear .
Thank you
kat
‎2011 Jun 29 10:50 AM
Hi,
if you imply gt_table is a table whoose structure is dynamic. then yes you can pass teh table in for all entries.
You can cretae a dynamic internal table using field symbols.
If you are saying can you pass a variable in for all entries <variable table>. Then i doubt if that is possible.
‎2011 Jun 29 10:50 AM
Just Use this in the declaration part. lv_table TYPE ddobjname,
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( lv_table ).
Assign the structure at runtime
Select will be as follows.
SELECT SINGLE *
FROM (lv_table)
INTO CORRESPONDING FIELDS OF <dy_wa2>
WHERE (tb_where).
Everything here is Dynamic. Hope this helps
‎2011 Jun 29 1:06 PM
‎2011 Jun 29 1:49 PM
Hello Rachit,
Similar question has been discussed in the forum:
BR,
Suhas