Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TYPE 'IT_SPFLI' IS UNKnown

peng_tang
Participant
0 Likes
5,433

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


1 ACCEPTED SOLUTION
Read only

gouravkumar64
Active Contributor
0 Likes
2,187

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.

4 REPLIES 4
Read only

rosenberg_eitan
Active Contributor
0 Likes
2,187

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.

Read only

gouravkumar64
Active Contributor
0 Likes
2,188

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.

Read only

Former Member
0 Likes
2,187

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

Read only

peng_tang
Participant
0 Likes
2,187

thanks guys. issue resolved.