{"id":20484773,"url":"https://github.com/sap-samples/integrated-business-planning-external-forecasting-python","last_synced_at":"2025-10-30T06:02:42.281Z","repository":{"id":38367226,"uuid":"504611078","full_name":"SAP-samples/integrated-business-planning-external-forecasting-python","owner":"SAP-samples","description":"Python-based sample code for using external forecast APIs that are part of SAP IBP for Supply Chain. ","archived":false,"fork":false,"pushed_at":"2025-03-10T14:59:57.000Z","size":134,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-27T05:51:10.515Z","etag":null,"topics":["apis","demand","forecasting","ibp","planning","sample","sample-code","sap-integrated-business-planning"],"latest_commit_sha":null,"homepage":"https://blogs.sap.com/2022/06/21/google-vertex-ai-for-supply-chain-planning/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-17T16:57:31.000Z","updated_at":"2025-03-10T15:00:01.000Z","dependencies_parsed_at":"2023-09-22T07:03:31.833Z","dependency_job_id":null,"html_url":"https://github.com/SAP-samples/integrated-business-planning-external-forecasting-python","commit_stats":{"total_commits":16,"total_committers":6,"mean_commits":"2.6666666666666665","dds":0.4375,"last_synced_commit":"d0e93c1c2c75d0cc835777f6d86168518906f8b6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fintegrated-business-planning-external-forecasting-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fintegrated-business-planning-external-forecasting-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fintegrated-business-planning-external-forecasting-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fintegrated-business-planning-external-forecasting-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/integrated-business-planning-external-forecasting-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732509,"owners_count":21152851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apis","demand","forecasting","ibp","planning","sample","sample-code","sap-integrated-business-planning"],"created_at":"2024-11-15T16:25:42.035Z","updated_at":"2025-10-30T06:02:42.275Z","avatar_url":"https://github.com/SAP-samples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/integrated-business-planning-external-forecasting-python)](https://api.reuse.software/info/github.com/SAP-samples/integrated-business-planning-external-forecasting-python)\r\n\r\n# Using External Forecasting Algorithms via APIs in SAP Integrated Business Planning for Supply Chain \r\n\r\n\r\n## Description\r\nThe Repo contains three main folders which contain different platforms used to do external forecasting. The user can decide which of the platforms he would like to use for his scenario. This repository serves as a collection of code examples for using APIs that are part of SAP Integrated Business Planning (SAP IBP) for Supply Chain. These samples are not part of the product but created for developers to understand how to consume the APIs or use them to integrate with their processes. The focus is on integrating with external forecasting APIs.\r\n\r\n### The SAP_IBP_ExternalForeasting\r\nThis folder contains Python scripts which can be downloaded and modified to calculate the forecasts using Python on his local computer or on a hosted environment where Python is running.\r\n\r\n###  Google_Vertex_AI \r\nSome of our experiments with Google Vertex AI are saved in the folder Google_Vertex_AI which can be used as a reference for storing External forecast data on a Big Query table and later use the Vertex AI Platform for calculating the forecasts. A [Blog](https://saviodomnic.medium.com/google-vertex-ai-for-supply-chain-planning-a39039ad9c6b) reflects the use of this code from this repository as reference\r\n\r\n### Microsoft_AzureML\r\nAdditionally the Microsoft_AzureML folder provides content where the SAP Cloud Integration Suite is used as a middleware to capture the notifcation from SAP IBP, prepare the data and send it over to a Python algorithim that you could implement using Micrisoft's Azure ML Studio. The Python code needs to be exposed as an endpoint and configured in a HTTP request for the SAP Cloud Integration Suite. If you plan to use Micrisift Azure ML as a platform for calculating your forecasts externally, you might consider the artifacts in this folder as a reference.\r\n\r\n### Working with Key figure API\r\nThis folder provides code examples for using the planning services API to read and write Key figure data from a specific planning area. the code samples are in Python. Please use the server.cfg file to update your own settings such as IBP host name, communication user credentials, planning area, etc. This code can run as a stand alone service on your local computer or you can port it to an environment of your choice. If it is running on a local machine, you can use the following URLs to trigger an API call\r\n\r\n###### To read key figure data using  the Planning service api - read methods\r\nhttp://localhost:3002/ibp/sample/readKF\r\n\r\n###### To write key figure data into IBP using the Planning service api - write method\r\nhttp://localhost:3002/ibp/sample/writeKF\r\n\r\nBoth the above samples use the official APIs documented under\r\nhttps://api.sap.com/api/IBP_Keyfigure_ODataService/overview \r\n\r\n## Requirements\r\nPython 3 and above.\r\n\r\n## Download and Installation\r\nDownload the best practice planning view template that fits to your need here.\r\n\r\nFor more information have a look at [SAP note 3170544.](https://launchpad.support.sap.com/#/notes/3170544).\r\n\r\nIf you like to visualize your planning view via Excel, then you might intall the Excel add-in and configure the access to an SAP IBP system.\r\n\r\n## Additional Information\r\nTo learn more about the External Forecasting API, [this blog](https://blogs.sap.com/2022/05/11/how-to-forecast-using-custom-external-algorithms) might be interesting.\r\nIf you wish to use Google's Vertex AI, perhaps you may want to [refer here](https://cloud.google.com/vertex-ai).\r\n\r\n## Known Issues\r\nNone\r\n\r\n## How to obtain support \r\nThese sample code repo is provided \"as-is\", no support is provided. These source codes are not meant for production use, rather it is intented as a reference for learning. They are supposed to help you get started. For additional support, you might post your question in the [SAP Community](https://answers.sap.com/questions/ask.html)\r\n \r\n## License\r\nCopyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fintegrated-business-planning-external-forecasting-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-samples%2Fintegrated-business-planning-external-forecasting-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fintegrated-business-planning-external-forecasting-python/lists"}