cancel
Showing results for 
Search instead for 
Did you mean: 

Empty XML tags in proxy message

former_member194786
Active Contributor
0 Kudos

Hi All,

We have noticed in one of the proxy based interface that the response received from SAP system has empty XML tags in it. However, we expect that there should not be any XML tags for fields where data is not populated. These fields are mandatory and proxy calls should ideally fail in PI with mapping exception, which is not happening currently. Have checked with the ABAP team and they are not passing any value in that field.

In couple of other interfaces, with same ABAP coding, empty XML tags are not getting created.

Has anyone else come across similar problem earlier?

Regards,

Sanjeev.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Sanjeev,

For the proxy request, optional fields that are left blank do not get passed to PI. For the response however, the blank fields are retained. This should be the standard behavior. Can you check in your PI mapping as to why it is not getting a mapping error e.g use of mapWithDefault?

Hope this helps,

Mark

former_member194786
Active Contributor
0 Kudos

Hi Mark,

Thanks for the prompt response. Both the interfaces that I have mentioned below are outbound from SAP to PI. Hence, I would expect that the payload in both should not contain any empty XML tag in it.

Regarding the use of mapWithDefault, we have not used it in any of the fields. In fact, I had checked this and empty XML tags are getting generated in SAP system itself during proxy population.

Appreciate any further pointers on the same.

Regards,

Sanjeev.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Sanjeev,

Thanks for the prompt response. Both the interfaces that I have mentioned below are outbound from SAP to PI. Hence, I would expect that the payload in both should not contain any empty XML tag in it.

As far as I know only optional fields get discarded when they are blank. As for mandatory fields, they get created even when not populated using a program..

Regards,

Mark

Answers (1)

Answers (1)

former_member184789
Active Contributor
0 Kudos

Hi Sanjeev,

Will it be possible for you to have  a logic in PI such that if the length of a source field is greater than zero, then populate corresponding target field. In such a case, if source is not there target  field will get suppressed. In other words, instead of having an empty tag, you will be suppressing the target field.