How to Perform RFC Operations using SAP Landscape Management
SAP Landscape Management provides the central management dashboard to allow system administrators executing various basis tasks on different managed systems, such as instance start/stop, Post Copy Automation and shell scripts via Host Agent. This blog post will provide insights focusing on remote function call (RFC) operations and aims to provide you with examples of how to perform RFC operations on managed ABAP systems using SAP Landscape Management.
RFC is an SAP interface protocol based on CPI-C and enables you to call and execute predefined functions in a remote system. In general SAP Landscape Management supports standard RFC operation as well as custom operation to remotely execute function modules. By reading this blog you will discover how to configure and execute RFC in both ways.
Standard RFC operation with SAP Landscape Management
Inside SAP Landscape Management there are built-in operations available in the operation dashboard as per below list, allowing you to directly execute those supported RFC operations on managed system with one click.
|Getting A List of Users Who Are Logged On||Display a list of all online users.|
|Creating System Messages||Create a system message to send important information to the SAP users.|
|Listing System Messages||List the messages that are currently being displayed to users.|
|Managing Logon Groups||Create and delete group entries.|
|Getting Active Batch Jobs||List active background jobs.|
|Getting System Information||Retrieve information regarding the installed components such as the release and the Support Package level.|
In the first example I am going to show you how to execute operation of ‘Getting System information’, which will check and return the release version of all installed components on target system. This operation may be used after application maintenance to verify the target version.
You will first configure RFC destinations on managed system where you plan to execute the operation. SAP Landscape Management will use this config data to connect to the ABAP system and execute the RFC call.
Configure in menu Configuration > Systems > System of choice > Provisioning & RFC,
Select the Configure RFC Destination checkbox and provide a user with the needed permissions and choose the (productive) client of the ABAP system. The Default Application Server will be used to for RFC connection. In case you have a distributed system with multiple Application Server, this configuration will ensure all RFC request goes directly to the picked Application Server.
Save your entries and verify the RFC connection.
With the connection setup, you can directly execute the supported RFC operations in SAP Landscape Management. Choose Operations and select the operation ‘Get System Information’.
The installed components information such as the system ID (SID), release, and installation number, as well as the Support Package level will show up in a dialog box.
Custom Operation to perform RFC-enabled function module in SAP Landscape Management
Beside the aforementioned RFC operations on standard list, SAP Landscape Management also allows you to execute any ABAP remote-enabled function module by leveraging Automation Studio, a foundation provides extensibility for customers to easily integrate their own solutions in SAP Landscape Management to fulfill specific requirements. If you are not familiar, please refer to the blog: SAP Landscape Management Automation Studio for a detailed introduction of Automation Studio.
By means of Automation Studio, system admins can take advantage of various function modules and bring them into SAP Landscape Management to facilitate their daily routine tasks. For example, during a planned maintenance it may require to dynamically change instance parameters and revert it back once maintenance completed. In such case, function module ‘TH_GET_PARAMETER’ and ‘TH_CHANGE_PARAMETER’ can be used to check and change the required parameters. With Automation Studio you can easily execute these function modules from SAP Landscape Management along with other maintenance operations like System start/stop, you will gain a centralized control instead of jumping across different backend servers. Furthermore, these RFC operations can be embedded into your own Custom Process to complete an end-to-end maintenance workflow, which will dramatically reduce man effort and avoid human error.
The following part will exemplify how to use Automation Studio to enable RFC call so function modules either standard or customized can be remotely executed with SAP Landscape Management.
The RFC destination must be configured in the same way as standard RFC operation. You will then define a Provider Definition of type remote function call in Automation Studio.
In Automation Studio > Provider Definitions create the Provider, enter the name of the ABAP function module and make it available for Instance operations. Here I am going to create a Provider Definition by using FM ‘TH_GET_PARAMETER’ to retrieve given parameters.
Select afterwards the Provider:
Switch to tab “Parameters” and choose “Retrieve Custom Parameters”, all the defined interface parameter in function modules will be listed. For example, import parameters are added as custom parameters, export parameters and table parameters are added as output parameters. Additional information, such as label and description, is retrieved as well.
Based on the Provider Definition, we now specify when and under which circumstances it can be executed. We can define our own operations and associate it with the Provider Definitions.
Go to Automation Studio > Custom operations, choose the name of the corresponding Provider Definition.
Once the operation has been created, we can go to Operation tab and you will see the new defined operation under the specific button group, it can be executed the same way as standard RFC operation. Here we have two operation created, first we retrieve the runtime parameter ‘rdisp/max_wprun_time’ on instance AS11, then dynamically change it.
The changed value can also be validated via RZ11.
By default, the custom operation of RFC call is triggered on the application server where it was configured under Configuration-Systems-RFC Destination. In case you want to execute the function module on selected application server in a distributed environment, you would upgrade to SAP Landscape Management SP16 and it will allow you to execute function module on specific instance without change the configuration of RFC Destination. In addition, you can perform function module in mass operation on multiple instances at one time, which provides flexibility for admins to easily oversee and change parameters.
The functionality of retrieve and change ABAP parameter will become part of standard RFC operation in SAP Landscape Management starting with SP17, which will further facilitate the execution. All the planned new features can be previewed in SAP Road Map Explorer. Here we just use it as an example to showcase how to trigger function modules in SAP Landscape Management. There are more use cases can be explored based on a wide range of function modules, by leveraging Automation Studio they can be adapted and integrated to build your own scenarios.
The above covered the basics of using RFC operations with SAP Landscape Management. With Automation Studio, you can seamlessly integrate the suitable RFC-enabled function module and centralize the operations of your SAP systems management.
Reference and More information: