cancel
Showing results for 
Search instead for 
Did you mean: 

converting random format input to a fixed format output in message mapping

Former Member
0 Kudos

Hi all,

I am doing an idoc to file scenario in which one of the input is in random format and output is in fixed format for ex:

input output

0.1 000000010000

0.01 000000001000

12.12345 000001212345

plz guide me if there is any standard function available for that or i have to write some udf for that.................

Regards

Neha

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

No standard function available. U have to write ur own function. U may try FCC at receiver end

Regards,

Prateek

Former Member
0 Kudos

thanks prateek for ur reply,u have told tha i have to use FCC at receiver end is also true but i have to change my input srtucture to desired output struct in message mapping itself thats why i have asked for any function or any link for similar type of udf to perform the desired transformation.

Regards

Neha

Former Member
0 Kudos

Roy,

You have to use the standard if--else function. Since you said it is a fixed length field check the field length. If it is more than you have to take a substring else you can use a formatnumber to the field and can send to the target.

Regards,

---Satish

Former Member
0 Kudos

Hi check this out

You can do the mapping like this

source-- UDF --- format number --- target

UDF

int index = number.indexOf(".");

String str= number.substring(0,index)number.substring(index1,number.length());

return str;

format number refer

Mudit

Former Member
0 Kudos

HI Mudit

Thanks for ur perfect reply but u know there is no any need of writinng any UDF u can achieve this just by using standard function formatnumber and replace string

sourceformatnumber(0000000.00000)-replacestring(replace . )-----target

however i have given u full point as i got that idea only by going through the link u have sent to me............

Regards

Neha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi;

Try using format number function available in graphical mapping.

Mudit