cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to XML

Former Member
0 Kudos

I am trying to do the mapping of DEBMAS to JDBC XML. Mapping works fine in Test in IR but I get run time exception. I copied XML payload from SXMB_MONI and tried to test with it after taking out dashes I get an error saying XML not well formed.

The problem is because of the tags that have zero occurrences and the pay load does not have empty tags for IDOC nodes that can occur zero times as there is no data.

Any body has similar problem let me know.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Michael,

i suppose you r using a message mapping?

And u have a problem if the source field is empty?

Use function "exist" to ask if field exist and may be ask for the string lenght > 0. Only in that case (function if) map the field. Or use a XSLT mapping.

Regards,

Udo

Former Member
0 Kudos

That means even for testing in Message Mapping Test tab we cannot even the load the IDOC that came in as it does not have some tags right.

Shabarish_Nair
Active Contributor
0 Kudos

No ... the mapping would fail if you are loading the XML instead of creating it in the test tab.

Use the exist node function in message mapping.

(Field) -> EXIST -> then |- pass the original value

else |- pass a empty constant

udo_martens
Active Contributor
0 Kudos

Hi Michael,

if ur IDoc doesn't come in the right way (cant be validated against loaded schema), then you have to reload the right version from R/3 system.

What is about ur english? If i look 2 ur name, i guess u should have learned it as mother language. But it is really hard 2 understand...

Regards,

Udo

Answers (0)