community.sap_libs.sap_company module – This module will manage a company entities in a SAP S4HANA environment
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_company.
New in community.sap_libs 1.0.0
Synopsis
- The community.sap_libs.sap_user module depends on - pyrfcPython library (version 2.4.0 and upwards). Depending on distribution you are using, you may need to install additional packages to have these available.
- This module will use the company BAPIs - BAPI_COMPANY_CLONEand- BAPI_COMPANY_DELETEto manage company entities.
Requirements
The below requirements are needed on the host that executes this module.
- pyrfc >= 2.4.0 
Parameters
| Parameter | Comments | 
|---|---|
| The city where the company is located. | |
| The client number to connect to. You must quote the value to ensure retaining the leading zeros. Default:  | |
| The company id. | |
| The required password for the SAP system. | |
| The required username for the SAP system. | |
| The country code for the company. For example,  | |
| General E-Mail address. | |
| The required host for the SAP system. Can be either an FQDN or IP Address. | |
| The company name. | |
| Additional company name. | |
| The post code from the city. | |
| The decision what to do with the company. Choices: 
 | |
| Street where the company is located. | |
| Street number. | |
| The system number of the SAP system. You must quote the value to ensure retaining the leading zeros. Default:  | |
| The timezone. | 
Notes
Note
- Does not support - check_mode.
Examples
- name: Create SAP Company
  community.sap_libs.sap_company:
    conn_username: 'DDIC'
    conn_password: 'HECtna2021#'
    host: 100.0.201.20
    sysnr: '01'
    client: '000'
    state: present
    company_id: "Comp_ID"
    name: "Test_comp"
    name_2: "LTD"
    country: "DE"
    time_zone: "UTC"
    city: "City"
    post_code: "12345"
    street: "test_street"
    street_no: "1"
    e_mail: "[email protected]"
# pass in a message and have changed true
- name: Delete SAP Company
  community.sap_libs.sap_company:
    conn_username: 'DDIC'
    conn_password: 'HECtna2021#'
    host: 100.0.201.20
    sysnr: '01'
    client: '000'
    state: absent
    company_id: "Comp_ID"
    name: "Test_comp"
    name_2: "LTD"
    country: "DE"
    time_zone: "UTC"
    city: "City"
    post_code: "12345"
    street: "test_street"
    street_no: "1"
    e_mail: "[email protected]"
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| A small execution description. Returned: always Sample:  | |
| A complete description of the executed tasks. If this is available. Returned: always Sample:  | 
