cancel
Showing results for 
Search instead for 
Did you mean: 

Junk data # appearing for Enter key in text field PO text

Former Member
0 Kudos

Hi Experts,

We are taking data from external system in xml format for creation of purchase order in ECC through PI.

There is a problem in text import, the text data contains space in it due to use of enter key in it, in ECC for those enter space system is showing junk value "#".

I have verified xml file it doesn't contain junk data in it, Can you plz suggest how to get rid of this junk data.

Regards

Rashid

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Rashid,

Good thing is that, message is not failing in SAP PI. So XML coming from source is well-formed.

I think whenever user is pressing "ENTER" on keyboard for some field (mostly description field) it is saved as non-printable character in XML.

Let us know, hex value of that character. Open source file using Notepad++HEXeditor - YouTube.

Then you can use standard replace function or UDF to remove that character in message mapping.

FYI.Unicode character table Line Feed: 
 Carriage Return: 

Former Member
0 Kudos

Hi Raghu,

Thanks for your help.

I have verified hexadecimal value for enter key it is appearing as "0a".

Can you please guide further how to fix this.

Regards

Rashid

RaghuVamseedhar
Active Contributor
0 Kudos

Rashid,

Please create below UDF and used in fields where you want remove new line character.

return var1.replaceAll("\\u000A","");

Former Member
0 Kudos

Hi Raghu,

Thanks for the valuable help.

We are trying to apply the suggested solution will get back soon with the feedback.

Regards

Rashid

Bhargavakrishna
Active Contributor
0 Kudos

Hi Rashid,

Is this special character coming only in particular part of the field? if so you can handle this by using replace string function.

what is your file encoding type? change it to UTF-8 it may resolve your issue.

Check with external system to to send the data without special characters.

if you wan to handle it in PI please refer the link

Special Character Handling (&) in the paylo... | SCN

Regards

Bhargava Krishna