Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Link Table (Key Field Not Found Error)

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

9 Replies
Anonymous
Not applicable
Author

Please paste the table in or at least the key fields from your script:

i.e. ....as %Key_MyKey

Mark_Little
Luminary
Luminary

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

agigliotti
Partner - Champion
Partner - Champion

share your script to try to help you.

shraddha_g
Partner - Master III
Partner - Master III

share sample app or screenshots of the script

Anonymous
Not applicable
Author

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;

Anonymous
Not applicable
Author

Getting this error

Err.PNG

prma7799
Master III
Master III

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;

mdmukramali
Specialist III
Specialist III

Hi,

Can you Reload the Data in Debug mode and check in Table you are getting this Error.

shraddha_g
Partner - Master III
Partner - Master III

Debug script line wise and then check at which line you are getting this error