on 2013 Dec 16 11:46 AM
Hi Friends,
Am new to BODS...i want to know the syntax for lookup function(not lookup_ext) for comparing two column in lookup table...
for one column i could do that
syntax: lookup(TABLE_NAME,RESULT_COLUMN,DEFAULT VALUE, CACHE,COMPARE COLUMN, EXPRESSION)
condition :lookup(DEW_EnterpriseWarehouse_DS01.DBO.EMP, EMP_NO, -1, 'NO_CACHE', EMP_FIRST_NAME, SRC_EMP_FIRST_NAME) am getting the right output
But my question is how to compare two column in single lookup function.....
in the above example am using first name and taking the emp_id ...but i want to take emp id based on firstname and last name ....how to do that with the help of lookup function.....
Thanks.
Hi Gokul ,
You can use a lookup function with two expression and compare_column pairs take a look at the example below:
lookup(sap_ds..VBUP, GBSTA, 'none', 'NO_CACHE', VBELN, VBAK.VBELN, POSNR, VBAP.POSNR)
This function returns the value from the GBSTA column in the VBUP table that corresponds to the VBELN value in the VBAK table and the POSNR value in the VBAP table. When no corresponding value is found, the function returns "none."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks sandeep....
I re framed it below as per my under standing pls correct it if am wrong....
Lookuptable Source Table
VBELN = VBAK.VBELN
POSNR = VBAP.POSNR
return column = GBSTA
and my 2nd question is can we able to use other relation operator(!=,<,>) in lookup function If yes pls provide me some example....
Hi Gokul,
You can look up only 1 column from a table or file using Normal lookup() function.
You should use lookup_ext() function if you wanted to look up multiple columns from a table or file.
Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.