on 04-12-2014 5:04 AM
hi Experts,
From SAP ecc to PI we are receiving - negative sign after the amount value 1000 - . can you please suggest the suitable graphical mapping or UDF whenever amount value in -ve should give the ouput result as -1000. .
Regards,
Krushi.
Hi Krushi,
In your case let's try with below UDF:
for(int count=0;count<input.length;count++)
{
if(input[count].endsWith("-"))
{
result.addvalue("-"+input[count].substring(0,input[count].length()-1));
}
else
{
result.addValue(input[count]);
}
}
AMOUNT_PAID --> UDF --> AmountPaid
Regards,
P.Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krushi - I don't see any complexity in it..
Use graphical function "endswith" to check if the amount has "-"
If yes then use replace function to replace "-" and then again conact it with "-"
amount then amount->replacevlaue "-"-> concat + "-",amount
endswith if
- else amount
For graphical function look at the below blog-
Standard Functions in PI 7.0 - Process Integration - SCN Wiki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.