cancel
Showing results for 
Search instead for 
Did you mean: 

UDF getParameter

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Why do u need a UDF.. use Standard Text function concat with delimiter as ':'.

Userid	------->
                |------> concat ---------> Status
Password------->

~SaNv...

Former Member
0 Kudos

Hi Santosh,

I am using this user id and password inside UDF to login into a URL link.

So I want to pass the userid and password inside my UDF.

Any help willl be appriciated.

Manisha

former_member204873
Contributor
0 Kudos

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

Answers (0)