SAP S/4HANA APIs Required by This Module¶
This page lists everything that must be activated/authorized in the target S/4HANA
system for the pyxecm_customizer.sap.SAP class to work. It is a checklist for
S/4HANA Basis/Gateway administrators, derived from the service registry in
sap.py (SAP_ODATA_SERVICES).
Use SAP.check_odata_apis() to verify the status of all services below against a
live system - it reports exactly which of the steps below is still missing per service.
General activation steps (apply to every OData service)¶
/IWFND/MAINT_SERVICE(OData V2) or/IWFND/V4_ADMIN(OData V4): activate / publish the service for the relevant backend system alias.- V2: "Add Service" -> backend system alias (e.g.
LOCAL) -> technical service name (e.g.API_MAINTENANCEORDER) -> "Get Services" -> select the version(s) (e.g.0001,0002) -> "Add Selected Services". - V4: "Publish Service Groups" for the service group (e.g.
API_PURCHASEORDER_2). SICF: the ICF node of the service must be active (/sap/opu/odata/sap/<service>for V2,/sap/opu/odata4for V4).PFCG: the calling user needs the start authorization for the service plus the business authorizations for the underlying transaction (e.g. as forIW31to create maintenance orders):- V2: authorization object
S_SERVICE(role menu entry of typeIWSG, e.g.R3TR IWSV API_MAINTNOTIFICATION 0001). - V4: authorization object
S_STARTfor the service group (role menu entry "TADIR Service"R3TR G4BA <service group>, e.g.API_PURCHASEORDER_2) - notS_SERVICE. Without it, SAP answers HTTP 403 with message/IWBEP/CM_V4_COS/011. /IWFND/GW_CLIENT:GET /sap/opu/odata/sap/<service>/$metadata(or the V4 equivalent) should return HTTP 200 as a smoke test.
Troubleshooting: /IWFND/ERROR_LOG, SU53, and the system log (SM21).
"No System Alias found for Service" (/IWFND/CM_COS/064, HTTP 500)¶
SAP.check_odata_apis() reports state=error with a message like [/IWFND/CM_COS/064]
No System Alias found for Service '<technical name>' and user '<user>' when a service
has been registered in /IWFND/MAINT_SERVICE but has no backend system alias assigned to
it - a step further than "not activated" (403), but still unusable. This typically happens
when the service was added through a route other than the normal "Add Service" wizard in
step 1 above (e.g. transport import, or a different Fiori content activation report), which
skips the alias assignment. To fix it in /IWFND/MAINT_SERVICE:
- Filter/find the entry for the technical service name (e.g.
API_MAINTNOTIFICATION) in the service list. - Select its row and open the "SAP System Alias" assignment dialog (toolbar button / context menu on the row - exact label depends on the SAP_GWFND release).
- Add the same backend system alias that the already-working services use (e.g.
LOCAL- check the alias ofAPI_MAINTENANCEORDER, which is active, for the correct value in this system) and mark it as default if prompted. - Save, then re-run
SAP.check_odata_apis()to confirm the service moved toactive.
OData services¶
The BO Type column lists the SAP business object type (BOR object type, transaction
SWO1) of the main entity of each service - e.g. the type to use for business workspaces
and business object references in Extended ECM. All types were checked in the S/4HANA
reference system; "-" means there is no BOR object type for the entity.
The business object types that business workspaces are typically linked to are also available
in code: SAP_BUSINESS_OBJECT_TYPES in pyxecm_customizer.sap_models (name and key structure),
and SAPBusinessObjectType.get(bo_type).get_key_fields(bo_id) converts a business object ID
(SAP's internal format, e.g. "49000001232026" for BUS2017) into the key fields the OData
APIs expect (e.g. ("4900000123", "2026")).
¹ BUS0008001 is the BOR object type "Plant storage area" - the storage location of a plant.
Plant Maintenance¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_MAINTENANCEORDER |
BUS2007 |
V2 (;v=0002) |
MaintenanceOrder, MaintenanceOrderOperation |
Create / Read / Update maintenance orders |
API_MAINTNOTIFICATION |
BUS2038 |
V2 | MaintenanceNotification, MaintenanceNotificationItem |
Create / Read / Update maintenance notifications |
API_MAINTORDERCONFIRMATION |
BUS2128 |
V2 | MaintOrderConfirmation |
Create / Read / Cancel maintenance order confirmations |
API_MAINTENANCEPLAN |
BUS1020 |
V2 | MaintenancePlan, MaintenancePlanCycle, MaintenanceItem |
Create / Read / Update / Schedule maintenance plans |
API_MAINTENANCETASKLIST |
BUS1019 |
V4 | MaintenanceTaskList, MaintenanceTaskListOperation |
Create / Read / Update maintenance task lists |
Sales¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_SALES_ORDER_SRV |
BUS2032 |
V2 | A_SalesOrder, A_SalesOrderItem |
Create / Read / Update / Delete sales orders |
API_SALES_CONTRACT_SRV |
BUS2034 |
V2 | A_SalesContract, A_SalesContractItem |
Create / Read / Update / Delete sales contracts |
API_CREDIT_MEMO_REQUEST_SRV |
BUS2094 |
V2 | A_CreditMemoRequest, A_CreditMemoRequestItem |
Create / Read / Update / Delete / Approve credit memo requests |
API_DEBIT_MEMO_REQUEST_SRV |
BUS2096 |
V2 | A_DebitMemoRequest, A_DebitMemoRequestItem |
Create / Read / Update / Delete debit memo requests |
API_OUTBOUND_DELIVERY_SRV |
LIKP |
V2 (;v=0002) |
A_OutbDeliveryHeader, A_OutbDeliveryItem |
Create / Read / Update / Delete outbound deliveries, picking, goods issue |
Billing¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_BILLING_DOCUMENT_SRV |
VBRK (abstract: BUS2037) |
V2 | A_BillingDocument, A_BillingDocumentItem |
Read / Cancel billing documents (customer invoices, credit / debit memos), get the PDF |
API_BILLING_DOCUMENT_REQUEST_SRV |
- | V2 | A_BillingDocumentRequest, A_BillingDocumentRequestItem |
Read / Delete / Reject billing document requests (external billing) |
Purchasing¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_PURCHASECONTRACT_PROCESS_SRV |
BUS2014 |
V2 | A_PurchaseContract, A_PurchaseContractItem |
Create / Read / Update purchase contracts |
API_RFQ_PROCESS_SRV |
BUS2010 |
V2 | A_RequestForQuotation, A_RequestForQuotationItem, A_RequestForQuotationBidder |
Create / Read / Update / Delete requests for quotation, complete / cancel |
API_QTN_PROCESS_SRV |
BUS2011 |
V2 | A_SupplierQuotation, A_SupplierQuotationItem |
Create from RFQ / Read / Update / Delete supplier quotations, submit |
API_INFORECORD_PROCESS_SRV |
- | V2 | A_PurchasingInfoRecord, A_PurgInfoRecdOrgPlantData |
Create / Read / Update / Delete (indicator) purchasing info records |
API_PURCHASING_SOURCE_SRV |
- | V2 | A_PurchasingSource |
Create / Read / Update / Delete source list records |
API_PURCHASEREQUISITION_2 |
BUS2105 (item: BUS2009) |
V4 | PurchaseReqn, PurchaseReqnItem, PurchaseReqnAcctAssgmt |
Create / Read / Update purchase requisitions |
API_PURCHASEORDER_2 |
BUS2012 |
V4 | PurchaseOrder, PurchaseOrderItem, PurchaseOrderScheduleLine, PurchaseOrderAccountAssignment |
Create / Read / Update / Delete purchase orders |
API_SUPPLIERINVOICE_PROCESS_SRV |
BUS2081 |
V2 | A_SupplierInvoice, A_SuplrInvcItemPurOrdRef, A_SupplierInvoiceItemGLAcct |
Create / Read / Delete / Cancel / Release supplier invoices |
API_INBOUND_DELIVERY_SRV |
BUS2015 |
V2 (;v=0002) |
A_InbDeliveryHeader, A_InbDeliveryItem |
Create / Read / Update / Delete inbound deliveries, putaway, goods receipt |
Activating the sourcing services is enough for reading and for source list records. Creating documents also needs this customizing:
- Requests for quotation use the new output management without a NAST fallback. Without
the BRF+ content of application object type
REQUEST_FOR_QUOTATION(SAP Note 2248229, import in transactionBRFPLUS), every create fails withAPOC_OR_MESSAGES/051"ID ... is initial, unknown, or it does not have the correct object type". An empty output determination (OPD) is enough - SAP then only warns "No output parameters could be determined". - Supplier quotations (
CreateFromRFQ) get the document type of the RFQ with categoryQ: that type must exist for categoryQ(T161) and have follow-on document types (V_MMPUR_FOLL_DTY, e.g.F/NBandK/MK), otherwiseMM_PUR_QTN/002"Follow-on doc. is inconsistent". - Purchasing info records with a price need a price condition type whose access sequence
contains the info record tables
017and018(as the standard0002), otherwiseCND_MAINT_LTD_API/009. SAP takes the planned delivery time from the supplier's purchasing organization data and ignores the API value (KBA 3696517) - the supplier needs one, otherwiseAPPL_MM_PUR_INFOREC/010.
Warranty¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_WARRANTYCLAIM |
BUS2222 |
V4 | WarrantyClaim, WarrantyClaimVersion, WarrantyClaimItem |
Create / Read / Update / Process warranty claims from customers and against suppliers |
Inventory Management¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_MATERIAL_DOCUMENT_SRV |
BUS2017 |
V2 | A_MaterialDocumentHeader, A_MaterialDocumentItem |
Create / Read / Cancel goods movements (material documents) |
API_MATERIAL_STOCK_SRV |
- | V2 | A_MaterialStock, A_MatlStkInAcctMod |
Read the stock per plant, storage location, batch and stock type |
Production¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_PLANNEDORDER |
BUS2004 |
V4 | PlannedOrderHeader |
Create / Read / Update / Delete / Schedule planned orders |
API_PRODUCTION_ORDER_2_SRV |
BUS2005 |
V2 | A_ProductionOrder_2, A_ProductionOrderOperation_2, A_ProductionOrderStatus_2 |
Create / Read / Update / Convert / Status of production orders |
Master Data¶
| Service | BO Type | Version | Entity Sets | Purpose |
|---|---|---|---|---|
API_PLANT_2 |
BUS0008 |
V4 | Plant |
Read plants |
API_STORAGELOCATION_SRV |
BUS0008001 ¹ |
V2 | StorageLocation |
Read storage locations |
API_PRODUCT_SRV |
BUS1001006 (generic: BUS1001) |
V2 | A_Product, A_ProductPlant, A_ProductDescription |
Create / Read products (materials) |
API_BILL_OF_MATERIAL_SRV |
BUS1080 |
V2 (;v=0002) |
MaterialBOM, MaterialBOMItem |
Create / Read / Update material BOMs, add / delete items |
API_PRODUCTION_VERSION |
- | V4 | ProductionVersion |
Read production versions |
API_WORK_CENTERS |
BUS0011 |
V2 | A_WorkCenters |
Read work centers |
API_EQUIPMENT |
EQUI |
V2 | Equipment |
Create / Read equipment |
API_FUNCTIONALLOCATION |
BUS0010 |
V2 | FunctionalLocation |
Create / Read functional locations |
API_BUSINESS_PARTNER |
BUS1006 (customer: KNA1, supplier: LFA1) |
V2 | A_BusinessPartner, A_BusinessPartnerRole |
Create / Read business partners (customers, suppliers) |
API_COMPANYCODE_SRV |
BUS0002 |
V2 | A_CompanyCode |
Read company codes |
API_SALESORGANIZATION_SRV |
BUS0006 |
V2 | A_SalesOrganization |
Read sales organizations |
API_PURCHASINGORGANIZATION |
BUS0007 |
V4 | A_PurchasingOrganization |
Read purchasing organizations |
API_COSTCENTER_SRV |
BUS0012 |
V2 | A_CostCenter |
Read cost centers |
API_PROFITCENTER_SRV |
BUS0015 |
V2 | A_ProfitCenter |
Read profit centers |
API_GLACCOUNTINCHARTOFACCOUNTS_SRV |
BUS3006 |
V2 | A_GLAccountInChartOfAccounts |
Read G/L accounts |
RFC channel (SAP.call())¶
For RFC/BAPI based calls (used e.g. for custom Z function modules or standard BAPIs
such as BAPI_USER_CREATE1), OData activation is not relevant. Instead:
SM59: an RFC destination (or direct application server connection) must be reachable with the configuredashost/mshost,sysnr/group,clientand user.SU01/PFCG: the RFC user needs authorization objectS_RFCfor the function group of every RFC/BAPI it calls, and the usual business authorizations for the underlying transaction (e.g.SU01authorizations forBAPI_USER_*).- Gateway: the RFC gateway (
SMGW) must allow the connection (gw/acl_mode,secinfo/reginfoACLs) if calling from outside the SAP network. - The SAP NW RFC SDK (proprietary, from SAP) and the
pyrfcPython package must be installed on the machine running this module (pip install "pyxecm[sap]"only installspyrfc, not the SDK itself).