‎2006 Jun 19 4:10 AM
I'm little confused on how table structure works. But how can I fetch a dat from the table structure AFVGD?
‎2006 Jun 19 4:12 AM
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
‎2006 Jun 19 4:17 AM
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
‎2006 Jun 19 4:18 AM
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.
‎2006 Jun 19 4:25 AM
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
‎2006 Jun 19 4:46 AM
But how can I retrieve the data from the structure AFVGD? That's my problem for now.
‎2006 Jun 19 4:52 AM
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
‎2006 Jun 19 4:53 AM
hi jose,
<b>again you cant retrive data from structure you can only retrieve it from the table...</b>
‎2006 Jun 19 6:17 AM
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.
‎2006 Jun 22 7:23 AM
I want to retrieve the production order operations and I'm having diffulty in finding what table they resides.
‎2006 Jun 22 7:26 AM
hi
could you open a new thread for this question.
mark all useful answers in this thread.
Cheers,
Abdul Hakim
‎2006 Jun 19 4:54 AM
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