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

Table Structure

Former Member
0 Likes
1,330

I'm little confused on how table structure works. But how can I fetch a dat from the table structure AFVGD?

11 REPLIES 11
Read only

suresh_datti
Active Contributor
0 Likes
1,197

A structure can be used to hold data only during the runtime of aprogram. you cannot fetch data as it is not a table.

~Suresh

Read only

abdul_hakim
Active Contributor
0 Likes
1,197

hi jose,

you cannot fetch data from structure instead it is used to hold data at runtime.

for eg.

tables mara."defining structure or interface workarea..

parameters p_matnr like mara-matnr.

select single * from mara where matnr = p_matnr.

**the above select query fetches the data from the table MARA and place it in the structure MARA iteself.

Cheers,

Abdul Hakim

Read only

Former Member
0 Likes
1,197

hi ,

Use Pattern button in ur program,Check <b> Structured data obj </b> -> fields from structure. Select the fields u want.Enter the name

It will create a structe with the needed fields..

DATA: BEGIN OF i_sub <b> occurs 0 </b>,

mandt TYPE afvgd-mandt,

aufpl TYPE afvgd-aufpl,

END OF i_sub.

Add occurs 0. Now your Internal table is ready.

Rgds,

Jothi.

Read only

Former Member
0 Likes
1,197

Hi Adrian,

Structure cannot hold data as structure is just used for data definition purpose.

You can store data in an internal table declared like a structure but not in structure directly.

Cheers,

Vikram

Read only

0 Likes
1,197

But how can I retrieve the data from the structure AFVGD? That's my problem for now.

Read only

0 Likes
1,197

Looks like you are dealing with a user exit / function which has a paramter of the type AFVGD. Is my assumption, right?

If yes, the structure will have data when the function / exit is being executed.

Else, you need to find the concerned table and get the data. If you are looking for work order data look at AFKO, AFVC tables or VIAUFKST view.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
1,197

hi jose,

<b>again you cant retrive data from structure you can only retrieve it from the table...</b>

Read only

0 Likes
1,197

The field that I'm looking is not in AFKO or AFVC. I even look at the hierarchy and can't found it. I' looking for the fields xmnga, lmnga and rmnga.

Read only

0 Likes
1,197

I want to retrieve the production order operations and I'm having diffulty in finding what table they resides.

Read only

0 Likes
1,197

hi

could you open a new thread for this question.

mark all useful answers in this thread.

Cheers,

Abdul Hakim

Read only

Former Member
0 Likes
1,197

Hi Adrian,

If your structure have a value, then fetch the data using <stucture Name>-<Field name>.

In ur case,

AFVGD-<<i><b>Field name</b></i>>

write: / AFVGD-<<i><b>Field name</b></i>>.

- Selvapandian Arunachalam