cancel
Showing results for 
Search instead for 
Did you mean: 

Missing/left-out segments/fields in IDocs - best practise

sbuttler77
Active Participant
0 Kudos

Hi all,

when SAP generates IDocs, occationally certain field/segments, instead of being blank, will not

show up at all which causes mappings in XI to go awry. For instance, in a two line sales order,

when you set a reason for rejection for order line 2, the corresponding line in the IDoc will have a

ABGRU field populated with the reason of rejection's code, however the first line will not have a

blank ABGRU field but instead it will not have any at all. Now, when you do the mapping of those

to lines, because the first line doesn't have this field, the ABGRU queue will hold only one value

which in all probability will end up in the first line when it should be mapped to the second.

At this point, in lack of a better solution, what I'm doing is to add ABAP code to user exits and

add a blank/dummy ABGRU field to the lines that do not have any in order to be able

to map the IDoc correctly. That works but its not ideal. What other options are there?

Am I missing something obvious?

Thanks for your input.

Frustrated,

Sven

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

You could try appending the node function mapWithDefault after the field so that the it will always have a default value instead of being suppressed.

Hope this helps,

Mark