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

error in read value from structure

Former Member
0 Likes
983

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 t_rf05l.

append t_rf05l.

write :......

reply me soon....

manish sharma.

thanx.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
904

Hai, Sharma

you are saying that rf051 is a structure, as veeresh said that we dont have data in a structure, just we can refer that structure as a type specification to our internal table. So there is no data in a structure, if u want u can define table name using thae following statement for a database table as given below.

TABLE <db-tablename>.

now it creates internal table structure with a headerline in our application.

Thank you,

regards,

Srinivas

7 REPLIES 7
Read only

mvoros
Active Contributor
0 Likes
904

Hi,

you can select data into type t_rf05l. It is only a type definition. You have to select your data into some structure or table with this type.


select * from rf05l into it_rf05l.

Read only

Former Member
0 Likes
904

ok.....

i have given the internal table name ... but it gives same error in select query that rf05l is not a table

Read only

mvoros
Active Contributor
0 Likes
904

because RF05L is only structure. It is not database table so there can not be stored any data. Go and check it in SE11. What exactly do you want to do? I think you should start reading about ABAP dictionary.

Martin

Read only

Former Member
0 Likes
904

hi,

In select stmt .. write into table <inttable> or into <workarea>,

but not into types declaration variable as it does not hold any memory it is showing error.

Rgds.,

subash

Read only

former_member673464
Active Contributor
0 Likes
904

hi,

RF05L is a structure.It is not a database table.You can write select query to fetch data from database tables only.structures does not conatain any data.

Regards,

Veeresh

Read only

Former Member
0 Likes
904

Hi,

RF05L is not a database table, it is a structure.RF05L does not contain any data.

check this code:

TYPES : BEGIN OF t_mara.

INCLUDE STRUCTURE mara.

TYPES : END OF t_mara.

DATA : 
  i_mara TYPE STANDARD TABLE 
           OF mara WITH HEADER LINE.

SELECT SINGLE * 
  FROM mara 
  INTO i_mara.
APPEND i_mara.

LOOP AT i_mara.
  WRITE : i_mara-matnr,
          i_mara-ernam.
ENDLOOP.

Fetch the data from the db table not from structure.

Regards

Adil

Read only

Former Member
0 Likes
905

Hai, Sharma

you are saying that rf051 is a structure, as veeresh said that we dont have data in a structure, just we can refer that structure as a type specification to our internal table. So there is no data in a structure, if u want u can define table name using thae following statement for a database table as given below.

TABLE <db-tablename>.

now it creates internal table structure with a headerline in our application.

Thank you,

regards,

Srinivas