cancel
Showing results for 
Search instead for 
Did you mean: 

Put Minus sign as prefix

Former Member
0 Kudos

Hi Experts,

     I have a requirement in which i need to put minus sign as prefix.

For e.g. If the input is like 234756- , than my output would be with minus sign in front rather than back like -234756.

Can you please help on how to achieve this?

Accepted Solutions (1)

Accepted Solutions (1)

maheswarareddykonda
Active Contributor
0 Kudos

try this

engswee
Active Contributor
0 Kudos

IMHO this can be achieved via standard functions, so there's no real need to go for UDF.

former_member182412
Active Contributor
0 Kudos

Hi Eng,

Better to put this in UDF because this is a common requirement when we work with IDOCs, because from ERP the minus sign is placed in right side of the amount.

In my project i have created the UDF for this in common function library under common software component and i used it in the all the mappings where i need this requirement.

Regards,

Praveen.

engswee
Active Contributor
0 Kudos

Great point! If this is going to be reused again and again, it's definitely better to put it in a Function Library.

Answers (2)

Answers (2)

apu_das2
Active Contributor
0 Kudos

Simply use Graphical Mapping like that -

Thanks,

Apu

engswee
Active Contributor
0 Kudos

This is easily done so I won't bother putting the logic for it. Basically check if the input "endsWith" a minus sign, if yes, then replace the minus with a blank and concatenate it with a minus prefix.