Erp reference

From Crapule421/tiger-team · View interactive version

Erp reference is an AI agent skill from the GitHub repository Crapule421/tiger-team. ERP integration knowledge base - mechanisms per ERP (SAP, Oracle EBS/Fusion, Sage X3, Cegid, Dynamics 365), posting logic, master data, reprocessing, reconciliation, cut-over; references per product plus O2C/P2P/R2R and data migration.

How to use this skill

Skill file

ERP Reference (ERP Expert)

Always state the ERP product, version and deployment (on-premise, private cloud, SaaS) the advice applies to; customisations change behaviour. Anything marked "verify against your version" must be checked in the product documentation or system before being written into a deliverable.

References index

Related: integration patterns and formats ${CLAUDE_PLUGIN_ROOT}/skills/integration-reference/SKILL.md.

1. Golden rules of ERP integration

  1. Never write directly into ERP database tables. Use the vendor's supported inbound mechanisms (IDoc/BAPI, open interface + import program, data entities, APIs, import templates). Direct writes bypass validation, posting logic, number ranges, change documents and audit — and void vendor support.
  2. The ERP is the system of record for what it posts (accounting documents, stock, invoices). Other systems hold references, not competing truths.
  3. Master data before transactions: every transaction interface depends on master data being present and valid in the target (customer, vendor, material/item, GL account, cost centre, tax code, payment terms). Define the dependency and what happens when it is missing.
  4. Posting logic is the contract: for every inbound financial or logistic flow, document the resulting documents and accounting entries (debit/credit, accounts, tax, currency, period).
  5. Periods and calendars rule: posting date determines period; closed periods reject postings; interfaces must be part of the closing calendar (cut-off, last run, freeze).
  6. Prefer asynchronous, monitored, reprocessable mechanisms with a business-readable error queue (IDoc status monitor, interface tables with error columns, DMF execution history, AIF, OIC tracking).
  7. Reconcile by design: counts and amounts between source, middleware and ERP; sub-ledger vs general ledger; interface suspense accounts monitored to zero.
  8. Standard before custom: every custom object (Z-program, custom entity, extension) is a run and upgrade cost; record it.

2. Mechanism cheat sheet

| ERP | Inbound (into ERP) | Outbound (from ERP) | Monitoring / reprocessing |

|---|---|---|---|

| SAP ECC / S/4HANA | IDoc (ALE/EDI), BAPI/RFC, OData (Gateway/RAP), SOAP services, file + standard programs, Migration Cockpit for migration | IDoc (output/change pointers), OData, SOAP, RFC, business events (S/4HANA Enterprise Event Enablement to SAP Event Mesh / advanced event mesh), extracts (CDS views) | BD87/WE02/WE05, SM58, SMQ1/SMQ2, SLG1, /IWFND/ERROR_LOG, AIF (if used) |

| Oracle EBS | Open interface tables + concurrent import programs, PL/SQL public APIs, Integrated SOA Gateway, XML Gateway | Concurrent programs/reports, Business Event System, views, XML Gateway | Interface error tables/columns, concurrent request logs, resubmission |

| Oracle Fusion Cloud | REST APIs, SOAP services, FBDI (file-based data import), HDL (HCM), ADFdi spreadsheets | BI Publisher scheduled reports, BICC extracts, HCM Extracts, business events, REST | ESS job status/logs, import error reports, OIC tracking |

| Sage X3 | Import templates (batch/manual), SOAP web services, REST/GraphQL APIs (version-dependent) | Export templates, web services, views | Import logs, batch server tasks |

| Cegid | Product-specific import formats and APIs | Exports/APIs | Product-specific — verify |

| D365 Finance & Operations | Data entities via DMF (packages, recurring integrations), OData, custom services, dual-write | DMF exports, business events, OData, Synapse/Fabric link | DMF execution history, staging errors, batch jobs |

| D365 Business Central | API v2.0 and custom API pages, OData/SOAP web services, configuration packages | APIs, webhooks | Job queue entries, API errors |

| Dataverse | Web API (OData v4), SDK, upsert with alternate keys | Webhooks, plug-ins, Power Automate, Synapse Link | System jobs, plug-in trace logs |

3. Choosing the inbound mechanism

| Need | Prefer | Avoid |

|---|---|---|

| Real-time single document with immediate answer (e.g. create sales order from web shop) | Synchronous API (OData, BAPI via middleware, REST) with idempotency key | Batch files if the user waits |

| High-volume asynchronous documents (invoices, journal lines) | Asynchronous standard mechanism (IDoc, open interface + import, DMF package, FBDI) | Thousands of synchronous calls hitting throttling and locks |

| Accounting journal from sub-system (payroll, treasury, billing engine) | Standard journal interface (IDoc ACC_DOCUMENT / BAPI_ACC_DOCUMENT_POST, GL_INTERFACE, FBDI journals, general journal entity) summarised per period/account/dimension | Line-level replication of every source transaction unless audit requires it |

| Master data replication | Standard master data messages/entities (e.g. SAP DEBMAS/CREMAS/MATMAS or BP services; supplier/customer APIs) with MDM governance | Bidirectional free-for-all updates |

| Migration (one-off, large) | Vendor migration tools (SAP Migration Cockpit, FBDI/HDL, DMF, import templates) | Reusing run interfaces without performance tests |

4. Posting logic checklist (inbound financial/logistic flows)

5. Error handling in ERP interfaces

| Error type | Example | Expected handling |

|---|---|---|

| Technical (transport, format) | Unreadable file, IDoc syntax error, schema violation | Middleware/ERP technical error queue, IT support, no partial posting |

| Master data missing | Unknown vendor, material not extended to plant | Business error queue; reprocess after master data creation; ageing alert |

| Business rule | Closed period, blocked customer, credit limit, tolerance exceeded, duplicate invoice check | Business owner corrects source or ERP data, then reprocess from the ERP monitor |

| Locking / concurrency | Document or master data locked by a user or another job | Automatic retry with delay (bounded); schedule around heavy batch jobs |

| Partial success | Some lines posted, others rejected | Defined policy: all-or-nothing per document; never split a balanced accounting document |

Requirements: errors visible to business users in their language; reprocessing in the ERP tool (not by resending from source, unless designed); no deletion of failed records without trace; daily error backlog review; ageing KPI.

6. Reconciliation (minimum controls)

| Control | Compares | Frequency |

|---|---|---|

| Technical completeness | Records/files sent by source = received by middleware = created in ERP (incl. rejected) | Each run |

| Financial completeness | Sum of amounts per company/currency/period: source vs ERP postings | Daily and at close |

| Sub-ledger vs GL | AR/AP/asset/inventory sub-ledgers vs GL reconciliation accounts | Monthly (daily for critical) |

| Suspense accounts | Interface clearing accounts balance = 0 (or explained) | Daily/at close |

| Bank | Bank statement (camt.053/CFONB 120/MT940) vs book entries | Daily |

| Master data | Key counts and attribute checksums between MDM/source and ERP | Weekly/after loads |

Each control: owner, tolerance, evidence retained, escalation.

7. Cut-over essentials for interfaces

See references/processes.md §7-8 for the full migration and cut-over method.

8. ERP interface review checklist

Business

Technical

Lifecycle

9. Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.