08-17-2007 5:30 PM
Hi;
I need a query that needs the data of the "A004 table pool", but the query doesn't accept this kind of table nor ITAB tables because they are not defined in the BAP dictionary.
How can a mix ITABS or TABLE POOL in a SELECT Statement...?
Thanks on advance.
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer
08-17-2007 5:42 PM
08-17-2007 5:37 PM
Hi David,
Just look at the other tables, there must be some transparent/cluster table which will solve your problem.
Regards,
Atish
08-17-2007 5:42 PM
08-17-2007 6:01 PM
Hi;
Thanks for your response.
Ok let me explain what i did...
1) as Atish said... i created a transparent table with the structure of A004 table...
2) i'm trying this to pass data to tne new table but it launches error
A)
LOOP AT a004.
t_a004-kappl = a004-kappl.
t_a004-kschl = a004-kschl.
t_a004-vkorg = a004-vkorg.
t_a004-vtweg = a004-vtweg.
t_a004-matnr = a004-matnr.
t_a004-datbi = a004-datbi.
t_a004-datab = a004-datab.
t_a004-knumh = a004-knumh.
APPEND yestructura.
ENDLOOP.
error message: "t_a004" is not an internal table - the "OCCURS n" specification is missing.
B)
SELECT * FROM a004 INTO t_a004.
ENDSELECT.
but just pass 1 record.
i need to pass the data to use t_a004 a table created in SE11 with the select statement.
Thaks on advance.
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer
08-17-2007 7:09 PM
HI,
I think you have delcared t_a004 as a structure not internal table.. use occurs 0 addition at the delcarion.
Here i am giving you the code with my understanding that you want to select data from a004 table and put it in your ztable.
data : i_a004 like standard table of a004.
select * from a004 into table i_a004.
if sy-subrc eq 0.
insert into <ZTABLE> from table i_a004.
endif.
Thansk
Mahesh
08-17-2007 7:18 PM
Hi,
Try this way
Tables: A004.
DATA T_A004 like A004 occurs 1 with header line.
SELECT * FROM A004 into table t_A004
WHERE KAPPL = KAPPL
AND KSCHL = KSCHL
AND VKORG IN F001
AND VTWEG IN F002
AND MATNR IN F003.
a®