Hello experts,
I have checked the forum but still got 2 questions:
1. How to use the standard functionality to download IDoc into XML? Step by step along with screen shots will be highly appreciated because i have little idea about codes and do not have authorization to create port, etc.
2. What cause the invalid characters (highlighted in green below)? How to remove it?

Request clarification before answering.
The answer provided by Neeraj above is very nice and answers the requirement completely, but you need to be able to do ABAP programming in the backend system. (E.g. your user needs to have a developer license, and you need to be familiar a bit with ABAP coding and development tools.)
If you are looking for an alternative solution, that doesn't require ABAP coding on the backend side, I can offer the following alternative:

The XML file can then be saved to local disc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello cathy.liang,
Please refer below SAP help link and Blog.
https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=153388639
https://blogs.sap.com/2013/05/22/remove-and-report-invalid-characters-from-input-data/
Regards,
Neeraj Jain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I read the blog about the invalid chars, and it says that "the invalid characters need to be cleansed by replacing with blank spaces". Therefore I think that this would not be the best way for cleansing IDoc data for conversion to XML. Especially when it comes to "&" characters, which are invalid in XML data, but which often occur in "normal business data" like address records.
For example, if an IDoc contains a company name like "Procter & Gamble", it would be much better to replace that with the XML escape sequence for ampersand, than with a blank space "Procter Gamble".
Similarly, standard XML generators (like the one in SAP BC) will replace "<" and ">" characters with "& lt;" and "& gt;" escape sequences, which may be better than just having spaces. The question is, what would be best for control characters like TAB or NEWLINE, which I have also already encountered in IDoc data. These would be valid candidates for replacement with SPACE, but can also be replaced by hex entities, e.g. TAB would be replaced by "& x09;" by an XML generator, which may not necessarily be, would you want...
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.