Skip to Content

Empty XML tags in proxy message

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 15, 2013 at 04:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Apr 15, 2013 at 10:46 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded