Access SAP via RFC
Project description
netlink-sap-rfc
Tools for SAP RFC
Connect
The default .XML files describing the landscape for SAPGUI are used for access via System ID.
login_sid
Returns a Connection object.
Parameter | Description | Default |
---|---|---|
sysid | System ID (a.k.a. ) | |
client | SAP Client (Mandant) | |
passwd | Password | |
user | SAP user ID (BNAME) | Logged on user |
language | Language | EN |
raw | Don't convert date / time | False |
sso
Returns a Connection object.
Parameter | Description | Default |
---|---|---|
sysid | System ID (a.k.a. ) | |
client | SAP Client (Mandant) | |
user | SAP user ID (BNAME) | Logged on user |
language | Language | EN |
raw | Don't convert date / time | False |
Connection Object
Use one of the functions above to instantiate.
Methods
Any Remote enabled Function Module can be called as a method (case-insensitive).
close()
Close the connection. Should always be called before the program is finished, otherwise an error will be logged on the SAP system.
select(table, *args, **kwargs)
Get contents of a table using RFC_READ_TABLE
. Returns a list of Records.
Columns within a Record can be access by index (int), name (case-insensitive), or attribute (case-insensitive).
table (required) table name (case-insensitive)
*args (optional) when specified, only the columns listed will be returned
**kwars (optional) select rows (only equality is supported)
Example
records = rfc_connection.select('t000', 'mtext', 'ort01', mandt='000')
would return a list with one item:
>>> records = c.select('t000', 'mtext', 'ort01', mandt='000')
>>> len(records)
1
>>> records[0][0]
'SAP SE'
>>> records[0][1]
'Walldorf'
>>> records[0]['mtext']
'SAP SE'
>>> records[0]['ort01']
'Walldorf'
>>> records[0].mtext
'SAP SE'
>>> records[0].ort01
'Walldorf'
Changes
0.1.14
-
Add methods
datetime_system_to_user
datetime_user_to_system
to Connection class
0.1.13
- Refactor
- Add
dest
as connection option (usingsapnwrfc.ini
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file netlink-sap-rfc-0.1.15.tar.gz
.
File metadata
- Download URL: netlink-sap-rfc-0.1.15.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13bbc9f5f46a9f7f4ffe8f2b3b42dd80604aebf5228acd8605b70afaf589228 |
|
MD5 | 1f46b8fa0570fbde7e9c0ed334f1ccb9 |
|
BLAKE2b-256 | c87e06f57823f83772493bfe69b40cd3d107558fc5d44e5bdeb1d13726e3f70c |
Provenance
File details
Details for the file netlink_sap_rfc-0.1.15-py3-none-any.whl
.
File metadata
- Download URL: netlink_sap_rfc-0.1.15-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 571f5d62a279e60a765e7157cb8af18b327d02b51eeb4aa2b8abe4c53a006a31 |
|
MD5 | 64e3b0c7a59187b8c1e9246a392b511a |
|
BLAKE2b-256 | 51d1a34004b54042b4b0f4a424ad68d175c6da1d8716a944fe526a88053115a9 |