cancel
Showing results for 
Search instead for 
Did you mean: 

How to Preserve Spaces in IDOC-XML conversion

Former Member
0 Kudos

Hi,

My source is an IDOC(ARTMAS04) which is an imported object in the Integration Repository. When I am posting an IDOC from R/3, the XML structure that is created in XI has one of the segment field(type string) condensed with instead of preserving with spaces(even with spaces in the value).

If it is a custom defined data type we can preserve the white spaces but since the source is an IDOC please suggest how to preserve the spaces in the segment fields.

Thanks,

Sumanth.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

pls check this link (reply from Anand)...

if you are talking about spaces in SXMB_MONI..it will not show it...however, in the actual message it will be present

Former Member
0 Kudos

Andrew,

I have did in the same way as what anand said, I have stored the data from SXMB_MONI and viewed it through Notepad, but still I see that spaces are condensed in the actual message.

Is there any way to preserve them.

Thanks,

Sumanth.

Former Member
0 Kudos

Hi,

maybe you can manipulate the IDOC XSD in XI-repository to preserve white space in your XML source. You can do this by adding the attribute

xml:space

, this attribute takes either

"default"

or

"preserve"

as values.

One other option could be to perform some check (user exit?) before the IDOC is sent to XI. How does the input look like in SXMB_MONI? can you see the white psace there?

Cheers,

Roberto

Former Member
0 Kudos

Hi,

I have to use a standard IDOC - ARTMAS04 which is an imported object, instead of using XSD. In this case I think I can't add an attribute to ARTMAS04.

As said User-Exit is another option, but we need to replace empty spaces by some special characters to preserve them and later in XI at mapping time we need to replace them back by spaces.

I have downloaded payload from SXMB_MONI to an xml file and viewed source through wordpad, but still I couldn't see spaces.

Please let me know if there is any alternative instead of using User-Exit to preserve spaces.

Thanks,

Sumanth.