SAP ALE (Input Agent)
General process
The Input Agent "SAP ALE" implements the incoming connection of an SAP system via the SAP ALE interface. See also section SAP ALE.
A profile that uses the Input Agent "SAP ALE" does not process data itself but instead assumes the role of a dispatcher. That is, the received data is distributed to subsequent profiles for processing.
(1) The SAP system transfers data that contains one or more IDocs.
(2) The SAP interface checks whether the maximum number of IDocs (9) per transmission from the SAP system is exceeded. If this is the case, the processing of the IDocs is rejected (with response to the SAP system). Note: There is one TID per SAP transmission.
(3) The IDocs are divided into groups. Each group contains a configurable maximum number (8) of IDocs. The individual groups are transferred as a whole to the dispatcher profile (4). Note: The system variable VAR_SYS_MESSAGE_ID (if defined) contains <DOCNUM>@<TID>. The DOCNUM is always that of the last IDoc in the group. The TID comes from (2).
(4) The dispatcher profile receives the groups of IDocs and starts a separate job for each group. For each group of IDocs as a whole, an IDoc control record (EDI_DC40) is used to determine the subsequent processing profile, see items (11) - (16).
(5) The assigned processing profile receives the entire group of IDocs via Message. Important note: Received IDocs are converted into the encoding of the processing profile selected by the dispatcher. Therefore, before receiving the first IDocs, the encoding in the respective processing profiles should be set so that all characters in it can be properly represented. Our recommendation is UTF8 because this encoding can represent practically all relevant characters and also because the SAP service delivers UTF8-encoded files.
Settings
(6) Start on IS only: Only relevant for the add-on module "Load Balancing", to start the profile on a specific node.
(7) SAP alias: Alias (from ./etc/sap.xml) for the SAP system. Important note: If there are multiple dispatcher profiles with the same SAP alias, each dispatcher receives the IDocs regardless of the settings of the other. We recommend to avoid this.
(8) Group IDocs per conversion: Maximum number of IDocs grouped together.
(9) Max. allowed IDocs per transmission: Transfers with more than the specified number of IDocs are rejected with a response to the SAP system.
(10) Persistent: If the checkbox is set, the processing profile is called asynchronously with a persistent message. The processing order will then be undetermined. Note: The processing profile must not have option Profile may only run in one instance set.
Dispatch rules
(11) Associate conditions for same profiles with AND: This option is only relevant if several entries refer to the same processing profile (16). In this case, the rules for the profile are combined internally by OR-ing the values of the columns with the same name. Example: Assume the following two rules.
IDoc |
CIM |
DC40 field |
Value |
Profile |
ORDERS05 |
|
RCVPRN |
0815 |
Profile_1 |
ORDERS05 |
|
RCVPRN |
0816 |
Profile_1 |
The internally combined rule for Profile_1 will then be (IDOC=ORDERS05) AND (RCVPRN=0815 OR RCVPRN=0816).
(12) IDoc: Value for field IDOCTYP (basic type) of the IDoc control record (EDI_DC40). You have to enter the complete name of an IDoc type. Upper and lower case are not considered. Note: Any SAP namespace/SAP domain name must be prepended.
(13) CIM: Value for field CIMTYP (extension type) of the IDoc control record (EDI_DC40). In this column, you can enter the full name of an extension type. Upper and lower case are not considered. Note: Any SAP namespace/SAP domain name must be prepended.
(14) DC40 field: Selection of a field of the IDoc control record (EDI_DC40). See also (11).
(15) Value: Here you can enter a value for the field selected in (14). If no value is entered here, the field set in (9) will be ignored.
(16) Profile: The processing profile that, depending on columns (11), (12), (13), (14) and (15), is to receive the data. A profile entered here must have an Input Agent of type "Message".
Default rule
IDocs that cannot be assigned to a processing profile, are ignored (these IDocs can be found in area Unresolved ) . Please use a dispatch rule with the IDoc type *, see (12), to pass these IDocs to a processing profile, which can then decide what to do with them. The following columns (except column Profile) should be empty. The asterisk * can only be used as a non-specific IDoc type, but not as a wildcard for arbitrary characters.
Note: If a profile uses this Input Agent and exactly one (that is, no other) dispatch rule with a * in field IDOC, see (12), and also exactly one (that is, no other) Response of type "Custom class" with one of the classes ContentInspectionResponse, ContentInspectionResponseAsync, ContentInspectionResponseUTF8 or ContentInspectionResponseUTF8Async, the data will be sent to the Content Inspection, but not to the processing profile, see (16), of the dispatch rule. This saves one job (backup file and logs) for the processing profile that would otherwise send to the Content Inspection module. It is also recommended to set the property Keep backup for to 0 to save further disk space.
Rule scoring
If several suitable rules, i.e. potential processing profiles can be determined, a scoring decides which rule and thus which processing profile is used. The score is higher the more matching fields (12), (13) and (14)/(15) a rule has, whereby (12) and (13) are given higher priority than (14)/(15). In addition, the score is also higher if more fields are ORed in (14)/(15), see (11). More illustrative in the following examples. The top row has the highest score, then descending.
IDOC |
CIM |
DC40 field |
match |
match |
match, 5 fields ORed |
match |
match |
match, 3 fields ORed |
match |
match |
match, 1 field |
match |
empty |
match, 3 fields ORed |
match |
empty |
match, 1 field |
Manual upload and restart
During a manual upload, SAP dispatcher profiles behave exactly as if the data were coming through SAP.
If a SAP dispatcher profile is restarted, the rules are not executed again, since they already have been executed and the backup files are available in the jobs of the respective processing profiles. Only existing Responses of the SAP dispatcher profile are executed.