Skip to main content

SAP Data Retrieval and Processing Library for IBP

Project description

Ibp2py - Python library for SAP IBP

This is a Python library designed to make it easier to interact with the SAP Integrated Business Planning (IBP) API.

Installation

You can install ibpy using pip:

pip install ibpy2py

Usage

To use ibpy, first create an instance of the ibpy class using your SAP IBP username and password:

from ibpy import ibpy  
username = "YOUR_IBP_USERNAME" 
password = "YOUR_IBP_PASSWORD" 
host = 'YOUR_HOST_URL' 
connection = Ibp2py(username, password, host)

Extracting Master Data

Here is an example of how to extract master data: Method -> MASTER_DATA_API_SRV

PlanningAreaID = 'SAP01' 
VersionID = "BASE" 
MasterDataTypeID = "M3LOCATION" 
PlanningAreaDescr = "Planning" 
VersionName = "Base Line" 
select = '*' 
data = connection.masterdata(MasterDataTypeID, select=select, PlanningAreaID=PlanningAreaID, VersionID=VersionID, PlanningAreaDescr=PlanningAreaDescr, VersionName=VersionName)

Extracting Telemetry Data

Method -> AddInLogon (MtrgActyExcelAddInLogon) Method -> AddInLogon (MtrgActyExcelAddInPlanningView)

module -> Method

Here is an example of how to extract telemetry data:

data = connection.telemetry('PlanningView', module)

Extracting Key Figure Data

Method -> 1 (PLANNING_DATA_API_SRV) Method -> 2 (EXTRACT_ODATA_SRV)

modulo -> Method

Here is an example of how to extract key figure data:

filters="(PERIODID0_TSTAMP ge datetime'2023-04-01T00:00:00' and PERIODID0_TSTAMP lt datetime'2023-07-02T00:00:00')"+ " and CONSENSUSDEMAND gt 0" 
PlanningAreaID = 'SAP01' 
MasterData = 'PRDID,CUSTID' 
KeyFigures = 'CONSENSUSDEMAND' 
data = connection.keyfigure(PlanningAreaID, MasterData, KeyFigures,modulo = modulo,filters=filters)

Contact Information

For any issues or queries related to ibpy2py, feel free to reach out:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache License 2.0

Note: This library is open source and is not sponsored or supported by SAP.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ibp2py-1.0.6.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ibp2py-1.0.6-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file ibp2py-1.0.6.tar.gz.

File metadata

  • Download URL: ibp2py-1.0.6.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibp2py-1.0.6.tar.gz
Algorithm Hash digest
SHA256 82606dcbd5b735968bce627874c0886f9f3ed7a3a963368b3bf8f65b5bf5eb9c
MD5 2b07073b2c8d134c151950f4c4b917e6
BLAKE2b-256 99852f91599f86d0d44c977d965886008fb11d4036db27f911dc5101b7b68bb5

See more details on using hashes here.

File details

Details for the file ibp2py-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ibp2py-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibp2py-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8cea338910a01137f1204281500fa30cae481bf6e261ab4b56deb2b124a972bc
MD5 a3c80827ca29762a19749924dd125aa8
BLAKE2b-256 5b49ea05ff1635df865849987787f94f9af44cf34eb24caae70bb02d3f9471b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page