Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Mapping load Issue

hi ,

i am new in qlikview , i am trying to mapping load in my code but i am getting error in my code .i want to map
[GSTRP] as Date column into FACT_MaintenanceOrderHeader .

below is my code;

Dim_OrderHdr:

Load

   [AUFNR] as [Order_AUFNR],

   [GLTRP] as [Basic fin. date_GLTRP],

   [GSTRP] as [Bas. start date_GSTRP],

   [GSTRP] as Date,

   ;

   SQL Select AUFNR GLTRP GSTRP from AFKO where GSTRP >= '20120401'

;

//WHERE AUFNR IN (SELECT AUFNR from AFKO WHERE GLTRP Between '20100401' AND '20110430')

STORE * FROM [Dim_OrderHdr] INTO E:\ test\Dim_OrderHdr.QVD;

DROP TABLE [Dim_OrderHdr];

Dim_OrderHdrtest:

Mapping Load

Order_AUFNR,

Date,

from

E:\ test\Dim_OrderHdr.QVD;

FACT_MaintenanceOrderHeader:  

NoConcatenate

Load

   [AUFNR] as [Order_AUFNR],

   [QMNUM] as [Notification_QMNUM];

SQL Select  AUFNR QMNUM from AFIH

;

STORE * FROM [FACT_MaintenanceOrderHeader] INTO E:\ test\FACT_MaintenanceOrderHeaderbase.QVD;

FACT_MaintenanceOrderHeader:  

NoConcatenate

Load

   [Order_AUFNR],

    [Notification_QMNUM],

   ApplyMap('Dim_OrderHrdtest','O_AUFNR','unknown');

  from

E:\ test\Dim_OrderHdr.QVD;

please do the needful:

4 Replies
Anonymous
Not applicable
Author

can you post error message?

whatI notice you Need to pass a correct value to applymap and passfieldname  without quotes

FACT_MaintenanceOrderHeader:  

NoConcatenate

Load

   [Order_AUFNR],

    [Notification_QMNUM],

   ApplyMap('Dim_OrderHrdtest',Order_AUFNR,'unknown') as MyDate;

  from

E:\ test\Dim_OrderHdr.QVD;

atoz1158
Creator II
Creator II

Hi

You seem to have a comma after the date field in your mapping load this needs to be removed

Regards

Adrian

prieper
Master II
Master II

Dim_OrderHdrtest:

Mapping Load

Order_AUFNR,

Date

from

E:\ test\Dim_OrderHdr.QVD;

has one Comma too much

APPLYMAP has the fieldname without apostrophs, think that you refer to the field Order_AUFNR?:

FACT_MaintenanceOrderHeader:  

NoConcatenate

Load

   [Order_AUFNR],

    [Notification_QMNUM],

   ApplyMap('Dim_OrderHrdtest',O_Order_AUFNR,'unknown');

  from

E:\ test\Dim_OrderHdr.QVD;

hari8088
Creator
Creator

Hi in applymap map syntax we should not use single quates('') for field name and this filed must exits in current table.

see below

Dim_OrderHdr:

Load

   [AUFNR] as [Order_AUFNR],

   [GLTRP] as [Basic fin. date_GLTRP],

   [GSTRP] as [Bas. start date_GSTRP],

   [GSTRP] as Date,

   ;

   SQL Select AUFNR GLTRP GSTRP from AFKO where GSTRP >= '20120401'

;

//WHERE AUFNR IN (SELECT AUFNR from AFKO WHERE GLTRP Between '20100401' AND '20110430')

STORE * FROM [Dim_OrderHdr] INTO E:\ test\Dim_OrderHdr.QVD;

DROP TABLE [Dim_OrderHdr];

Dim_OrderHdrtest:

Mapping Load

Order_AUFNR,

Date,

from

E:\ test\Dim_OrderHdr.QVD;

FACT_MaintenanceOrderHeader: 

NoConcatenate

Load

   [AUFNR] as [Order_AUFNR],

   [QMNUM] as [Notification_QMNUM];

SQL Select  AUFNR QMNUM from AFIH

;

STORE * FROM [FACT_MaintenanceOrderHeader] INTO E:\ test\FACT_MaintenanceOrderHeaderbase.QVD;

FACT_MaintenanceOrderHeader: 

NoConcatenate

Load

   [Order_AUFNR],

    [Notification_QMNUM],

   ApplyMap('Dim_OrderHrdtest',Order_AUFNR,'unknown');

  from

E:\ test\Dim_OrderHdr.QVD;