Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Regarding the udf

$
0
0


Hi experts,

 

               i had a requirement where i need to send the customer no to the target .the input can be either numeric or alpha numeric or it can be null some times. if it is numeric value i need get input no preceeded by '0'  i have tried the following code and it worked for both the alphanumeric input values but it doesnot work for the null values.could you please suggest me . suggested person will be appriciated.

 

Execution type: single values i have taken


int count = 0;

for (int i = 0; i <= var1.length(); i++)

{

if(!Character.isDigit (var1.charAt(i)))

{

count = count +1;

break;

}

}

if (count>=0)

{

return var1;

}

else

{

String format = String.format("%010d",Integer.parseInt(var1));

return format;

}

 

 

Thanks

Giridhar


Viewing all articles
Browse latest Browse all 7030

Trending Articles