Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

Apply map - where is the bug

Hi everybody,

I've tried the first time to use apply map instead of join statement but it is not working as I thought.  The reload works but I don't see in the VBEP table the REQ_Delivery_Date. Do you know where the mistake is?

Here the code

MappingEDDtoVBEP:

 

Mapping Load %VKANRHD%POSHD as %VBELN%UEPOS,

                        ZGS_SCM_MONITOR.EARLIEST_DELIV       

From

  ...Pickup_Reliability\QVDs\ZGS_SCM_MONITOR_01.qvd (qvd)

;     

VBEP:

Load *,

ApplyMap('MappingEDDtoVBEP',%VBELN%UEPOS) as REQ_Delivery_Date

;

Thank you in advance

BR

Michael

 

1 Solution

Accepted Solutions
salto
Specialist II
Specialist II

Hi,


MappingEDDtoVBEP:

Mapping Load %VKANRHD%POSHD as %VBELN%UEPOS,

                        ZGS_SCM_MONITOR.EARLIEST_DELIV      

From

  ...Pickup_Reliability\QVDs\ZGS_SCM_MONITOR_01.qvd (qvd)

;    

VBEP:

Load *,

ApplyMap('MappingEDDtoVBEP',%VBELN%UEPOS, 'No match') as REQ_Delivery_Date

From [YOUR VBEP TABLE]

;


Hth.

View solution in original post

23 Replies
rustyfishbones
Master II
Master II

try removing the Alias on the Mapping Table

Mapping Load %VKANRHD%POSHD ,

                        ZGS_SCM_MONITOR.EARLIEST_DELIV      

From

  ...Pickup_Reliability\QVDs\ZGS_SCM_MONITOR_01.qvd (qvd)

;    

VBEP:

Load *,

ApplyMap('MappingEDDtoVBEP',%VKANRHD%POSHD) as REQ_Delivery_Date

;

anbu1984
Master III
Master III

From which table are you loading VBEP?

VBEP:

Load *,

ApplyMap('MappingEDDtoVBEP',%VBELN%UEPOS) as REQ_Delivery_Date

;

salto
Specialist II
Specialist II

Hello Michael,

ApplyMap('MappingEDDtoVBEP',%VBELN%UEPOS,'Not Found') as REQ_Delivery_Date


Is there a correspondence between the values of the second table and the values of the mapping table? If not, maybe that is the reason to have no values in REQ_Delivery_Date.


Hth.-

Not applicable

Hi,

VBEP:

Load *,

ApplyMap('MappingEDDtoVBEP',%VBELN%UEPOS) as REQ_Delivery_Date

;

What is the source for this table,atleast you need to use resident or else uyou can load it from some other table.

maternmi
Creator II
Creator II
Author

Hi,

Thank you for your feedback. I modified the apply map statement as suggested but without success. Without alias, with from and resident in the mapping table. I also add 'Not found'...

My table VBEP will be loaded at the beginning with the data base model, so it already exists.

Have you further ideas?

maternmi
Creator II
Creator II
Author

Hello Salto,

what do you mean with correspondanc between the values. The ID is equal but there is no equal date field.

BR

Michael

oknotsen
Master III
Master III

What error are you getting (if any)?

Does %VBELN%UEPOS exist in the source you use for VBEP?

What is the content of that field in VBEP? Is there actually any content?

Does it match the casing in the mapping table?

May you live in interesting times!
maternmi
Creator II
Creator II
Author

yes, %VBELN%UEPOS is the id of the table VBEP

if you mean the content of Req_Delivery_Date, then the column doesn't exists.

Actually with apply map I wanted to avoid (left joins statements). Is it possible or did I misunderstand the function of apply map

mrybalko
Creator II
Creator II

Could you please provide test qvw?

You can check mapping table consistency by joining it to fact table. The problem may be in columns data types. For example in mapping table dates are strings and in fact tables - numbers.