Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
load * inline [
LFARTEMP,
ZLI,
ZLD ];
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR;
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR from LIKP WHERE
Exists(LFARTEMP, LFART);
Think you are using exists the wrong way. This way, LIKP will only contain records where field LFARTEMP contains the value LFART.
You probably want to select records from LIKP where field LFART contains values that are also in field LFARTEMP.
[LFARTTEMP_TABLE]:
load * inline [
LFARTEMP,
ZLI,
ZLD ];
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR,
LFARTEMP;
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR
FROM LIKP LP, [LFARTTEMP_TABLE] LT
WHERE LT.LFARTEMP=LP.LFART;
Not sure if you can do this when loading from SAP. You could first load the LIKP table and use RESIDENT to link both tables.
This is wrong.
If you want to filter the data in SAP Application Server before loading it in memory use:
[LIKP]:
Load
MANDT,
VBELN,
VKORG,
WADAT,
LFART,
KUNNR,
LFARTEMP;
SQL SELECT MANDT VBELN VKORG WADAT LFART KUNNR
FROM LIKP
WHERE LFART in ('ZLI','ZLD');