cancel
Showing results for 
Search instead for 
Did you mean: 

Add spaces in XML tag in XI mapping

Former Member
0 Kudos

Hello guys,

In an IDoc to XML file scenario within XI, we want to add spaces at the end of an IDoc field that contains text description. When the IDoc gets generated on SAP ECC, the IDoc field is repeated so many times until all the contents are displayed, separated with spaces. However, once the IDoc is sent to XI, the spaces get lost. Is it possible to add a space at the end of each field presence within XI message mapping or they will get lost again ?

Thank you.

Best Regards,

Evaggelos Gkatzios

Edited by: Evaggelos Gkatzios on Nov 12, 2010 4:49 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

> In an IDoc to XML file scenario within XI, we want to add spaces at the end of an IDoc field that contains text description.

The way IDoc processing works, that does not make any sense at all.

An IDoc is a fixed length container and the fields are filled with spaces automaticically.

The IDoc XML generation removes trailing spaces to reduce message size.

If you need trailing spaces in an XML field, you can add them easily with a UDF. But I think that there are only rare scenarios where you really would need this.

Former Member
0 Kudos

Hi Evaggelos,

as spaces are generally not allowed in XML tags (this is a general XML rule), PI also does not allow spaces.

A space at the end of a tag are treated as not there, i.e. you will not be able to preserve this information.

Best regards,

Markus

Former Member
0 Kudos

Did u check the IDOC XML in input payload of MONI. download it and save as .xml and open it in IE and check the spaces.

chirag

Former Member
0 Kudos

Hi

I think is just a view problem of the SXMB_MONI and RWB monitoring tools.

Since the xml is shown by the web browser, the additional spaces are present, but not displayed.

Try to download the payload and open it with a text editor.

Francesco