cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error while trying to implement lookup table.

Former Member
0 Kudos

lookup-error.png

I have two source file "CUSTOMER_ATTR_SOP_RD_FILE" & "KNVP_RD_FILE" , both are .csv file in my local system. I want to copy the data of column NAME1 of "CUSTOMER_ATTR_SOP_RD_FILE" into taget table's NAME1 but the condition is i want to copy only those data form the NAME1 column which corresponding KUNNR(custid) matches with the KUNNAR(custid) of the KNVP_RD_file. While doing this i got an error. I have attached the screenshot of the error with my qs.Plesde suggest me the solution.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member423067
Active Participant

Hello Ratan,

Your syntax is wrong.

you are doing a lookup to Customer_ATTR File, so Customer_ATTR******.KUNNER should first then, KNVP_RD_FILE.KUNNR.

but even, if you modify the query, Looks like you need a substring. Not sure, you can use substring on the left operand. (U can try)

But Based on your requirement . I think you need a Inner Join. why are you trying to do a Lookup.

if you are using lookup then, why do you have both CUSTOMER*** and KNVP structure in source.

Former Member
0 Kudos

Thanks ,

Nazeer Khan for your help. I do understand your point that my requirement can be fulfilled by a filter and joining..but I am new to HCI so I am exploring all the options available in HCI.. that's why I need to know about Lookup Table and how to use it.

I didn't understand your point about "left operand".. Can you please explain it with an example?? and is it not possible to use two different source table in Lookup?(my concept is not clear :P)

Thanks & Regards

Ratan Dutta

former_member423067
Active Participant

lookup (<lookup_table>, <result_column>, <default_value>, <cache_spec>, <compare_column>, <expression>)

Above is the syntax for Lookup. "Compare Column" is the Column in the Lookup file and Expression is the data you are passing to Lookup to fetch the Compare Column from the File.

i refered "Compare Column" as left operand. My doubt was, about Substr(Customer_ATTR******.KUNNER)

Former Member
0 Kudos

Thanks again Nazeer Khan for your reply..

But can you please give me a screenshot of an example of lookup function used in HCI... that will be good for me to visualise the concept, from theory i am not getting it properly.. 😛

Thanks & Regards

Ratan Dutta

Former Member
0 Kudos

Hi Nazeer,

Thanks for your previous ans. I have gone through a document related lookup table where the same thing was mentioned as you told me about the syntax of lookup table. But the problem is in that doc there was no info about the source and target table which made me confused about the mapping,means which attribute belongs to which table source or target,that's why i requested you for a screenshot of an example of implementation of lookup. Could you please provide me a screenshot,that would be very helpful for me and will help me to clear my doubts.

Thanks in advance.

Answers (1)

Answers (1)

Former Member
0 Kudos

Is there anyone???? Please help me..