You must add filters to read the IDoc metadata. The event used in a process is an object that contains a process object with a payload representing the IDoc message. The message consists of two main parts:
•Headers. The headers include key metadata fields, such as BasicIDocType, ExtensionIDocType, and DocumentNumber. These provide essential information about the IDoc message and remain consistent across IDoc types.
•Body. The body is a string that contains the actual IDoc message data. This string represents the specific IDoc type sent from SAP. For example, it might contain data corresponding to the MATMAS05 IDoc type.
When you use specific IDoc types like MATMAS05, configure a search filter in the custom attributes section to represent the IDoc type format. The search filter uses the syntax to specify the IDoc type, message type, and extension type.
For example, configure the search filters as follows:
Including this filter ensures that when you publish the connection, metadata specific to that IDoc type is fetched automatically.
Handling multiple IDoc types in a single listener
If the listener receives multiple IDoc types on the same connection, such as MATMAS05 and MATMAS07, specify multiple search filters to fetch the metadata for all these types simultaneously.
With this configuration, you fetch metadata for both MATMAS05 and MATMAS07, enabling the listener to process both the IDoc types.
At the message structure level, the Headers remain consistent with the same keys regardless of the IDoc type. The Body is a string that can represent different IDoc types, such as MATMAS05 and MATMAS07, depending on the SAP settings, allowing you to handle multiple IDoc message formats.