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-link

Former Member
0 Likes
1,169

guy's can any one help me regarding table linking, if you

go for ko03 transcation ,enter order number ,and go for investment

tab,you can see Position ID ,now i want to know how i can

fetch Position ID using order number.pls provide me table linking

,i tried my best ,but unable to apply any logic.

7 REPLIES 7
Read only

andreas_mann3
Active Contributor
0 Likes
854

can'get your problem complete:

you mean table <b>AUFK</b> (Order master data)?

example:

SELECT  aufnr kostv akstl FROM  AUFK into table itab
         WHERE  AUART  = p_auart
         AND    BUKRS  = b_bukrs.

Message was edited by: Andreas Mann

Read only

0 Likes
854

yes but i want to fetch posid using aufnr

Read only

0 Likes
854

Check the table IMZO...

OBJNR should be the order number...

Thanks,

Renjith

Read only

0 Likes
854

Check the table IMZO...

OBJNR should be the order number...selct the posnr here and then search on table IMPR with posnr to get the posid.

Thanks,

Renjith.

Message was edited by: Renjith Andrews

Read only

Former Member
0 Likes
854

1. Open up another SAP Session

2. Execute transaction ST05

3. Activate SQL Trace

4. In other session lauch KO03 and go to investment tab

5. Go back to deactivate and display the SQL Trace.

All tables that the transaction has accessed should be displayed in order that they were accessed. Therefore the table you need should be close to the end. Start looking through this table list to find the correct table.

Chris

Read only

Former Member
0 Likes
854

U can use the FM to get the values for position id.

You need to pass the follwoing to the FM

i_objnr = order number concatenated with OR e.g OR000004000162.

i_aktyp = 'A'.

Hope this helps.

Abhijit

Read only

0 Likes
854

try:

select <b>objnr</b> from aufk into objnr
   where aufnr = itab-aufnr.

and with objnr you can fetch oth.tabl. like imzo, cosp,rpsco,...

Andreas