SAP PLM 2020 ↔ External Systems — Carbon Footprint API Design
Granularity: Raw vs. Aggregated
Expose both, but as distinct endpoints. Analytics consumers (BI tools, partner portals) need product-level aggregates; compliance auditors need traceable material-level decomposition. A single fat response creates coupling you’ll regret when calculation methodologies change.
Recommended resource structure:
GET /v1/products/{productId}/carbon-footprint
→ aggregated PCF (Product Carbon Footprint), methodology version, calculation timestamp
GET /v1/products/{productId}/carbon-footprint/components
→ per-material emission factors, lifecycle phase breakdown (cradle-to-gate, gate-to-grave)
GET /v1/products/{productId}/carbon-footprint/audit
→ immutable calculation record, source BOM version, EH&S master data snapshot IDs
In PLM 2020, sustainability metrics surface through the Sustainability Management workset and underlying EH&S substance/specification objects. Your API layer (typically SAP Integration Suite / CPI or a custom Java/Node middleware) pulls from these objects via RFC or OData — verify whether your landscape exposes /sap/opu/odata/sap/ sustainability-specific OData services or requires custom ABAP extraction (verify in your version).
API Versioning for Evolving Methodologies
URI versioning (/v1/, /v2/) is insufficient alone when the semantics of a carbon value change (e.g., switching from GWP100-AR5 to AR6 factors). Embed methodology metadata in every response payload:
{
"productId": "MAT-00421",
"pcf_kgCO2e": 14.72,
"methodology": {
"standard": "ISO 14067",
"gwp_basis": "IPCC AR6",
"version_id": "METH-2024-03",
"effective_date": "2024-03-01"
},
"calculation_run_id": "CR-20240615-0891"
}
Consumers must store version_id alongside consumed values — not just the number. When methodology changes, increment version_id, keep prior endpoint versions alive for a defined deprecation window (minimum one reporting cycle), and emit a Sunset HTTP header.
Audit Trail and Immutability
This is the highest-risk area. External consumption of a mutable record is a compliance gap. Implement these controls:
- Freeze on publish: When a PCF record is exposed externally, write an immutable snapshot to a separate audit store (database table or document store). Never serve live calculation results directly to compliance endpoints.
calculation_run_id must be a durable, externally resolvable key — partner portals should be able to call GET /v1/audit/runs/{runId} and retrieve the exact inputs used.
- Log every API call against compliance endpoints (transaction SM58 / application log on the SAP side, API gateway access logs on the middleware side) with consumer identity, timestamp, and payload hash.
- If using SAP Integration Suite, activate message processing log persistence and set retention to exceed your regulatory obligation period.
Version Compatibility
PLM 2020 OData service availability and EH&S integration depth differs from S/4HANA-embedded PLM — verify which sustainability OData services are activated in SOAMANAGER and whether BAdI SUSM_* extension points are available for your specific support package level before committing to extraction patterns.
This draft is based on general SAP PLM knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.