cancel
Showing results for 
Search instead for 
Did you mean: 

Blank fields in xml message

Former Member
0 Kudos

We have a custom ABAP report which gathers invoice data from SRM system and sends it to XI system using proxies. There some fields which can have a blank value and need to be transmitted in xml message as blank. When we open the message in SXMB_MONI we expected to see <field1 />. But we dont see any empty xml tags, only those fileds which have a value in them appear in the xml message.

Is it possible to send blank fields in xml messages using proxies?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi !

I'm afraid this is a known problem.

You could concatenate a "#" or "@" or another special character at the end of those required fields and them remove the character in XI or you just can solve it at XI level, by making mandatory (occurance 1..1) those fields in the target message structure and using a standard mapping function such as mapWithDefault to give a blank value to those fields that did not entered XI because of being blank.

Regards,

Matias

ps: please award points if helpful.

Former Member
0 Kudos

Thanks for confirming that it is a problem. I was hoping it can be taken care of in the ABAP code but your solution to fix it in XI works.

Regards

Bharat

0 Kudos

it's a bit strange this is the best solution. are any other options, which do NOT include ugly concatenations in 2 systems?

Answers (3)

Answers (3)

turmoll
Active Contributor
0 Kudos

Hi,

Please take a look at this doc: [Activating Extended XML Handling|http://help.sap.com/saphelp_nw04/helpdata/en/73/3f5c3c3906b006e10000000a11402f/content.htm]

Regards,

Jakub

Former Member
0 Kudos

That was a very good link. Another simple way i came across is to modify the xslt. Refer to weblog

Link: [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3125] [original link is broken] [original link is broken] [original link is broken];

In the XSLT there were conditions written written to not send the field it was initial, i removed the conditions and it works fine.

Former Member
0 Kudos

Hi,

At the time of mapping use API mapWithDefault API. and don't pass any value in it bydefault it will take blank value.

Source field---->mapWithDefault ---> target field

Thanks

swarup

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Adding to Matias,

If you checking in /nsxmb_moni, Spaces are Trimmed in /nsxmb_moni though it is Present.

Regards

Agasthuri Doss

Former Member
0 Kudos

I understand that the spaces in front of fields are trimmed in SXMB_MONI. But in my case the whole field is blank and needs to be transmitted as such.