community.sap_libs.sap_pyrfc module – Ansible Module for use of SAP PyRFC to execute SAP RFCs (Remote Function Calls) to SAP remote-enabled function modules
Note
This module is part of the community.sap_libs collection (version 1.5.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.sap_libs.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.sap_libs.sap_pyrfc.
New in community.sap_libs 1.2.0
Synopsis
- This module will executes rfc calls on a sap system. 
- It is a generic approach to call rfc functions on a SAP System. 
- This module should be used where no module or role is provided. 
Requirements
The below requirements are needed on the host that executes this module.
- pyrfc >= 2.4.0 
Parameters
| Parameter | Comments | 
|---|---|
| The required connection details. | |
| The required host for the SAP system. Can be either an FQDN or IP Address. | |
| The client number to connect to. You must quote the value to ensure retaining the leading zeros. | |
| The used language to execute. | |
| The required password for the SAP system. | |
| The systemid of the SAP system. | |
| The system number of the SAP system. You must quote the value to ensure retaining the leading zeros. | |
| The required username for the SAP system. | |
| The SAP RFC function to call. | |
| The parameters which are needed by the function. | 
Examples
- name: test the pyrfc module
  community.sap_libs.sap_pyrfc:
    function: STFC_CONNECTION
    parameters:
      REQUTEXT: "Hello SAP!"
    connection:
      ashost: s4hana.poc.cloud
      sysid: TDT
      sysnr: "01"
      client: "400"
      user: DDIC
      passwd: Password1
      lang: EN
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| The execution description. Returned: always Sample:  | 
