Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinRamsey
Contributor III
Contributor III

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

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

View solution in original post

JustinRamsey
Contributor III
Contributor III
Author

Thank you so much that worked great!!!!