‎2006 Aug 07 4:44 PM
friends, hope u r well and doing good at yr places.
this is jain as bw consultant not having much knowledge of abap progrtamming. could you please suggest me , i am getting a error from following prog.
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.
The error is - .you can not use ther syntax write
7uline ztest.
please advice me.
‎2006 Aug 07 4:45 PM
‎2006 Aug 07 4:50 PM
There are two mistakes
1. You need to use table keyword
2. A space is needed in write statement.
- Sanjay
‎2006 Aug 07 4:48 PM
data: ztest1 type standard table of pa0001.
data: ztest type pa0001.
Select * into corresponding fields of table ztest1
from pa0001.
loop at ztest1 into ztest.
write:/ ztest-pernr.
*--here you write all the fields separately, instead of just ZTEST.
endloop.
Message was edited by: Srikanth Kidambi
‎2006 Aug 07 4:49 PM
hi jain,
data: ztest1 type standard table of pa0001 initial size 0.
data: ztest type pa0001.
Select * into corresponding fields of table ztest1
from pa0001.
loop at ztest1 into ztest.
write:/ ztest-pernr.
endloop.
‎2006 Aug 07 4:51 PM
Akshay,
You need to write each individual field of ZTEST.
ex.. write : / ztest-a, ztest-b.
Regards
Anurag
‎2006 Aug 07 4:52 PM
Hi,
data: ztest1 type standard table of pa0001
inital size 0 with header line.
Select * into corresponding fields of table ztest1
from pa0001.
loop at ztest1.
write:/ ztest1-pernr.
endloop.
regards,
keerthi.
‎2006 Aug 07 5:02 PM
Hi
you need to include keyword 'table'.
otherwise it will consider ztest1 as workarea.
check the following code.
data: ztest1 type standard table of pa0001 INITIAL SIZE 0.
data: ztest type pa0001.
Select * into corresponding fields of TABLE ztest1 from pa0001.
loop at ztest1 into ztest.
write:/ ztest.
ENDLOOP.
Reward points if helpful.
Regards,
Swathi.