Documentation Index

Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt

Use this file to discover all available pages before exploring further.

SapCheckArfcsState

Prev Next

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 ./etc/sap.xml that you want to use.

sap.timeout

(optional) Timeout in milliseconds. Default: 60000.

sap.destination

(optional) Name of the destination (type T) defined in SM59. SQL placeholders are allowed, for example %. Default: %LOB%.

sap.function

(optional) Function that the system calls to send the IDocs. Default: IDOC_INBOUND_ASYNCHRONOUS.

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 ARFCSSTATE table the system includes in the XML response.

NOTE:  The field names specified in the property must exist in the ARFCSSTATE table. Otherwise, the system generates an error.

If the property is missing, the system generates the ITEM structure described below.

If the value starts with +, the system adds the corresponding fields at the end.

Example: sap.fields=+ARFCMSG+ARFCSTATE

If the value does not start with +, the system replaces the field list with the one defined in the property.

Example file

sap.alias=myalias
sap.destination=LOBSTER TEST

XML 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).

http(s)://<IP/URL Integration Server>:<Port>/dw/monitor/v1/saparfcs

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: localhost. With the regex: prefix, you can use regular expressions (see example below).

client.secure

(optional) false if HTTP is allowed. true if only HTTPS is allowed. Default: true.

Example:

client.ip = regex:127\\..*;regex:192\\.168\\.21[367]\\..*;0:0:0:0:0:0:0:1
client.secure=false

Parameters 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.