Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views1 page

How To Validate RFC Connection in SAP

This document provides a tutorial on how to validate an RFC connection in SAP using the function module RFC_PING. It outlines the necessary checks for RFC destinations, including availability and connection status, and includes a sample ABAP program to demonstrate the validation process. The program retrieves the RFC destination from the RFCDES table and checks its connectivity, providing appropriate messages based on the validation results.

Uploaded by

amir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

How To Validate RFC Connection in SAP

This document provides a tutorial on how to validate an RFC connection in SAP using the function module RFC_PING. It outlines the necessary checks for RFC destinations, including availability and connection status, and includes a sample ABAP program to demonstrate the validation process. The program retrieves the RFC destination from the RFCDES table and checks its connectivity, providing appropriate messages based on the validation results.

Uploaded by

amir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to validate RFC connection in SAP?

Author | Last Updated| 17 Feb 2014 | 8 Comments A+ A-

Validating RFC destination before calling RFC function module, check RFC connection
using Function module RFC_PING

In ABAP programming, some times we may need to validate and check RFC
Destination before calling a function module, you can find useful information in
this tutorial.

Required validations for RFC:

 Check if RFC destination is available or not.


 Check RFC destination connection is working or not.

Example programm to validate RFC destination

All the RFC destinations are stored in table RFCDES, we can check connection
using function module RFC_PING (When ever you call and RFC, it will
automatically validate connection, if you need to validate explicitly you can use
this function module).
REPORT ZSAPN_CHECK_RFC.
DATA : WA_RFCDES TYPE RFCDES.
PARAMETERS P_RFC TYPE STRING.

START-OF-SELECTION.
SELECT SINGLE * FROM RFCDES INTO WA_RFCDES WHERE RFCDEST = P_RFC.
IF WA_RFCDES IS NOT INITIAL.
CALL FUNCTION 'RFC_PING' DESTINATION P_RFC.

IF SY-SUBRC EQ 0.
MESSAGE 'RFC connection is perfect' TYPE 'S'.

ELSE.
MESSAGE 'RFC is not working' TYPE 'E'.
ENDIF.

ELSE.
MESSAGE 'RFC destination dosent exist' TYPE 'E'.
ENDIF.

You might also like