Master data synchronization is the foundation of the intercompany process. Before any transactional document is created or updated, Hechizo SAP Intercompany ensures that all reference data — manufacturers, item groups, business partner groups, payment terms, items, discount groups, salespeople, and employees — is consistent across the entire company landscape. Most entities flow in a single direction: from the Hechizo hub database outward to all nine branch companies. Items are the notable exception: each branch can act as an origin, broadcasting new and updated article definitions to every other company in the network using the branch’s key string. Business partners follow the same peer-to-peer model, with every ordered company pair (9 × 8 = 72 combinations) covered in both the create and update passes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/FCS-Consultores/hechizo-SAP-intercompany/llms.txt
Use this file to discover all available pages before exploring further.
Master data synchronization runs at the very start of each execution cycle, before any purchase requests, orders, invoices, credit notes, or payments are processed. This guarantees that every item code, business partner group, and payment term referenced by a subsequent document already exists in the destination company.
Company keys
Each of the nine branch databases is identified throughout the codebase by a short key string. These keys are passed as thebdDestino or bdOrigen arguments to every sync method.
| Key | Conexion constant |
|---|---|
hogar | Conexion.BD_hogar |
sur | Conexion.BD_sur |
omdo | Conexion.BD_omdo |
nedn | Conexion.BD_nedn |
flores | Conexion.BD_flores |
vital | Conexion.BD_vital |
emde | Conexion.BD_emde |
central | Conexion.BD_central |
desampa | Conexion.BD_desampa |
bdDestino for master data — it is always the authoritative source.
Entity reference
Fabricante — Manufacturers
Fabricante — Manufacturers
Method signatureWhat it doesQueries the Called once per branch — nine calls total, all reading from Hechizo as the source.
OMRC table in Hechizo via HANA and compares manufacturer names against the same table in bdDestino. Any FirmName present in Hechizo but absent in the branch is posted to the branch’s Service Layer endpoint as a new manufacturer record.How it is calledGrupoArt — Item Groups
GrupoArt — Item Groups
Method signatureWhat it doesCompares item group names (
ItmsGrpNam) from Hechizo’s OITB table against the destination branch. Missing groups are created in the branch via a Service Layer POST to the ItemGroups endpoint.How it is calledGrupoSN — Business Partner Groups
GrupoSN — Business Partner Groups
Method signatureWhat it doesReads business partner groups (
OCRG) from Hechizo — including both the GroupName and GroupType fields — and creates any missing groups in the destination branch. Both customer and vendor group types are handled.How it is calledcondicionespago — Payment Terms
condicionespago — Payment Terms
Method signatureWhat it doesReads payment term definitions from Hechizo’s
OCTG table (PymntGroup, PayDuMonth, ExtraDays) and creates any that are missing in the branch. This ensures that when invoices or orders reference a payment group code, that code exists in the branch before the document arrives.How it is calledItems (Articles) — CreararticuloTODASV2 / ActualizararticuloTODASV2
Items (Articles) — CreararticuloTODASV2 / ActualizararticuloTODASV2
Method signaturesWhat it doesUnlike the other master data entities, items use a peer-to-peer model rather than a hub-and-spoke model. Each branch is passed as
bdDestino, which serves as the origin for that particular call — the method reads newly created or modified items from that branch’s database and propagates them to all other companies in the network.CreararticuloTODASV2 creates items that do not yet exist in each peer company. ActualizararticuloTODASV2 patches existing items with updated field values.How it is calledSocios de Negocios — Business Partners
Socios de Negocios — Business Partners
Method signaturesWhat it doesBusiness partners are synchronized across all company pairs in a full peer-to-peer mesh.
CrearSOCIOTODAS reads new business partners from bdOrigen and creates them in bdDestino. ActualizaSOCIOTODAS updates existing records. Because no single company is the authority for business partners, every ordered pair is covered: 9 × 8 = 72 calls for create and 72 calls for update, for a total of 144 calls in this section alone.How it is called (excerpt)Grupos de Descuento — Discount Groups
Grupos de Descuento — Discount Groups
Method signatureWhat it doesReplicates discount group definitions from Hechizo to each branch company. Discount groups must exist in a branch before business partners or items referencing them can be synchronized correctly. Only creation is performed in the active code path; the
ActualizarGrupoDescuentoV2 variant is present in the source but is commented out in the current production flow.How it is calledVendedores — Salespeople
Vendedores — Salespeople
Method signaturesWhat it doesCreates and updates salesperson records across all nine branches. The source of truth is the Hechizo hub.
Crearvendedores adds any salesperson codes not yet present in the branch; Actualizarvendedores patches existing entries to keep names and related data current.How it is calledEmpleados — Employees
Empleados — Employees
Method signaturesWhat it doesReplicates employee records from Hechizo to all branch companies. Employee IDs are used in purchase request headers (the
Requester field maps to OHEM.empID) so employees must exist in every database before purchase request sync runs. CrearEmpleados inserts missing records; ActualizarEmpleados patches changed fields.How it is calledExecution order summary
Hub → Branch (1:9)
Fabricante, GrupoArt, GrupoSN, condicionespago, CrearGrupoDescuento, Crearvendedores, Actualizarvendedores, CrearEmpleados, ActualizarEmpleados
Peer-to-Peer (9×8)
CreararticuloTODASV2, ActualizararticuloTODASV2, CrearSOCIOTODAS, ActualizaSOCIOTODAS