Metadata-Version: 2.1
Name: sap_rfc_data_management
Version: 1.1.1
Summary: Automate some SAP transactions
Home-page: https://github.com/victorouttes/sap-rfc-data-management
Author: Victor Outtes
Author-email: victor.outtes@gmail.com
License: MIT
Download-URL: https://github.com/victorouttes/sap-rfc-data-management/archive/refs/tags/1.1.1.tar.gz
Keywords: sap,data,rfc,automate,ec3,pm
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# SAP RFC data management

Lib to perform some SAP ERP modifications.

# Requirements

You need to install Cython before install this lib:
```
pip install Cython
```

Also need to install SAP RFC SDK.

# Install
```
pip install sap-rfc-data-management
```

# Usage
### Create PM notification:
```python
from sap_rfc_data_management.connection import SAPConnection
from sap_rfc_data_management.pm_notification import PMNotification

connection = SAPConnection(
    host=SAP_HOST,
    service=SAP_SERVICE,
    group=SAP_GROUP,
    sysname=SAP_SYSNAME,
    client=SAP_CLIENT,
    lang=SAP_LANG,
    user=SAP_USER,
    password=SAP_PASSWORD
)

runner = PMNotification(connection=connection)

number = runner.create(
    title='notification title',
    notification_type='notification type',
    priority='notification priority',
    equipment='notification equipment number',
    reported_by='notification reported user (or some other text)',
    date_malfunction='malfunction datetime',
    maintenance_plant='notification plant',
    workcenter_id='notification workcenter'
)
print(number)  # created notification's number
```

### Change PM equipment ABC code:
```python
from sap_rfc_data_management.connection import SAPConnection
from sap_rfc_data_management.pm_equipment import PMEquipment

connection = SAPConnection(
    host=SAP_HOST,
    service=SAP_SERVICE,
    group=SAP_GROUP,
    sysname=SAP_SYSNAME,
    client=SAP_CLIENT,
    lang=SAP_LANG,
    user=SAP_USER,
    password=SAP_PASSWORD
)

runner = PMEquipment(connection=connection)
runner.change(
    equipment='equipment number to be changed',
    abc_code='new abc code (1 character)'
)
```


