cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to File - All fields optional and empty fields missing

Former Member
0 Kudos

Hi all,

I have a problem in sending IDocs to PI system. When we send the IDoc it contains fields with spaces or which are just empty. Like below:

<E1EDK01 SEGMENT="1">

<CURCY>EUR</CURCY>

<HWAER>TRY</HWAER>

<WKURS>1.97810</WKURS>

<ZTERM>0002</ZTERM>

<BSART>NB</BSART>

<BELNR>4500000015</BELNR>

<RECIPNT_NO>0001000000</RECIPNT_NO>

</E1EDK01>

The problem is that the empty fields are missing. For example in the normal IDoc the above SEGMENT contains a ACTION element. But because it is empty it isn't sent. In our current case I have to receive these empty elements. (I need these fields because if they are empty I have to replace them with spaces. There are a lot of fields, so I dont want to check every field if it exists or not)

Is there any solution to this problem?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

use function "mapwithdefault"

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Chris,

Please check the payload, (which is coming to PI) in first step of SXI_MONITOR. If empty elements are missing the payload which is coming into PI. Then the Sending system is not sending them or the PI IDOC adapter is ignoring empry spaces.

Regards,

Raghu_Vamsee

Former Member
0 Kudos

Hi Chris,

How abt mapping the empty SEGMENT-E1EDL40 with constant : WHICH IS EMPTY .(Select Constant , dont enter any value ) .You get the symbol on Constant like : []

Hope this helps ,

Regards,

Varalakshmi

Former Member
0 Kudos

When the IDoc comes from SAP I don't know if its empty or not. So, if I map my field with a constant I will lose the value from SAP (if they sent the field not empty)