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: 

joinning of tables mseg and vbrp

Former Member
0 Kudos

Dear experts,

what are the joinning condition fields of vbrp and mseg tables. i checked in sqvi tcode but the fields which it is showing is blank in mseg.what to do.

1 ACCEPTED SOLUTION

anjan_paul
Active Contributor
0 Kudos

Hi,

At first join find VBRK-VBELN with VBRP-VBELN.

Then you have to get VBELV of VBRK-VBLEN from VBFA where VBTYP_N = 'M' and VBTYP_V = 'J'.

Then this VBELV can join with MSEG-MBLNR.

Edited by: Anjan Paul on Dec 22, 2010 7:15 PM

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try with MBLNR in Mseg and VBELN in vbrp individually and catch up another field if require, so thus you can get.

0 Kudos

thanks for ur reply sai,

actually my requirement,i have to display the first report of mb51 and add vbeln and netwr fields to that report. is it possibe..

i got them individually but how to move vbeln and netwr into that report while reading vbrp internal table.

Former Member
0 Kudos

HI,

In table MSEG in that one of the field is KDAUF and VBAP table field is VBELN.

Because KDAUD Field it refers VBELN DOMAIN.

REGARDS,

MURALII

0 Kudos

hi murali,

what u said is correct but kdauf field is blank to match it with vbeln.

0 Kudos

Hi,

I thing data is not available for the field KDAUF in u r table MSEG.Yes we can join VBELN IN VBAP AND KDAUF IN MSEG i tried that only also. Here blank means i am not undestand.

regards,

muralii

Former Member
0 Kudos

U can use table LIKP and VBFA to link VBRP and MSEG as follow:-

VBRP-VGBEL = LIPS-VBELN

VBRP-VGPOS = LIPS-POSNR

Material doc. numer

VBFA-VBELV = LIPS-VBELN

VBFA-POSNV = LIPS-POSNR

VBFA-VBTYP_N = 'R'

MSEG-MBLNR = VBFA-VBELN.

anjan_paul
Active Contributor
0 Kudos

Hi,

At first join find VBRK-VBELN with VBRP-VBELN.

Then you have to get VBELV of VBRK-VBLEN from VBFA where VBTYP_N = 'M' and VBTYP_V = 'J'.

Then this VBELV can join with MSEG-MBLNR.

Edited by: Anjan Paul on Dec 22, 2010 7:15 PM

Former Member
0 Kudos

Hi Subash,

Of course we can use vbeln and kdauf to join these two tables vbrp and mseg.

But now in your case we cannot join these two tables coz there is no matching value range of our primary key values.

U asked a question ...

i have to display the first report of mb51 and add vbeln and netwr fields to that report. is it possibe..

i got them individually but how to move vbeln and netwr into that report while reading vbrp internal table.

yes we can edit report and save those values and upload to internal table.

For this while displaying the first report include vbeln and netwr into the same internal table and make sure it displays in the output and edit those fields and save it back to ur internal table.

Hence u can get all the fields within a single output or file.

I hope this will help u......