cancel
Showing results for 
Search instead for 
Did you mean: 

Error while handling special characters ( < and &) in Sender File adapter

Former Member
0 Kudos

Dear All,

Scenario: Third Party System --> (File adapter) SAP PI 7.1 (SP05) --> (Proxy) ECC

We are receiving CSV file and no mapping is required in PI as all the processing is being done by third party tool. But we are receiving special characters like ',",>,< and & in the csv file.

When we are using File Type as TEXT and File Encoding as ISO-8859-1 than we are getting error. We changed File Type to BINARY and than we are able to handle ',",> but having issue in handling < and &.

Any idea how we can handle it.

Please note trhere is no Mapping in SAP PI so cannot uise Java mapping.

Thanks a lot

Chanakya

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member472138
Active Contributor
0 Kudos

Hey,

You can add ABAP Script in Receiver Proxy for eliminating or replacing with NULL or empty. Since you dont have mapping for formatting these kind of junks you can follow the above approach.

Else, you can remove the junks at OS level while running a small script and make it available to PI.

Or else, you need to create mapping for sender and recevier structure though it is same, then you add a very simple UDF for fine tune.

Use this UDF

Here a is the input value.

String b = "";

b = a.replaceAll(",", "0");

b = a.replaceAll("@", "0");

Like all the special characters you can take and replace with zero.

...........

return b;

Thanx

Pothana

stefan_grube
Active Contributor
0 Kudos

> Scenario: Third Party System --> (File adapter) SAP PI 7.1 (SP05) --> (Proxy) ECC

>

> We are receiving CSV file and no mapping is required in PI as all the processing is being done by third party tool. But we are receiving special characters like ',",>,< and & in the csv file.

I do not get it. Do you receive a csv and do content conversion or do you receive XML?

If you receive XML then the third party tool does not work correct.

Former Member
0 Kudos

Hi Stefan,

We are getting CSV file and we are performing Content Conversion in PI before passing it to ECC.

Regards

Former Member
0 Kudos

Hi Chanakya,

Check the below blog to handle special characters

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]

Thanks,

stefan_grube
Active Contributor
0 Kudos

And what exactly is the issue?

Former Member
0 Kudos

Issue is:

How do we handle special character (&) in sender file adapter when we are receiving a CSV file and we are not performing any mapping in PI?

Regards

stefan_grube
Active Contributor
0 Kudos

You need not do anything special, as PI handles this automatically.

Former Member
0 Kudos

Chanakya, PI will be able to handle it automatically. Perform end-toend scenario test and let us know if you have any issues.

All the best!!!

Former Member
0 Kudos

Thanks everyone...it was handlled automatically...ther was error iin data file which we were receiving from Legacy system.

Thansk a lot