on 11-29-2007 5:20 AM
Can any one help me by giving steps that should be followed in creating UDF.the UDF should be used for mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rupesh,
Refer to url http://help.sap.com/saphelp_nw70/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
Also here is some sample code for different scenarios
<b>Example 1</b>
This example copies the value of the Dynamic Configuration variable DCJMSCorrelationID into the message field CORRELID
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create
("http://sap.com/xi/XI/System/JMS","DCJMSCorreleationID");
String Corrid = conf.get(key);
return Corrid;
<b>Example 2</b>
This example prefills the input with zeros (if required)
NumberFormat f = new DecimalFormat("0000000000");
if(a.equals("") || a.equals(null))
return a;
else
return f.format(Integer.parseInt(a));
<b>Example 3</b>
This example checks and if the input string is null returns a message
if(a.equals("") || a.equals(null))
a = "No query data returned";
return a;
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi rupesh,
Just refer this discussion, you will get all the details regarding UDF's with screen shots.
https://forums.sdn.sap.com/click.jspa?searchID=7025851&messageID=4236140
regards
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rupesh,
There are 2 types of UDF - Simple and Advanced
- Simple UDFs uses Value, wherein we can manipulate only one value (input is one String). Therefore a single string is expected, as input and the output would also be a single string.
- Advanced UDFs uses Context or Queue, where you manipulate many values (input is an array of Strings).
Give me ur mail-id ...so that i can send you some examples using UDF's...
Note : when standard functions are not met your requirements then you can use UDF's
Regards,
Ramana Kumar. A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.