Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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')
;
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')
;
Thank you so much that worked great!!!!