Sie sind auf Seite 1von 4

Message Size in SAP PI/PO for Master Interface

The message size directly influences the performance of an interface. The size of a PI message depends
on two elements: The PI header elements with a rather static size and the payload which can vary greatly
between interfaces or over time for one interface (for example, larger messages during year-end closing).
The size of the PI message header can cause a major overhead for small messages of only a few kB and
can cause a decrease in the overall throughput of the interface. Furthermore, many system operations (like
context switches or database operations) are necessary for only a small payload. The larger the message
payload, the smaller the overhead due to the PI message header. On the other hand, large messages
require a lot of memory on the Java stack which can cause heavy memory usage on ABAP or excessive
garbage collection activity that will also reduce the overall system performance. Very large messages can
even crash the PI system by causing an Out-of-Memory exception, for example. You therefore have to find
a compromise for the PI message size.

Below you see throughput measurements performed by SAP. In general, the best throughput
was identified for messages sizes of 1 to 5 MB. The message size in these measurements corresponds to
the XML message size processed in PI and not the size of the file or IDoc being sent to PI. You can use
the Runtime Header of the ABAP stack to check the message size. Below you can see an example of a
very small message. While the MessageSizePayload field describes the size of the payload in bytes
(here 21481 bytes), the MessageSizeTotal describes the total message size (header + payload). In the
example this is around 47 KB demonstrating the overhead by the PI header for small messages. The next
two lines describe the payload size before and after the mapping. In the example below, the mapping
reduces the payload size. The last two lines determine the size of the response message that is sent back
to PI before and after the response mapping for synchronous messages.

Based on the above observations, we highly recommend that you use a reasonable message size for your
interfaces. During the design and implementation of the interface we therefore recommend using a
message size of 1 to 5 MB, if possible. Messages can be collected at the sender side or by using IDoc
packaging as described in Tuning the IDoc Adapter to achieve this. In case of large messages, a split has
to be performed by changing the sender processing or by using the split functions available in the structure
conversion of the File adapter.

Below you see throughput measurements performed by SAP. In general, the best throughput
is identified for messages sizes of 1 to 5 MB.
Actual Customer IDOC Payload :

<?xml version="1.0" encoding="UTF-8" ?>


- <DEBMAS06_EXT>
- <IDOC BEGIN="1">
- <EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<MANDT>210</MANDT>
<DOCNUM>0000000000215291</DOCNUM>
<DOCREL>701</DOCREL>
<STATUS>30</STATUS>
<DIRECT>1</DIRECT>
<OUTMOD>2</OUTMOD>
<IDOCTYP>DEBMAS06</IDOCTYP>
<CIMTYP>DEBMAS06_EXT</CIMTYP>
<MESTYP>DEBMAS</MESTYP>
<SNDPOR>SAPD01</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>CIVEDE210</SNDPRN>
<RCVPOR>A000000002</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPRN>GPDCLNT001</RCVPRN>
<CREDAT>20120912</CREDAT>
<CRETIM>111006</CRETIM>
<SERIAL>20120912111006</SERIAL>
</EDI_DC40>
- <E1KNA1M SEGMENT="1">
<MSGFN>005</MSGFN>
<KUNNR>D102000012</KUNNR>
<BBBNR>0000000</BBBNR>
<BBSNR>00000</BBSNR>
<BUBKZ>0</BUBKZ>
<KTOKD>YB04</KTOKD>
<LAND1>VE</LAND1>
<NAME1>consorcio trio</NAME1>
<NAME3>GUAPARO</NAME3>
<SORTL>IVEND</SORTL>
<SPRAS>S</SPRAS>
<STCD1>J302455578</STCD1>
<STKZU>X</STKZU>
<UMJAH>0000</UMJAH>
<JMZAH>000000</JMZAH>
<JMJAH>0000</JMJAH>
<UMSA1>0</UMSA1>
<HZUOR>00</HZUOR>
<CIVVE>X</CIVVE>
<SPRAS_ISO>ES</SPRAS_ISO>
<E1KNA11 SEGMENT="1" />
- <E1KNVVM SEGMENT="1">
<MSGFN>005</MSGFN>
<VKORG>D100</VKORG>
<VTWEG>20</VTWEG>
<SPART>10</SPART>
<KALKS>1</KALKS>
<BZIRK>000001</BZIRK>
<KONDA>01</KONDA>
<AWAHR>000</AWAHR>
<ANTLF>0</ANTLF>
<LPRIO>00</LPRIO>
<WAERS>VEF</WAERS>
<KTGRD>01</KTGRD>
<UEBTO>0.0</UEBTO>
<UNTTO>0.0</UNTTO>
<PODTG>0</PODTG>
- <E1KNVPM SEGMENT="1">
<MSGFN>005</MSGFN>
<PARVW>AG</PARVW>
<KUNN2>D102000012</KUNN2>
<PARZA>000</PARZA>
</E1KNVPM>
- <E1KNVPM SEGMENT="1">
<MSGFN>005</MSGFN>
<PARVW>RE</PARVW>
<KUNN2>D102000012</KUNN2>
<PARZA>000</PARZA>
</E1KNVPM>
- <E1KNVPM SEGMENT="1">
<MSGFN>005</MSGFN>
<PARVW>RG</PARVW>
<KUNN2>D102000012</KUNN2>
<PARZA>000</PARZA>
</E1KNVPM>
- <E1KNVPM SEGMENT="1">
<MSGFN>005</MSGFN>
<PARVW>WE</PARVW>
<KUNN2>D102000012</KUNN2>
<PARZA>000</PARZA>
</E1KNVPM>
- <E1KNVIM SEGMENT="1">
<MSGFN>005</MSGFN>
<ALAND>VE</ALAND>
<TATYP>MWST</TATYP>
<TAXKD>1</TAXKD>
</E1KNVIM>
</E1KNVVM>
- <E1KNB1M SEGMENT="1">
<MSGFN>005</MSGFN>
<BUKRS>D100</BUKRS>
<AKONT>1305050100</AKONT>
<ZINDT>00000000</ZINDT>
<ZINRT>00</ZINRT>
<VLIBB>0</VLIBB>
<VRSZL>0</VRSZL>
<VRSPR>0</VRSPR>
<VERDT>00000000</VERDT>
<WEBTR>0</WEBTR>
<DATLZ>00000000</DATLZ>
<KULTG>0</KULTG>
<PERNR>00000000</PERNR>
</E1KNB1M>
</E1KNA1M>
</IDOC>
</DEBMAS06_EXT>

Das könnte Ihnen auch gefallen