on 06-01-2016 8:46 AM
Hi Friends,
I have one requirement,from sender we are receiving the 16 characters value and target is expecting 23 characters value including hyphen between every 2 characters.
For example:
source value: abcdefghijklmnop
Target expected value: ab-cd-ef-gh-ij-kl-mn-op
could you please suggest how can i achieve this with simple UDF?
I tried through standard functions, it's working fine.. but i need UDF for the same
Regards,
Janardhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janardhan!
You can use UDF which I posted in this thread
http://scn.sap.com/thread/3913013
with small changes.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Code goes something like this ...you have to modify it with parameter variable you are passing
Strina a="abcdefghijklmnop";
String s=new String();
String temp=new String();
int j=0;
for(int I=2;I<=a.length();I+=2)
{
if(I!=a.length())
{
s=a.substring(j,I)+"_";
temp=temp.concat(s);
j=j+2;
}
if(I==a.length())
{
s=a.substring(j,I);
temp=temp.concat(s);
}
}
return temp;
-Bhagya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.