Synchronizes storage location master data from ERP to MES CMSNL table. Uses composite primary key (warehouse_no + storage_spaces_no).
| ERP Field | MES Field | Description |
|---|---|---|
warehouse_no | NL001 | Warehouse number |
storage_spaces_no | NL002 | Storage location number |
storage_spaces_name | NL003 | Storage location name |
tran_status | TRAN_STATUS | Transaction status |
{
"storage_spaces_data": [
{
"warehouse_no": "WH001",
"storage_spaces_no": "A01-01",
"storage_spaces_name": "Zone A Row 1 Level 1",
"tran_status": "AU"
}
]
}
-- Delete all storage locations under the warehouse DELETE CMSNL WHERE NL001 = :warehouse_no
INSERT INTO CMSNL (NL001, NL002, NL003)
VALUES (
:NL001, -- Warehouse number
:NL002, -- Storage location number
:NL003 -- Storage location name
)