02-26-2007 12:05 PM
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
02-26-2007 12:24 PM
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
02-26-2007 12:08 PM
02-26-2007 12:08 PM
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
02-26-2007 12:09 PM
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
02-26-2007 12:17 PM
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
02-26-2007 12:24 PM
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
02-26-2007 12:36 PM
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
02-26-2007 12:45 PM