on 03-18-2010 2:42 PM
Hi experts,
I am new to JAVA.
My messge mapping structure is:
sender Receiver
MT_CC_Stop MT_CC_Ctatus
Userid (1..1) Status (1..1)
Password (1..1)
I have one UDF where i am using :
String userPassword = "UserID:Password";
If the userid and password is hard coded its working fine.
Bur my requirement is to get the userid and password from the payload dynamically from the field Userid and Password by passing it.
Any help for this coding.
Edited by: Manisha Das on Mar 18, 2010 3:45 PM
Why do u need a UDF.. use Standard Text function concat with delimiter as ':'.
Userid ------->
|------> concat ---------> Status
Password------->
~SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create an UDF in message mapping with two input parameters(Userid and Password), and then use
String out = Userid + ":" + Password;
If u want to check for if Userid or Password is blank or not use
String out = "";
if(Userid.length != 0){
// Dynamic value
out = Userid + ":" + Password;
}
else{
// Hardcoded value
out = "useid:password";
}
Check this:
/people/william.li/blog/2008/01/02/sap-pi-71-mapping-enhancements-series-share-user-defined-functions
/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.