Description
Call this class periodically in a cron job. This lets you detect unsuccessful IDoc send attempts from a connected SAP system. This can happen if the request server registration fails, does not happen, or is lost.
For this, the class reads the table ARFCSSTATE via an RFC call. Outgoing connections must work for this. This is a prerequisite.
NOTE: Configure a checkpoint (see Checkpoints). This lets you catch cases where the class cannot work.
Configuration: Enter the path to a properties file in the Configuration file field.
Parameters
Parameter | Description |
|---|---|
sap.alias | (mandatory) Name of the SAP alias from |
sap.timeout | (optional) Timeout in milliseconds. Default: |
sap.destination | (optional) Name of the destination (type |
sap.function | (optional) Function that the system calls to send the IDocs. Default: |
sap.host | (optional) SID of the sending SAP system. By default, the system accepts all SIDs. NOTE: The system shows only entries younger than 3*24=72 hours. |
sap.fields | (optional) Controls which database fields of the NOTE: The field names specified in the property must exist in the If the property is missing, the system generates the If the value starts with Example: If the value does not start with |
Example file
sap.alias=myalias
sap.destination=LOBSTER TESTXML response
The following is an example of a standard response file (encoding UTF-8).
NOTE: See also the sap.fields parameter above.
The call creates an XML file with at least the root element ITEMS and the attribute count. The maximum number of ITEM elements is 500. Sorting is not possible.
If there are no pending IDocs in SAP, count has the value 0. With the ARFCUZEIT and ARFCDATUM fields, you can decide in the Profile whether the system sends an alarm e-mail. This applies, for example, if entries exist (that is, count>0).
NOTE: In the querying profile, generate warnings only for entries that are no longer too young.
<ITEMS count="1">
<ITEM nr="1">
<ARFCIPID>C0A8DF63</ARFCIPID>
<ARFCPID>0230</ARFCPID>
<ARFCTIME>60900160</ARFCTIME>
<ARFCTIDCNT>0090</ARFCTIDCNT>
<ARFCDEST>LOBSTER TEST</ARFCDEST>
<ARFCFNAM>IDOC_INBOUND_ASYNCHRONOUS</ARFCFNAM>
<ARFCUZEIT>183043</ARFCUZEIT>
<ARFCDATUM>20210503</ARFCDATUM>
<ARFCUSER>LOBSTER</ARFCUSER>
<ARFCTCODE>WE19</ARFCTCODE>
<ARFCRHOST>QWT</ARFCRHOST>
</ITEM>
<OPTIONS />
</ITEMS>Schema file: sap.xsd (See also XML to XSD (to Structure))
Example profile: Profile-TEST_SAP_ARFCSSTATE.pak
NOTE: Adjust the XSD file or the source structure for the XML response if you use the sap.fields parameter.
Monitoring REST call for unsuccessful IDoc sending attempts from SAP
The response XML described above (also in UTF-8 encoding) is also available via a REST call. For authentication, see System monitoring (general) (REST API).
|
Configuration file
The system expects the configuration as a properties file under ./conf/saparfcs.cnf (parameters as for the SapCheckArfcsState class).
If you connect several SAP systems, you can query different aliases. Use the config parameter in the HTTP request for this. This lets you switch the properties file used.
This feature affects only properties that start with sap.. It does not affect the client security configuration (see below).
For the config parameter, prepare several Configuration Files under ./conf. The file name starts with SM58_ and ends with .conf. In between, set the part passed with the config parameter.
If the system finds no file under this name, it reports the missing mandatory property sap.alias.
Example: http(s)://<IP/URL Integration Server>:<Port>/dw/monitor/v1/saparfcs?config=abc sets the configuration file ./conf/SM58_abc.conf.
NOTE: The value of config may also contain the directory separator /. This lets you group configuration files, for example, in a subdirectory SM58_....
Security configuration
The configuration file offers two parameters for access control. Use them to allow only specific IP addresses or only HTTPS.
Parameter | Description |
|---|---|
client.ip | (optional) Allows access from these IPs. Default: |
client.secure | (optional) |
Example:
client.ip = regex:127\\..*;regex:192\\.168\\.21[367]\\..*;0:0:0:0:0:0:0:1
client.secure=falseParameters in URL
You can also specify the parameters in the request, for example: http(s)://<IP/URL Integration Server>:<Port>/dw/monitor/v1/saparfcs?sap.alias=myalias&sap.destination=LOBSTER_TEST. The configuration file takes priority. The system ignores request parameters that the configuration file already defines.
Define the timeout only with the sap.timeout property in a configuration file, not via a request parameter.
Encode special characters in the value for sap.destination, such as the percent sign or spaces. For example: percent as %25 or spaces as %20.