Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to Send a Value from source to Target as 3 split value

Hi Expert,

I need a help.

My requirement is I have  a filed name "Comments" in source  system and this comment filed i needs to pass to the target in 3 fields.The comment value will be separated in 3 fields like 1)Details 1, 2)Details 2,and 3) Details,as a 40 character. so how can i get this output Kindly help me.Thanks in advanced.


Former Member

Hi Wasim,

you can use the below UDF.

Input parameter

input - input string

number - how many no of char (in your case it is 40)

pos - which position you want (1 for first 40, 2 for 2nd..)

int num = Integer.parseInt(number);

  int posi = Integer.parseInt(pos);

String res = "";



  res = (input.substring(num*(posi-1), num*posi));



  if (input.length()>num*(posi-1))


  res = (input.substring(num*(posi-1)));


return res;



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question