Application Development 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: 

relate tables

Former Member
0 Kudos

hi all,

could anyone tell me is there any function module or any other easy way to find the relation between the tables...

i want to relate vbrk adrc vbrp .... but the problem is there is no common field between them .

thanks

reena

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Use this FM :

enter the table name and it will list all the related tables with field names

CTS_ORIG_FIND_RELATED_TABLES

regards

shiva

7 REPLIES 7

anversha_s
Active Contributor

Former Member
0 Kudos

HI!

VBRK and VBRP has the VBELN as key (VBRP has more lines).

VBRK and VBPA has VBELN as key (in VBPA you should define a partner type also f.e. PARVW = 'WE').

VBPA and ADRC has ADRNR and ADDRNUMBER as key.

Regards

Tamás

Message was edited by:

Tamás Nyisztor

Former Member
0 Kudos

Hi,

You can easily relate VBRK and VBRP with the common field VBELN

Coming to ADRC first link the KNA1 table with VBRK-KUNAG and get the ADRNR (address Number) and with the ADRNR you can link ADRC table.

Regards,

Anji

0 Kudos

hi anji..

i got your answer ..... but tell me how did you find it out . please let me know how to do the relation.

reena

Former Member
0 Kudos

Hi

Use this FM :

enter the table name and it will list all the related tables with field names

CTS_ORIG_FIND_RELATED_TABLES

regards

shiva

Former Member
0 Kudos

1) VBRK & VBRP

VBRK-VBELN = VBRP-VBELN.

2) Then for each VBELN find the parteners, address number in VBPA

VBPA-PARVW

VBPA-ADRNR

3) Then goto ADRC

VBPA-ADRNR = ADRC-ADDRNUMBER

Reena first workout on above steps using se16.

Then code the same

Regards,

MB

Former Member
0 Kudos

Hi reena,

display VBRK via SE11 and press GRAPHIK.

Regards, Dieter