How to send custom infotype over SAP ALE
There is a number of infotypes in SAP which are local to some country. SAP doesn’t provide any standard solution to send these country-specific or custom infotypes over ALE, cause standard IDOC contains only international infotypes. If you develop your infotype and want to send it over ALE there are some tips and tricks to handle. Today I want to tell you how to send custom infotype or country-specific infotype over SAP ALE. It’s going to be a long tutorial with a lot of images. More than I’d like to show you what is a short and long infotype record in terms of SAP integration and IDOC structure. And, of course, ABAP source codes will be provided for your convenience. Take a cup of coffee and join me with this unique tutorial never been shared before.
Sending short infotypes over SAP ALE
A short infotype is an infotype, the size of which fits into one IDOC segment. How to check? Open SE11 transaction, find an infotype structure which is PXXXX (XXXX – infotype code), sum all length fields. One IDOC segment can store 1000 symbols. If the infotype structure is longer than 1000 symbols it’s a long infotype and we will need to split it to send over SAP ALE. Will show later how it works.
To add custom infotype to a standard HRMD_A IDOC in WE31 transaction create a new segment to include it into IDOC and send over ALE. Naming rule is Z1PXXXX, 7 symbols. It’s done for prior 4.6C compatibility, so if you work with modern systems you can use longer names. The first three letters ‘Z1P’ is a must. To save time and avoid human mistakes typing all SE11 fields into segment manually you can create a segment from a template. In menu Segment -> Create with template choose DDIC structure and type in PXXXX, where XXXX is your infotype code. When you save segment systems checks its length to comply with 1000 IDOC segment length.
In my scenario, I’ll use country-specific infotype 0293. Here is how it looks like in segment.
Don’t forget to release the segment in Edit menu.