on 09-04-2007 6:58 AM
Hi all,
I need to write an UDf for the Following Requirement.
If the Input Value for a Particular Field in the Source Structure is "ABC", then I Need to Pass "XYZ" Value to the Target Field.
If the Incoming value is not "ABC" in the Source File Means I Should Pass "Constant" to the Target Structure.
Please Help me.
Regards
Phani
hi,
Use this code;
pass String a as argument.and result as context.
-
if(a[0].equals("ABC"))
{
result.addValue("XYZ");
}
else
{
result.addValue("constant");
}
-
Regards,
Akshay.
reward points if find useful.
null
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phani....
Follow this Mapping schema...
http://www.flickr.com/photos/11767150@N03/1318915918/
My input node is Name and output node is DOCNUM.
Test results:
When Input node value is ABC
http://www.flickr.com/photos/11767150@N03/1318023341/
When Input node value is not ABC
http://www.flickr.com/photos/11767150@N03/1318024863/
Regards
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi No need of UDF...
Map the Input field to IF Else...
Input field--
Target.
Give the another Equals node function as Constant containing value "ABC".
Map the a constant containing "XYZ" to the <b>THEN</b> part of IF structure.
Map the a constant containing "Constant" to the <b>ELSE</b> part of IF structure.
Regards
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You dont need a UDF here.
This can be established using the standard functions in XI.
You can use the Boolean IF function ( http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
)
and get the req. done.
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 | |
11 | |
10 | |
9 | |
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.