cancel
Showing results for 
Search instead for 
Did you mean: 

SD report Joining condition

Former Member
0 Kudos

Hello all,

I am developing an SD report similar to SDO1 report. I need to join tables VBAK,VBAP,LIKP,LIPS,MSEG,MKPF,VBUK,VTTK,VTTP for sales order, delivery,post goods issue,shipment fields. I can join VBAK,VBAP,LIKP,LIPS,VTTK,VTTP.

Could anyone tell me how to join MSEG,MKPF,VBUK table with these table?

Thanks,

Gokul

Accepted Solutions (0)

Answers (5)

Answers (5)

jason_barton
Active Participant
0 Kudos

How about utilizing a logical database first for your infoset? For example VAV to capture much of your requirement. Then work to logical make joins for the balance where need be. This should mitigate the performance issues that will definitely arise by making so many joins ...

Thanks,

Jason

Former Member
0 Kudos

Dear ravi

go to sqvi and use table join and u can check the key fields common in both tables .

Raj

Former Member
0 Kudos
Will this work?






MSEGMKPF- MBLNR = MSEG- MBLNR
MKPFLIPK- VBELN = MKPF - LE_VBELN
Former Member
0 Kudos

Hi RaviTeja ,

Can you explain us what are the information you look for in the Report? As mr.PPIO mentioned, if you link multiple tables, there will be a performance issue.

With regards

Vinu Nanjan

moazzam_ali
Active Contributor
0 Kudos

check in SE11 for MSEG and MKPF for these fields you mentioned above. If data is filling in these fields then definitely you can join these fields in query report too.

Former Member
0 Kudos

MKPF- MBLNR = MSEG- MBLNR

LIPK- VBELN = MKPF - LE_VBELN

To use MKPF-LE_VBELN, you have to make sure all material documents have this field as delivery number.

I believe, this is only for GI document. So how you select MSEG-MBLNR is a important factor.

moazzam_ali
Active Contributor
0 Kudos

Agreed with Alan Love. Another option is that you can select any field from MSEG or MKPF by creating one additional field. For this you have to create additional field with its logic in SQ02. You can add coding of tw lines for selecting any field. For document flow you must consider VBFA and VBTYP_N field in it.

Former Member
0 Kudos

You have to consider VBFA join with VBAP. There is delivery documnet, Material document to join base on each selected subsequent category. You can then join VBFA with MKPF and then MSEG. For VBUK, depends on whether you are looking at sales order or delivery document in VBUK, you can either join VBAK with VBUK or LIKP with VBUK.

former_member184701
Active Contributor
0 Kudos

dear,

looking at your question

"Could anyone tell me how to join MSEG,MKPF,VBUK table with these table?"

it seems like you will simply crush the process getting runtime error (mseg will be impacted)

you would have 2 options:

-try to find out the existing standard or custom report which will meet (or mostly meet) your requirement;

-search the ABAP forum looking at right technic and writhe new report based on correct logic

good luck