cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter: trailing space in field using XSD:Decimal in a CSV file

Former Member
0 Kudos

Hi Folks,

I have a problem which i am unable to understand fully.

We have a SAP to file via XI scenario where a mail adapter is used. We are producing a CSV file as an mail attachment.

The issue is all the decimal fields have an extra space before the next delimiter i.e. comma.

The data type used in mapping is XSD:Decimal with 'fraction' set as 2.

I have checked the source XML and there is no trailing spaces there. Initially i thought this might be due to doing the conversion using transformation beans in mail adapter, to rule this out i checked other files produced using FILE adapter they also appear to have same issue.

I can't get my head around it, could not find any parameter i need to pass in content conversion either in MAIL adapter or FILE adapter to supress trailing space before the delimiter.

I suppose this must have occured with others as well.

Any directions would be greatly appreciated.

Btw, we are on PI 7.0 and ECC 6

-Praveen

Edited by: - External Consultants Mouchel on Sep 15, 2009 5:34 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mouchel,

Just before the field mapping put a trim and check. Like do your original mapping to the field and then put trim function just before target.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Thanks for reply, i am not trying to contest your openion but i am curious to understand the effect as why you have asked for this.

As i pointed out initially, there is no trailing spaces in the source XML what benifit would i have by doing 'TRIM'.

Could you make me understand the reasoning behind it,please.

Regards

Praveen

Former Member
0 Kudos

Hi Mouchel,

I personally didnot encounter this kind of issue with the file adapter at any point of time. I would suggest you to check the message mapping before and after payload in sxmb_moni. If you see in mapping you may not find out, so view the source in notepad and then see.

Regards,

---Satish

Answers (0)