Anfang des Inhaltsbereichs

Funktionsdokumentation TRFC and QRFC Dokument im Navigationsbaum lokalisieren

 A TRFC server makes sense when have to send information only once from the SAP system to another application (for example, sending a purchase order). TRFC is required if you want to write an application to receive SAP IDOCS. On your TRFC server, you must manage a connection to a transactional store such as Microsoft SQL Server. You require a transaction store to ensure you can keep track of and manage all RfcTID sent to you from the SAP system so that you can create the TID and the function execution within a transaction. If the transaction fails at any point, the SAP system tries to resubmit it. By default, the system attempts to resubmit the transaction every 15 minutes up to a maximum of 30 attempts. However, you can configure the resubmission parameters individually for each RFC destination using transaction SM59. From the destination maintenance screen, choose Destination ® TRFC options.

To call our TRFC server, the SAP system uses the syntax: CALL FUNCTION xyz IN BACKGROUND TASK DESTINATION dest and then issues a COMMIT WORK.

After the COMMIT WORK, the SAP system makes several additional calls related to TRFC against our .NET component. The first call is CheckTID. This method is responsible for checking whether we have already processed the TID. If we have processed the function, nothing further is done. If not, the next step is to execute the function itself (for example,  function xyz) or queue the function for later execution. After successful completion of this function, we let the SAP system know that the transaction worked by calling OnCommit. Once the SAP system receives the commit from us it knows that everything worked properly and lets us know that we can clear the TID record from our database.

Although it is possible, we do not recommend writing a QRFC server with the connector. To write a QRFC server, you have to implement the SAP queuing mechanism. For purposes where you want queuing, we recommend to simply use Microsoft Message Queue in a TRFC server.

 

Ende des Inhaltsbereichs