ibp2py

SAP Data Retrieval and Processing Library for IBP


Keywords
SAP, IBP, API, ODATA
License
Apache-2.0
Install
pip install ibp2py==1.0.6

Documentation

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 ibpy

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:

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

Here is an example of how to extract telemetry data:

data = connection.telemetry('PlanningView')

Extracting Key Figure Data

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,filters=filters)

Contact Information

For any issues or queries related to ibpy, 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.