
Important Note: The Purchasing (/IBP/API_PURCHASING) OData API service is currently only available by individual customer request. To use it, create an incident on component SCM-IBP-INT-ODT-PUR, requesting SAP to enable the communication scenario SAP_COM_0955.
Communication Arrangement
PlanningAreaID | VersionID | SourceLogicalSystem | IBPPurgDocIntegrationMode |
IBPPurgDocType | IBPPurgDocExt | IBPPurgDocItem | IBPPurgSOSAdditionalLaneID | IBPPurgSOSModeOfTransport | IBPGRProcgTmeInDays | IBPPurgDocScheduleLine |
ProductID | ShipToLocationID | ShipFromLocationID | IBPPurgDeliveryDateTime | IBPPurgOrderedQuantity | IBPPurgReceiptQuantity | IBPPurgDocQuantityUnit |
{
"TransactionID":"33a06853-4c49-1eee-b2df-351a7e3b070f",
"PlanningAreaID":"SAP7FAC",
"VersionID":"__BASELINE",
"SourceLogicalSystem":"OBPSRC",
"IBPPurgDocIntegrationMode":"UPSERT",
"_IBPPurgDocItemAsyncWrite":[
{
"IBPPurgDocType":"PO_ITM",
"IBPPurgDocExt":"20001001",
"IBPPurgDocItem":"000010",
"IBPPurgSOSAdditionalLaneID":"0_0001_3_5300011243_000000",
"IBPPurgSOSModeOfTransport":"DEF",
"IBPGRProcgTmeInDays":2,
"_IBPPurgDocSchdLnAsyncWrite":[
{
"IBPPurgDocScheduleLine":"0010",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-03-26T00:00:00Z",
"IBPPurgOrderedQuantity":100,
"IBPPurgReceiptQuantity":100,
"IBPPurgDocQuantityUnit":"EA"
},
{
"IBPPurgDocScheduleLine":"0020",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-03-27T00:00:00Z",
"IBPPurgOrderedQuantity":200,
"IBPPurgReceiptQuantity":200,
"IBPPurgDocQuantityUnit":"EA"
}
]
},
{
"IBPPurgDocType":"PO_ITM",
"IBPPurgDocExt":"20001001",
"IBPPurgDocItem":"000020",
"IBPPurgSOSAdditionalLaneID":"0_0001_3_5300011243_000000",
"IBPPurgSOSModeOfTransport":"DEF",
"IBPGRProcgTmeInDays":2,
"_IBPPurgDocSchdLnAsyncWrite":[
{
"IBPPurgDocScheduleLine":"0010",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-02-28T00:00:00Z",
"IBPPurgOrderedQuantity":150,
"IBPPurgReceiptQuantity":150,
"IBPPurgDocQuantityUnit":"EA"
},
{
"IBPPurgDocScheduleLine":"0020",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-03-29T00:00:00Z",
"IBPPurgOrderedQuantity":250,
"IBPPurgReceiptQuantity":250,
"IBPPurgDocQuantityUnit":"EA"
}
]
},
{
"IBPPurgDocType":"PO_ITM",
"IBPPurgDocExt":"20002002",
"IBPPurgDocItem":"000010",
"IBPPurgSOSAdditionalLaneID":"0_0001_3_5300011243_000000",
"IBPPurgSOSModeOfTransport":"DEF",
"IBPGRProcgTmeInDays":2,
"_IBPPurgDocSchdLnAsyncWrite":[
{
"IBPPurgDocScheduleLine":"0010",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-03-30T00:00:00Z",
"IBPPurgOrderedQuantity":300,
"IBPPurgReceiptQuantity":300,
"IBPPurgDocQuantityUnit":"EA"
},
{
"IBPPurgDocScheduleLine":"0020",
"ProductID":"GG03_BOARD_A@QKV002",
"ShipToLocationID":"PLFA71@QKV002",
"ShipFromLocationID":"SUSUPPLIER71@QKV002",
"IBPPurgDeliveryDateTime":"2024-04-02T00:00:00Z",
"IBPPurgOrderedQuantity":350,
"IBPPurgReceiptQuantity":350,
"IBPPurgDocQuantityUnit":"EA"
}
]
}
]
}
3. Using Python Again, Making GET and POST requests to establish a connection with SAP IBP, get Transaction ID, and Post that JSON Payload to IBP calling the ODATA API service
{"@odata.context":"../$metadata#com.sap.gateway.srvd_a2x.ibp.api_purchasing.v0001.xIBPxD_PurgTransactionStatusR","@odata.metadataEtag":"W/\"20240213123138\"","TransactionStatus":"PROCESSED"}
200
Wrapping up, I would like to mention that I am not an expert in Python but I have tried to make use of the language to build a user-friendly utility here. There could be better ways of accomplishing the same task with better overall performance and one can do their code design.
I would appreciate it if you could leave your valuable thoughts and feedback for me to improve upon things here.
Regards
Gaurav Guglani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
6 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 |