cancel
Showing results for 
Search instead for 
Did you mean: 

SQVI using FBL5N, VBAK, VBAP & VBRP data

Former Member
0 Kudos

I am trying to build a SQVI report using the FBL5N data (BSID and BSAD tables) and the VBAK table data.  However I cannot find a way to link or join the tables to get the information I need. Eventually I would like the final query to include data from these fields in VBAK, the VBELN, AUART and VGBEL fields along with one custom field. I would like to add this data to  the data in the BSID and BSAD tables to get a "custom" FBL5N.  I have tried getting the data by using the VBAP and VBRP tables but still can't get it to work. Am I missing a table to complete my loop or connections?  Thanks. 

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Instead of BSID BSAD, use BKPF join VBRK and VBRK join VBRP.

For VBRP join VBAP, you have to use info set(SQ02) with extra fields and some coding to select from VBAP..

former_member220617
Contributor
0 Kudos

Dear Dana,

check the below logic will help to you in the linking.

Pass BSID_BIART=RV then take XBLNR  and this you pass in VBFA_VBELN table and fetch VBFA_VBELV & pass this in VBAK_VBELN to fetch AUART,VGBEL.

kindly reply me if you want any other out put.

Regards,

C.B Reddy.

former_member183879
Active Contributor
0 Kudos

Hi Dana,

I see a problem in using both BSID and BSAD in the same query as the entries in this table are mutually exclusive. I would suggest to have 2 queries one with BSID alone and another with BSAD alone.

Also, with these tables I dont know what kind of p.key-foreign key assignments you use. Try to use as many links as possible between VBRK and BSID or BSAD. Apart from payer/ sold to party, and the assignment / reference field, you can also check the Reference document will help.

Also, you should ideally be defining your query first from VBRK to BKPF and then BSEG and from there you should go to either BSID or BSAD.

Try this and do let me know if this is not working. I tried this earlier and it worked for me. I will try from myside once again to confirm the same.