- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sap sql WHERE CLAUSE THRWOING OPEN_SQL_KEY ERROR
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);
- Tags:
- sap_sql
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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');