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.
* Synchronous RFC
CALL FUNCTION ‘ZRFC_SALES_DEL_STATUS’
DESTINATION ‘R10’
EXCEPTIONS
argument_error = 1
send_error = 2
OTHERS = 3.
* Asynchronous RFC
CALL FUNCTION ‘ZRFC_SALES_DEL_STATUS’
STARTING NEW TASK task
DESTINATION ‘R10’
EXCEPTIONS
communication_failure = 1
system_failure = 2
RESOURCE_FAILURE = 3.
* Transactional RFC
CALL FUNCTION ‘ZRFC_SALES_DEL_STATUS’
IN BACKGROUND TASK
DESTINATION ‘R10’
COMMIT WORK.
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?
Different testing options available for RFC connection are:
- Connection test.
- Authorization test.
- Unicode Test.
- Remote Logon Test
For More Information, Check the link: http://www.guru99.com/how-to-configure-and-test-rfc.html
29. How To Debug A Remote Function Call (RFC)?
METHOD 1:
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.
For More Information, Check the link:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0e8b21b-e1b4-2c10-49b5-fd6a95162976?overridelayout=true
More Questions & Answers On SAP RFC:
1. What Do You Mean By RFC? Explain In Detail.
2. What Is An RFC Interface? What are the types of RFC Interface?
3. What Are The Functions Of RFC Interface?
4. Explain A Scenario Where There Will Be A Need Of Using RFC?
5. What Are The Advantages Of RFC – Remote Function Call?
6. For What Purposes Can RFC’s Be Used?
7. State Whether RFC’s Are Client Dependent Or Client Independent Objects?
8. What Are The Types of RFC’s available in SAP System?
9. How Are RFC’s Executed? In Background Or Dialog Work Processes?
10. State Some Factors That Can Increase The Response Time Of An RFC Connection Between Two Systems?
... Return To ABAP Interview Questions With Answers Index