Skip to Content

Getting error while trying to implement lookup table.

Aug 04, 2017 at 07:58 AM


avatar image


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.

lookup-error.png (45.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Nazeer Khan Aug 09, 2017 at 09:15 PM

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.

capture.png (49.2 kB)
Show 4 Share
10 |10000 characters needed characters left characters exceeded

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


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)


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.


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.. :P

Thanks & Regards

Ratan Dutta

RATAN DUTTA Aug 07, 2017 at 06:28 AM

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

10 |10000 characters needed characters left characters exceeded