2013 Jan 20 5:46 AM
Dear gurus.
I am trying to learn abap statement. the following is my test program. when I execute it, it gives me this error 'type it_spfli is unknown'.
REPORT ztest001.
data it_spfli type sbc400_t_spfli.
data wa_spfli type it_spfli.
select * from spfli into it_spfli.
loop at it_spfli into wa_spfli.
write: /wa_spfli-carrid,
wa_spfli-connid.
endloop.
what is wrong? any help? thanks very much.
Best Regards
Chris
2013 Jan 20 6:14 AM
Hi,
As u know standard table is one,within internal tables type.
It is like basic for more help Press F1 with cursor..
so instead of ur first 2 line write like this.
data it_spfli type sbc400_t_spfli.
data wa_spfli type it_spfli.
replace with,
types: sbc400_t_spfli type standard table of spfli.
data it_spfli type sbc400_t_spfli.
data wa_spfli type spfli.
and
ur select statement REPLACE WITH
select * from spfli into it_spfli.
WITH
select * from spfli into TABLE it_spfli.
Lastly in write statement ,after / give one space.
Hope it will solve ur problem. try it.
Thanks
Gourav.
2013 Jan 20 6:11 AM
Hi,
From where did you got sbc400_t_spfli .
Please use Transaction ABAPDOCU .
There is no such thing as "gurus" in the world.
We are all simply learning new stuff for a very loooong time..... 🙂
Regards.
2013 Jan 20 6:14 AM
Hi,
As u know standard table is one,within internal tables type.
It is like basic for more help Press F1 with cursor..
so instead of ur first 2 line write like this.
data it_spfli type sbc400_t_spfli.
data wa_spfli type it_spfli.
replace with,
types: sbc400_t_spfli type standard table of spfli.
data it_spfli type sbc400_t_spfli.
data wa_spfli type spfli.
and
ur select statement REPLACE WITH
select * from spfli into it_spfli.
WITH
select * from spfli into TABLE it_spfli.
Lastly in write statement ,after / give one space.
Hope it will solve ur problem. try it.
Thanks
Gourav.
2013 Jan 20 6:30 AM
Hi,
according to your coding, you have to create a table type(sbc400_t_spfli) in SE11 . where you have to mention SPFLI table.
then you can use:
data it_spfli type sbc400_t_spfli,
wa_spfli like line of it_spfli.
Thanks
Sabyasachi
2013 Jan 20 7:28 AM