on 05-06-2008 12:57 PM
Hi guys;
is it possible to access a property file e.g. abc.properties in UDF?
Where to put the file in the integration server?
And how to access to file?
any help appreciated, maybe code sample?
Kind regards
Jochen
Are you looking for this??
/people/sap.user72/blog/2006/06/07/property-file-a-smart-use-in-xi-context
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
imports: java.util.Properties;
function myudf(Resultlsit result, Container container)
{
Properties propSet;
try{
propSet= new Properties();
propSet.load(new FileInputStream("/path/file.properties"));
Enumeration enum = propSet.propertyNames();
for (; enum.hasMoreElements(); ) {
String propName = (String)enum.nextElement();
String propValue = (String)_propSet.getProperty(propName);
result.addValue(propValue);
}
}
catch (Exception e)
{
trace.addWarning(e.getMessage());
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>>is it possible to access a property file e.g. abc.properties in UDF?
yes.
>>> And how to access to file?
we can use the property file at message mapping level.
in message mapping, we have edit java selection option.
u can find out three sections.
1.Intialisation section
2.global variable section
3.clen-up section
u can use property file accoring to u r requiremnt.
>>>Where to put the file in the integration server?
place the file on xi server (convient to u ) like /temp/prop/...etc
regards
mahesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you brief your requirement.
Thanks
Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys;
thanks for all your answers.
sekhar´s link is accurately that what I was looking for.
I want to define a UDF, that´s used for some kind of "FixValue Mapping".
but there is a huge list of values, so that defining it as FixValue is not very nice.
Therefore I want to put the values in a property file and access them in UDF
thanks again to all
Kind regards
Jochen
Hi,
Wat do u mean by property file. wat it contents.
can u explain properly.
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.