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

Retrieving Data From Structure

Former Member
0 Likes
698

Hi Gurus,

I have this structure called Pekpo, from which i have to retrieve data and as we cannot retrieve data from a structure directly.

I declared it this way:

DATA: BEGIN OF L_PEKPO OCCURS 1.

INCLUDE STRUCTURE PEKPO.

DATA: END OF L_PEKPO.

Now, when i write the select statement with a where condition,it is giving me the error that pekpo is not a abap dictionary table at all,.

PLease help.

Regards,

Srihari.

6 REPLIES 6
Read only

Former Member
0 Likes
665

Hi Vishwa,

You can fetch data only from table and not from structure.

Probably you can try getting data from EKPO, I hope this will contain the data you need.

Thanks,

Arun

Read only

Former Member
0 Likes
665

Hi,

the error-message is correct, because PEKPO is only a structure not a DB-table. Thefore you cannot use select ... for PEKPO ... .

Regards, Dieter

Read only

Former Member
0 Likes
665

pekpo is just a flat structure in the data dictionary and does not hold any data. Select statements can not produce any Data with structures. You can only use this thing to help you create screens, work areas and internal tables in an uniform way

you actually need to search for tables which can contain data

Read only

0 Likes
665

Thanks for the replies. But It is used in the standard purchase order program and even smartform,when we cannot retreive data why it is used? I feel there should be some way out to retieve data.

Regards,

Srihari.

Read only

0 Likes
665

Hi Srihari,

goto se11, enter PEKPO than press where used. Goto these reports and look how PEKPO will be filled.

Hope it helps.

Regards, Dieter

Read only

0 Likes
665

it is used to provide programmers with a uniform structure that they can use in creating internal tables, work areas and even screens --- or should i say it can be used as atemplate.

like Vishwa said in response to your question, try to retrieve data from EKPO.

If the data is not enough try finding tables related to EKPO.