on 04-27-2010 7:23 AM
hi all,
i am doing udf code,my requirement is like this
statecode state name
1 a
2 b
3 c
4 d
5 e
here state code is the input for udf,based on the state code input,i need to retrive the state name as an output for the udf.
two coloumns are seperated by tab(these two fields are maintaining in the file,here i need to do the lookup).
for the above requirement give me the udf code.
thanks in advance,
AVR
Hi all,
solved my problem.
Thanks,
AVR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
these two fields are maintaining in the file,here i need to do the lookup
could you let us know where are you placing the file?
If its a business requirement and you are not doing for just testing out something, i strongly advocate not to go for any file lookup.
Yes we can read the file but its always not secure and reliable as its dificult to maintain the FTP (it can be deleted or archived).
use a value mapping instead which will be good to maintain and can be changed going forward in different environments.
Regards,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this one !!!
return Character.toString((char)(Integer.parseInt(a) + 96));
Regards,
Sunil Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Be clear whehter your state values are Fixed or dynamic. If its a Fixed/Static tehn use Fixbyvalue function, else go for File Lookup.
http://wiki.sdn.sap.com/wiki/display/XI/FileLookupin+UDF
Regards
Ramg.
dont use a UDF.
Either use standard function like Fixvalues or then use value mapping.
do search in the forum to understand these options. there are plenty posts that will help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AVReddi,
Use FixValues function which is available in Graphical mapping. Maintain the values in FixValues table like source as state code and target as state name. Give that FixValues node function as input to UDF. This is very simple.
thanks,
madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.