Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following tables in Script:
COBK:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
DATE(BUDAT) AS CONT_DATE
FROM DAT_05_SAP_CO_COBK_*.qvd (qvd)
WHERE BUDAT >= '01/07/2015';
COEP:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
WKGBTR,
OBJNR
FROM DAT_06_SAP_CO_COEP_*.qvd (qvd)
WHERE LEFT(OBJNR,2)='KS';
What I need is to make an INNER JOIN between them (by field %KEY_COBK).
The thing is I've tried the following:
GENERAL:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
DATE(BUDAT) AS CONT_DATE
FROM DAT_05_SAP_CO_COBK_*.qvd (qvd)
WHERE BUDAT >= '01/07/2015';
INNER JOIN(GENERAL)
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
WKGBTR,
OBJNR
FROM DAT_06_SAP_CO_COEP_*.qvd (qvd)
WHERE LEFT(OBJNR,2)='KS';
But I have 0 results. Instead, if I do the following I get the data:
GENERAL:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
DATE(BUDAT) AS CONT_DATE
FROM DAT_05_SAP_CO_COBK_*.qvd (qvd)
WHERE BUDAT >= '01/07/2015';
COEP:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
WKGBTR,
OBJNR
FROM DAT_06_SAP_CO_COEP_*.qvd (qvd)
WHERE LEFT(OBJNR,2)='KS';
INNER JOIN(GENERAL)
LOAD *
RESIDENT COEP;
DROP TABLE COEP;
Do you know how could I do to get my 1st option working, by joining directly both tables?
Thank you!!!
Hello
Have you tried this.
GENERAL:
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
DATE(BUDAT) AS CONT_DATE
FROM DAT_05_SAP_CO_COBK_*.qvd (qvd)
WHERE BUDAT >= '01/07/2015';
INNER JOIN
LOAD
KOKRS&'|'&BELNR AS %KEY_COBK,
WKGBTR,
OBJNR
FROM DAT_06_SAP_CO_COEP_*.qvd (qvd)
WHERE LEFT(OBJNR,2)='KS';
It should n't give a problem actually, we are sure table GENERAL not autoconcatenating to any tables above?