on 10-19-2007 9:25 AM
I have to write a user defined function in SAP XI. the scenario is as follows.
UDF needs to extract the mailid from source field.
source field : mail id
target field: from maild id
source example: "abc xyz"<abc.xyz@def.com>
target example: abc.xyz@def.com
pls any one help to write java code in udf.
pls response ASAP.
Thanks in Advance.
Regards,
Raghu
i got exact solution.
Thanks
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu ,
Don't use UDF you cn do this by using Standerd Functions given by SAP .Follow the Steps : -
Concate abc and XYZ using concat them and in concate you give "." in between So it will look like "abc.xyz" and then you can use append function to append @def at the end .
Dont use UDF as they are over head .
Regards,
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu Ram,
public String mailId(String a,Container container){
//write your code here
String b = a.substring(a.indexOf("<")+1, a.lastIndexOf(">"));
return b;
mailId - u r udf name, a - is input field of Source field to this UDF.It will solve u r problem.
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
public void func(String inputMail)
{
String outputMail = inputMail.substring(inputMail.indexOf("<")+1, inputMail.lastIndexOf(">"));
return outputMail;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use this logic
the input is myInput
String output = myInput.substring(myInput.indexOf("<")+1, myInput.lastIndexOf(">"));
return output;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Y r u going for UDF. You dircetly use Graphical mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.