‎2006 Aug 04 3:45 PM
friends,
hope u r well and doing good.
This is jain as bw consultant and not having any abap knowlege.could u please help me to send a few line code.
requierment is -
I have created one structure , based on pa0001 table and they are having 10 frields from pa0001 table.
now i just want a write a simple prog where my structre will get a data from pa0001 table and pass the date to structure.
the strucutre name is 0 ZTEST.
data base tasble pa0001
as there is requierment to fetch the data through infoset query. so please help me
regards
‎2006 Aug 04 3:47 PM
Select * into corresponding fields of Ztest
from pa0001.
Regards
Anurag
‎2006 Aug 04 3:47 PM
Select * into corresponding fields of Ztest
from pa0001.
Regards
Anurag
‎2006 Aug 04 3:49 PM
Anurag, thanks..but could u please send me full prog as i have to declear table or strucutre ...
it weould be nice help for me
‎2006 Aug 04 3:50 PM
‎2006 Aug 04 3:53 PM
‎2006 Aug 04 3:55 PM
Report Ztest.
data: ztest1 type standard table of pa0001
inital size 0.
data: ztest type pa0001.
Select * into corresponding fields of ztest1
from pa0001.
loop at ztest1 into ztest.
write:/ ztest.
endloop.
Regards
Anurag
‎2006 Aug 04 3:49 PM
hi jain,
tables: pa0001.
data: ztest like pa0001.
select * from pa0001
into ztest.
endselect.
Message was edited by: Priya
‎2006 Aug 04 3:53 PM
Hi,
if your need is to obtain data from PA0001 and pass it on to a structure, why should you maintain two structures : ztest and pa0001.
If you want to select data from PA0001 and pass it to your query, then one structure would serve the need.
Find the sample code :
select <required fields> from PA0001 into corresponding fields of ztest (structure name)where <fieldname> = <condition>.
endselect.
*** This select query will fetch values from PA0001 and places them in the workarea one-by-one as per the given condition. If you can maintain a internal table based on your local structure you can use the following :
select <required fields> from PA0001 into corresponding fields of table <internaltable> (structure name)where <fieldname> = <condition>.
Hope this serves the purpose, if not kindly revert back and i`ll clarify you further.
Reward if helpful.
Regards