Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am creating a link table based on three fact tables. But when i try to load it gives me an error that Field 'KEY' not found.
where 'KEY' is my composite key name. I can't understand what is an issue. Can anyone help me?
Thanks
Please paste the table in or at least the key fields from your script:
i.e. ....as %Key_MyKey
Hi
Can you post the script and full error message?
From the limited information i would guess that you are not creating the Key correctly in one or more tables, so it doesn't exist when being called.
Mark
share your script to try to help you.
share sample app or screenshots of the script
Here is my script
Fact1:
LOAD
MATNR&'|'&WERKS&'|'&SPMON as KEY,
SPMON,
MATNR,
WERKS,
MGVBR as [Total Usage Quantity]
FROM [lib://Tables/Fact1.qvd]
(qvd);
Fact2:
LOAD
MATNR&'|'&WERKS&'|'&SPMON as KEY,
SPMON,
MATNR,
WERKS,
MNG02 as Requirement
FROM [lib://Tables/Fact2.qvd]
(qvd);
Fact3:
LOAD
MATNR&'|'&WERKS as KEY,
MATNR,
WERKS,
SPTAG,
MZUBB as [Receipt Quantity],
MAGBB as [Issue Quantity]
FROM [lib://Tables/Fact3.qvd]
(qvd);
LinkTable:
Load
Distinct
KEY,
MATNR,
WERKS,
SPMON
Resident Fact1;
Drop Fields
MATNR,
WERKS,
SPMON
from Fact1;
Concatenate(LinkTable)
Load
Distinct
KEY,
MATNR,
WERKS,
SPMON
Resident Fact2;
Drop Fields
MATNR,
WERKS,
SPMON
From Fact2;
Concatenate(LinkTable)
Load
Distinct
KEY,
MATNR,
WERKS
Resident Fact3;
Drop Fields
MATNR,
WERKS
From Fact3;
Getting this error
Try like this
Fact1:
LOAD
MATNR&'|'&WERKS&'|'&SPMON as KEY,
SPMON,
MATNR,
WERKS,
MGVBR as [Total Usage Quantity]
FROM [lib://Tables/Fact1.qvd]
(qvd);
Fact2:
LOAD
MATNR&'|'&WERKS&'|'&SPMON as KEY,
SPMON,
MATNR,
WERKS,
MNG02 as Requirement
FROM [lib://Tables/Fact2.qvd]
(qvd);
Fact3:
LOAD
MATNR&'|'&WERKS as KEY,
MATNR,
WERKS,
SPTAG,
MZUBB as [Receipt Quantity],
MAGBB as [Issue Quantity]
FROM [lib://Tables/Fact3.qvd]
(qvd);
LinkTable:
Load
Distinct
KEY,
MATNR,
WERKS,
SPMON
Resident Fact1;
Concatenate(LinkTable)
Load
Distinct
KEY,
MATNR,
WERKS,
SPMON
Resident Fact2;
Concatenate(LinkTable)
Load
Distinct
KEY,
MATNR,
WERKS
Resident Fact3;
Drop Fields
MATNR,
WERKS,
SPMON
from Fact1;
Drop Fields
MATNR,
WERKS,
SPMON
From Fact2;
Drop Fields
MATNR,
WERKS
From Fact3;
Hi,
Can you Reload the Data in Debug mode and check in Table you are getting this Error.
Debug script line wise and then check at which line you are getting this error