on 04-30-2018 12:07 PM
Hi Experts,
My requirement is to split the input string if it is more than 35 characters, then populate the first 35 to one target field & rest of characters to second target field. Else if length is less than 35 characters then populate the input string to first target field.
Please suggest whether we require UDF or can be done using functions in graphical mapping.
Thanks,
Ramu.
Hi Ramu,
I would do the same mapping as Liz for the first part. For a longer string you need a second substring also. On our PO 7.4 the substring function works only if your string has same or more characters needed for the substring function. To avoid problems I add always a constant with blanks and add later a trim function.
Regards
Peter
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.
Hi Ramu,
Since you have to split the strings to two output fields if the length is greater than 35. you should go ahead with an UDF.
Because for the standard substring functions you need the length of the complete string.
eg: first target field will have 0..35 second target field should be passed with string starting from 36 till end. we don't know the complete length in this case.
Refer the attached Screenshots for the solution.
Mapwith Default function will avoid error in mapping as it will pass even the NULL value as empty field.targetfield1.jpgtargetfield2.jpgudf.jpg
Regards,
Dhivakar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.