on 04-16-2014 7:12 AM
Hi Experts,
In Receiver file content conversion we are facing issue with white space charecters- lets example value -999, but in receiver field fixed lengh we have defined as 20 lengh as per the requirement. But, in the output file we are getting [negative sign taking as first char and value filling last] - ********* 999. ****** are white space charecters.
Is there any content conversion paramter for avoiding this type of white space charecters in receiver file content conversion ?
Best Regards.
Krushi.
Hi krushi,
you can try to use the below UDF for removing the white spacess.
public String removeTrailingWhiteSpaces(String str) {
str = str.replaceAll("(?s)([ \t]*)$", "");
str = str.replaceAll("\r\n", "\n");
str = str.replaceAll("\r", "\n");
str = str.replaceAll("(?s)([ \t]*)\n", "\n");
str = str.replaceAll("(?s)([\n]*\n)", "\n");
return str;
}
Regards
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is really strange. -999 should have converted to ****************-999 not like - ********* 999.
Can you please check in PI and figure out what value has been sent from the adapter engine.
May be your PI mapping has generated that value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi All,
I presume that there is something missing UDF coding as per the below.
please advise on this.
input to conversion of 437.72- to -437.72 is mapping is executing correclty. but, receiver file content conversion we have defined as amout value as 20.
so -ve sign taking first place char and remaining moving to last charecters, and whitespaces are filling in the middle.
Now i need to do the trailing of white space charecters. I have tried all above suggested options but nothing works.
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]);
}
}
Thanks and Regards,
Krushi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mates,
Check the Sap guide: https://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
Regards
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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.