Application Development 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: 

error in read value from structure

Former Member
0 Kudos
342

hi gurus,

the structure does not contain any data.... so i have 2 problem related to it.

1. do i apply the select query nd write statement on structure rf05l. i apply it gives error that rf05l is not the table.....

2. so what is the use of include structure in report, why we used it nd what is the procedure to read data from structure.

types : BEGIN OF t_rf05l.

include structure rf05l.

types : END OF t_rf05l.

DATA : it_rf05l TYPE STANDARD TABLE OF t_rf05l WITH HEADER LINE,

wa_it_rf05l TYPE t_rf05l.

select * from rf05l into it_rf05l.

append it_rf05l.

write :......

reply me soon....

thanx

manish sharma.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
113

Hi,

-- SELECT statement should be used only on database tables like, MARA, MARC etc...--

The example given by you is an internal table, but not database table.

Use below logic

select * from rf051 into table it_rf051.

Loop at it_rf051.

Write: ......

endloop.

Include strucute , includes the fields of a structure into the internal table. i.e., no need to define each field individually.

Edited by: Ramesh Hirial on Jun 13, 2008 3:42 PM

5 REPLIES 5

Former Member
0 Kudos
113

Hi

select * from rf05l into it_rf05l.

append it_rf05l.

write :......

Do this:

select * from rt05l

into corresponding fields of table it_r05l.

loop at it_ro5l into wa_it_rf05l.

write....

endloop.

include structure rf05l. mens you are including all the fields of that Database table into itab or your structure. its does not mean that rt05l can be used as ITAB.

Regards

Aditya

0 Kudos
113

hi guru,

it has given same problem that rf05l is not a dicitionary table or view.

0 Kudos
113

Hi Manish,

First u know what is difference between the table and structure.

Table has data and structure dosent has data.

In select querie write the DB table name and into ur structure.

hence it is throwing error.

Select * from table <DB talbe > into table it_rf051 where

condition.

regards,

Former Member
0 Kudos
114

Hi,

-- SELECT statement should be used only on database tables like, MARA, MARC etc...--

The example given by you is an internal table, but not database table.

Use below logic

select * from rf051 into table it_rf051.

Loop at it_rf051.

Write: ......

endloop.

Include strucute , includes the fields of a structure into the internal table. i.e., no need to define each field individually.

Edited by: Ramesh Hirial on Jun 13, 2008 3:42 PM

Former Member
0 Kudos
113

Hi Manish,

INCLUDE STRUCTURE is only used to declare the Internal table structure , structures do not hold any data

Check the relevent TRANSPARENT table for that structure and use SELECT for that table