on 10-09-2007 7:57 AM
Hi ,
i need to use an user defined function.. can any body give me the exact code.. for doing that.. because.. my requiremnt is i have one source struture and multiple receivers..
If the Nmae starts with Mr means.. those perosons details will goes to MALE RECEIVER..
IF the name starts with Ms then those details will moves to FEMALE RECEIVERS..
for this i'm useing an user defined in that i wrote this code. but it's not working... so, plz check this.. and correct it..
-
int i;
int mr=0;
int ms=0;
for(i=0; i<a.length;i++)
{
if( a<i>.substring(0,2).equals("Mr") && mr==0)
{
result.addValue("<b>MALE RECEIVER</b>"); ****my first receiver
mr=1;
}
if( a<i>.substring(0,2).equals("Ms") && ms==0)
{
result.addValue("<b>FEMALE RECEIVER</b>"); ****my second receiver
ms=1;
}
}
</textarea>
-
for helpful answers will be rewarded
thanks
BABU
Hi babu,
Try this one,
int i;
int mr=0;
int ms=0;
for(i=0; i<a.length;i++)
{
if( a<i>.substring(0,2).equals("Mr") && mr==0)
{
result.addValue("MALE RECEIVER"); ****my first receiver
mr=1;
}
if( <i>.substring(0,2).equals("Ms") && ms==0)
{
result.addValue("FEMALE RECEIVER"); ****my second receiver
ms=1;
}
}
the changes i made here is<b> a<i></b> (array)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
int i;
int mr=0;
int ms=0;
for(i=0; i<a.length;i++)
{
if( a<i>.substring(0,2).equals("Mr") && mr==0)
{
result.addValue("MALE RECEIVER"); ****my first receiver
mr=1;
}
if( a<i>.substring(0,2).equals("Ms") && ms==0)
{
result.addValue("FEMALE RECEIVER"); ****my second receiver
ms=1;
}
}
there was amistake in my previous reply a<i>
Hi Babu,
What is the occurence of your source "<b>NAME</b>" node??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi babu,
Check the links u can find lot of UDF's
http://flickr.com/photos/8764045@N06/
Example 1
http://www.flickr.com/photo_zoom.gne?id=544183191&size=o
http://www.flickr.com/photo_zoom.gne?id=544183195&size=o
http://www.flickr.com/photo_zoom.gne?id=544183225&size=o
http://www.flickr.com/photo_zoom.gne?id=544183233&size=o
Example 2
http://www.flickr.com/photo_zoom.gne?id=545133789&size=o
http://www.flickr.com/photo_zoom.gne?id=545133791&size=o
http://www.flickr.com/photo_zoom.gne?id=545133801&size=o
http://www.flickr.com/photo_zoom.gne?id=545133807&size=o
http://www.flickr.com/photo_zoom.gne?id=545133811&size=o
http://www.flickr.com/photo_zoom.gne?id=545138911&size=o
http://www.flickr.com/photo_zoom.gne?id=545138913&size=o
http://www.flickr.com/photo_zoom.gne?id=545138915&size=o
http://www.flickr.com/photo_zoom.gne?id=545138917&size=o
http://www.flickr.com/photo_zoom.gne?id=545138947&size=o
http://www.flickr.com/photo_zoom.gne?id=545138951&size=o
http://www.flickr.com/photo_zoom.gne?id=545005958&size=o
Example 3
http://www.flickr.com/photo_zoom.gne?id=549186611&size=o
http://www.flickr.com/photo_zoom.gne?id=549186651&size=o
http://java.sun.com/j2se/1.5.0/docs/api/
/people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi
/people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
Regards,
Phani
Reward Points if Helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This can be done in recevier determination using conditions in the configured receiver.
Select Condition and Add
Select Left Operand and then the field to check (Using XPath)
Opearation is equal
Right operand is Mr
Assign that to the comunication channel
Repeat for Ms.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI babu
your requirement is based on the starts name and on the basic of the starts name u have tow choice diffrent reciever . you can do it in condition editor in reciever determenation and it will work.
Thanks
sudhir sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sudir,
I'm doing Enhanced receiver determination.. so, we need to use the user defined function only.. in this function i need to write the code ..like.. if the name starts with MR then this message will moves to first receiver..
if the name starts with MS then this message will moves to Second receiver.. like this..
so, can u plz give me the coding..
regards
babu
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.