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

internal table

Former Member
0 Likes
887

Hi Gurus,

Ive defined the internal table like this

itab type standard table of SPFLI with header line.

select * from spfli into itab.

write : itab-carrid.

though it is activated, it does not give an o/p

I also tried

itab type standard table of SPFLI

wa type spfli.

select * from SPFLI into table itab.

loop at itab into wa.

write : wa-carrid.

endloop.

This does not work either.

Any help on this would be appreciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
863

hey,

Just put a break-point and debugg that you will get the solution.

Regards,

Midhun Abraham

9 REPLIES 9
Read only

Former Member
0 Likes
863

Hi Sandeep,

Welcome to SDN.

Try this

data:
       itab type 
standard table 
          of SPFLI 
       with header line.

select * 
  from spfli 
    into table itab.

loop at itab.
   write :/  itab-carrid.
endloop.

Actualy, SPFLI is the name of a database structure as well as the corresponding data table if you won't put table addition to into statement, system will treat it like structure and so is not getting displayed.

Regards,

Anirban

Read only

Former Member
0 Likes
864

hey,

Just put a break-point and debugg that you will get the solution.

Regards,

Midhun Abraham

Read only

Former Member
0 Likes
863

Hi,

Are you sure it picking the data? just check Sy-subrc value and sy-dbcnt value. n check data is present in internal table or not?

Read only

KK07
Contributor
0 Likes
863

Hi Sandeep,

welcome to sdn.

try in debugging mode by entering /h and see where its going wrong.have u checked the table?

Read only

Former Member
0 Likes
863

hi

This is the code..and please learn basics perfectly:

data:itab type standard table of SPFLI with header line.

select * from spfli into table itab.

loop at itab.

write : / itab-carrid.
 endloop.

Regards,

Vishwa.

Read only

Former Member
0 Likes
863

Hi,

Please check whether SPFLI table having any values or not.

Read only

Former Member
0 Likes
863

Define the internal table like this.

Data: begin of It_tab occurs 0,

..

..

end of it_tab.

Data: wa_itab like line of it_tab.

Select * from splfi into table it_tab.

Loop at it_tab into wa_tab.

endloop.

Read only

Former Member
0 Likes
863

Hi Sandeep,

its working fine in my system.


DATA : ITAB TYPE STANDARD TABLE OF SPFLI WITH HEADER LINE.


SELECT * FROM SPFLI INTO  ITAB.

ENDSELECT.

WRITE : ITAB-CARRID. 

i think data is not avialable in your system.

Read only

Former Member
0 Likes
863

Hi Sandeep,

use this code

data:itab type standard table of SPFLI with header line.

select * from spfli into table itab.

loop at itab.

write : / itab-carrid.

endloop.