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

Pulling data from structure?

Former Member
0 Likes
1,204

Hi Experts,

On SAP screens, by usinf F1, can see From that field, Where (to which table) to passing/storing the data (e.g. Doc. header text in MB1B transaction is storing in MKPF-BKTXT).

But, some times, its a Strructure, then, (e.g. for Movement type field, its the F1 showing as structure as RM07M (-BWARTWA).

1 - To Where the data is passing?

2 - How to pull it in to my program requirement?

ThanQ.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
982

As you know a structure is built with the fields from some Data base tables.

1. Where the data is passing?

Basically try to find out the package in which the structure exists.

Get the package name and then search the tables under this package in SE80.

From the list of the tables find the field which you are searching for.

Definitely the structure should be built from only these Data base table fields.

Then you can know like, where the data is passing ( which table field, I meant) .

2 - How to pull it in to my program requirement?

To pull in your program, try to mention the appropriate table name, which you figure thru the above SE80 process. Use this table in your program select statement to get the data.

Hope this helps you……..Else correct me.

Regards.

Shekar.

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
982

In these cases, you must dig a little deeper and sometimes use a SQL trace to see which tables are being hit. SQL Trace is transaction ST05

REgards,

Rich Heilman

Read only

Former Member
0 Likes
983

As you know a structure is built with the fields from some Data base tables.

1. Where the data is passing?

Basically try to find out the package in which the structure exists.

Get the package name and then search the tables under this package in SE80.

From the list of the tables find the field which you are searching for.

Definitely the structure should be built from only these Data base table fields.

Then you can know like, where the data is passing ( which table field, I meant) .

2 - How to pull it in to my program requirement?

To pull in your program, try to mention the appropriate table name, which you figure thru the above SE80 process. Use this table in your program select statement to get the data.

Hope this helps you……..Else correct me.

Regards.

Shekar.

Read only

ferry_lianto
Active Contributor
0 Likes
982

Hi,

This is what I typically do, if I need to find out what table(s) that a given structure ultimately points to.

1. Debugging is one option.

2. Go to SE12, give the structure name, do a where used in programs, tables and function module interfaces. You may end up in getting a lengthy list but you need a good process of elimination to get to the tables. If the structure is used in a table as an INCLUDE or APPEND structure, well and good. But if it is used in a program or a function module interface, I would go to the code and see where the structure is getting filled and with what information. If you could continue to follow this trace, to the main program where the data declarations are at, you will find the tables that are defined. Sometimes searching for a 'Select' statement could lead you to the table.

Though it sounds cumbersome, most often, I could get my answer and in a quick time.

Regards,

Ferry Lianto

Read only

0 Likes
982

ThanQ to all.

Read only

Former Member
0 Likes
982

Sometimes the structure will show an Entry/Check table on that particular field. For example if you display the structure RM07M in SE11, it shows table T158B for the field BWARTWA in the Entry help/check tab. But note, this might not be the case always !

Thanks,

Kavita