Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinRamsey
Creator
Creator

Need Help with a Join

Good Morning, I am working on an app and I am in need of a join that I have not gotten to work. In Table VBAK I have the Key VBELN and the important Value I need SPART. In table VBPA I have the same key VBELN but I do not have the SPART value. I need that value to create a hybrid key with another value in VBPA to look like KUNNR-SPART to correctly link to other tables.  Any suggestions on how to make this work? I have attached a the load script for the two tables to give a better picture of what Im explaining. Just need to create a key using the values VBPA.KUNNR and VBAK.SPART. together. 

1 Solution

Accepted Solutions
MayilVahanan

Hi @JustinRamsey 

Try like below

Directory;
LOAD VBAK.MANDT,
VBAK.VBELN as %Key_VBELN,
VBAK.SPART
FROM
[Q:\PROD\20_QVD_ROH\SAP\VBAK.QVD]
(qvd);

MapSPART:
Mapping Load %Key_VBELN,
VBAK.SPART Resident VBAK;

Directory;
LOAD VBPA.MANDT,
VBPA.VBELN as %Key_VBELN,
VBPA.POSNR,
VBPA.PARVW,
VBPA.KUNNR,
ApplyMap('MapSPART', VBPA.VBELN , 0) as VBPA.SPART
FROM
[Q:\PROD\20_QVD_ROH\SAP\VBPA.QVD]
(qvd)
where(VBPA.PARVW='ZE')
;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi @JustinRamsey 

Try like below

Directory;
LOAD VBAK.MANDT,
VBAK.VBELN as %Key_VBELN,
VBAK.SPART
FROM
[Q:\PROD\20_QVD_ROH\SAP\VBAK.QVD]
(qvd);

MapSPART:
Mapping Load %Key_VBELN,
VBAK.SPART Resident VBAK;

Directory;
LOAD VBPA.MANDT,
VBPA.VBELN as %Key_VBELN,
VBPA.POSNR,
VBPA.PARVW,
VBPA.KUNNR,
ApplyMap('MapSPART', VBPA.VBELN , 0) as VBPA.SPART
FROM
[Q:\PROD\20_QVD_ROH\SAP\VBPA.QVD]
(qvd)
where(VBPA.PARVW='ZE')
;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
JustinRamsey
Creator
Creator
Author

Thank you so much that worked great!!!!