SapCheckArfcsState

Group

Time-driven Custom Classes

Class Name

com.ebd.hub.datawizard.util.SapCheckArfcsState

Configuration File

Path to a properties file in field Configuration file .

Description


This class can be called periodically in a cronjob to detect any unsuccessful IDoc send attempts from a connected SAP system. This may occur when the request server registration fails, is not done or is lost.

For this purpose, the table ARFCSSTATE is read via an RFC call if outgoing connections are still working (which is a prerequisite). Note: You can use checkpoints, to monitor if the class is working.

Parameters


Parameter

Description

sap.alias

(mandatory) Name of the SAP alias configured in ./etc/sap.xml that should be used.

sap.timeout

(optional) The timeout in milliseconds. Default: 60000.

sap.destination

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

sap.function

(optional) The function that is called to send the IDocs. Default: IDOC_INBOUND_ASYNCHRONOUS

sap.host

(optional) The SID of the sending SAP system. By default all SIDs are accepted. Important note: Only entries younger than 3*24=72 hours are shown.

sap.fields

(optional) Controls which database fields of the ARFCSSTATE table are included in the XML response. Note: Of course, the field names specified in the property must exist in the ARFCSSTATE table, otherwise an error will be generated.

  • If the property is missing, the ITEM structure described below is generated.

  • If the property exists and the value starts with +, the corresponding fields are added at the end. Example: sap.fields=+ARFCMSG+ARFCSTATE

  • If the property exists and does not start with +, the field list is replaced with the one defined in the property.

Exampe 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 parameter sap.fields below.

The call creates an XML file that contains at least the root element ITEMS with the attribute count. The maximum number of ITEM elements is set to 500 and sorting is not possible.

If there are no pending IDocs in SAP, count has the value 0. With the help of ARFCUZEIT and ARFCDATUM, you can decide in the profile whether an alarm email is sent, for example, if there are entries (i.e. count>0). Note: The evaluation in the querying profile should only generate warnings for entries that are not 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 section XML to XSD (to Structure))

Example profile: Profile-TEST_SAP_ARFCSSTATE.pak

Note: The XSD file/the source structure for the XML response have to be adjusted if parameter sap.fields is used.