Pages

RFC-Interview Questions & Answers-SAP ABAP-6.

26. How Can You Differentiate Types Of RFC By Syntax In An ABAP Program?

Basically RFC’s can be recognized in an ABAP program by the syntax CALL FUNCTION <rfc name=' '> DESTINATION <destination name=' '>.

If the RFC function call contains the clause STARTING NEW TASK, it is an asynchronous RFC; the clause IN BACKGROUND TASK indicates a transactional RFC. If the call only contains the clause DESTINATION, but neither STARTING NEW TASK nor IN BACKGROUND TASK, then the RFC is started as a synchronous RFC.

The following code starts the functional module ZRFC_SALES_DEL_STATUS synchronously, asynchronously, and transactionally.

27. What Do You Mean By Trusted RFC Connections? What Are The Advantages Of It?

While defining RFC destination via tcode SM59, there is an option to make the RFC connection as 'Trusted'. Once selected, the calling (trusted) system doesn't require a password to connect with target (trusting) system.

Following are some of the advantages of using trusted channels:

Cross-system Single Sign-On facility.

Password does not need to be sent across the network.

Timeout mechanism for the log-on data prevents misuse.

Prevents the mishandling of log-on data because of the time-out mechanism.

User-specific log-on details of the calling/trusted system is checked.

The RFC users must have the required authorizations in the trusting system (authorization object S_RFCACL).Trusted connections are mostly used to connect SAP Solution Manager Systems with other SAP systems.

28. What Are The Different Testing Options Available For RFC Connection?

Suppose you want to debug a function module which is there in SRM/APO system from R/3.
(FYI: As you all know this RFC Destination is maintained via transaction code SM59 )

Keep the external break-point in your calling program before it calls the RFC. Now login into the Destination system where you’re remote enabled function module exist and put an external break-point.

Now go to Transaction code SRDEBUG and click on the Activate Debugging Button: It will give you a pop up which confirm your id, application server etc.

Click enter which will give you another popup. Keep it as it is.

Now go to your Report program in source system and Execute it , it will open debugger , when you press F5 key to go inside the RFC Function module it will start debugging in APO system.

User Id used to Login to destination system to activate debugging should be same as RFC login id in the Calling system.

Calling System

Destination System

METHOD 2. Calling a custom RFC Three steps needs to be followed. For example we are calling an RFC enabled FM in ECC system from CRM system.

Add an infinite loop in the remote custom Function Module (adding a “DO. ENDDO.” statement at the start of the FM would be enough).

Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop.

Now login to the ECC system and go to transaction SM50 select the process which is executing the RFC and navigate to the menu: “Program/Session->Program->Debugging” this triggers the debugger session in a separate window.