Skip to Content
avatar image
Former Member

Empty IDoc fields do not show up in payload

Hi everyone!

I have a scenario where XI receives an IDoc from a SAP R/3 system and posts the IDoc data to an external HTTP receiver. Everything works fine. However, when an IDoc field is empty, it doesn't show up in the payload. This leads to problems in my mapping, since those empty fields also do not appear in the output message (these fields are optional in the target structure).

Now I <i>could</i> encode some logic in the mapping to check whether the respective source field is empty, and insert some standard values. But this is tiresome since there are many fields involved. Is there a better solution to do this? Mabye some configuration in the IDoc adapter???

Thanks in advance,

Joerg

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 17, 2006 at 01:37 PM

    Hi Joerg,

    If you are above XI3.0 SP14 then you can use the node function <b>mapWithDefault</b> in between the mapping. This will create the xml tag for the field on the target side even if you are not having those fields in the source side i.e., the incoming idoc.

    Cheers

    JK

    PS: Pls mark helpful answers

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2006 at 01:57 PM

    Joerg,

    You first check your field exists or not. If exists then you map it to the target field else if you dont have then if the field is alphanumeric then map the same length spaces as constant in the target or if the target field is numeric then map with a constant having that many no. of zeros.

    Ex:

    If >Idocfield >Exists >then >Idocfield

    >else >constant(may be with spaces or zeros)

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 17, 2006 at 02:31 PM

    Hi Joerg,

    using a XSL mapping would solve that kind of problems. It has less performance than MM.

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded