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

Data Extraction Using Structure_Ex Code

Former Member
0 Likes
521

Hi All,

Can anyone give me the example code

for extract data Using strcture.

i tried following one, but end up with an error.

TABLES: rc29l.

DATA: BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE rc29l.

DATA: END OF itab.

SELECT * FROM rc29l into itab.

LOOP AT itab.

WRITE:/ itab-matnr, itab-idnrk.

ENDLOOP.

Regards

Hema

Edited by: hema prabakaran on Jul 24, 2008 1:04 PM

3 REPLIES 3
Read only

Former Member
0 Likes
488

Report zadd_struc.

data: begin of table occurs 1.

include structure <structure>.

end of table.

*****the above structure contains some fields of type lfa1.

select lifnr land1from lfa1 into corresponding fields of table table.

loop at table.

write:/ table-lifnr.

endloop.

Read only

Former Member
0 Likes
488

Hi Hema,

We cannot use select statement for a structure.Because nothing (no data) will be stored in the structure.

SELECT * FROM rc29l into itab. "this statement has no meaning.

Hope you understand...Please let me know if any issues.

Read only

0 Likes
488

Hi Vamsi,

yes, i know that structure has no data,

but dunno what's the relation betwn

mara and stpo table.

But my query is depends on the material i want to select

data from srpo-idnrk, how can i do it.

in structure RC29L, there is a field calld matnr and idnrk.

so im trying to access the RC29L.

Regards

Hema