Defensive Programming: Protect Against RFC Disconnects

  • by Michael Debevec, President, Debevec Consulting, Inc.
  • July 19, 2010
SAP CRM often uses SAP NetWeaver Business Warehouse (SAP NetWeaver BW) to store planning data associated with marketing plans and opportunities. When coding mass updates, it is sometimes necessary to update objects in both SAP CRM and SAP NetWeaver BW. This is accomplished via Remote Function Calls (RFCs). Depending on how long the processing takes, the RFC connection between the systems may time out. Learn about a technique to eliminate the chance that the RFC connection will time out.
Key Concept
Remote Function Call (RFC) connections between systems have a finite lifetime (set by Basis) to preserve system resources. If processing in the remote system takes longer than the amount of time reserved for RFC connections, the connection will drop even though the calling process remains running, waiting for control to return from the remote system. Because RFC calls are often used to update related data in different systems, RFC disconnects can result in incomplete processing, inconsistent data, and hanging batch jobs that never finish but consume system resources. Using events to trigger batch programs can eliminate the risk of dropped connections and ensure consistent processing across your systems.

Suppose you need to do a mass update of a volume forecast for a customer — for example, a customer acquired another customer so the number of stores it supplies increased by 15%. In this situation, you need to update your promotional plans to reflect the new volume. Typically, a user would submit an update request to run in the background. The background program for this would first select all the promotions that need to be updated and then determine which products need to be changed. Then, the program would perform a Remote Function Call (RFC) in SAP NetWeaver Business Warehouse (SAP NetWeaver BW) to trigger the volume update. Finally, when the update is complete, the RFC would return processing to SAP CRM to update each of the promotions.

If a large number of products exist in the selected plans in SAP CRM, the update in SAP NetWeaver BW can take too long and time out. When this timeout occurs, the RFC connection breaks, but the calling program in SAP CRM continues to wait for the signal to continue processing. It’s now likely that the data between SAP CRM and SAP NetWeaver BW is going to be inconsistent.

Michael Debevec

Michael Debevec is president of Debevec Consulting, Inc., and is a senior consultant with more than 14 years of experience with SAP. He has worked with SAP CRM for the past nine years and assisted in implementations in the high tech, consumer products, and pharmaceuticals industries. Prior to working in SAP, Michael was an IS manager in charge of logistics systems.

See more by this author


Comments

No comments have been submitted on this article. 


Please log in to post a comment.

To learn more about subscription access to premium content, click here.