← Back to API List

Storage Location Master Data

GET ERP → MES
storage.spaces.get

Synchronizes storage location master data from ERP to MES CMSNL table. Uses composite primary key (warehouse_no + storage_spaces_no).

Basic Information

API Name
storage.spaces.get
Method Name
upCmsnlCROSS
Target Table
CMSNL
JSON Node
storage_spaces_data
Primary Key
NL001 + NL002 (composite)
Code Location
RegularESB.java:3368

Response Fields

ERP FieldMES FieldDescription
warehouse_noNL001Warehouse number
storage_spaces_noNL002Storage location number
storage_spaces_nameNL003Storage location name
tran_statusTRAN_STATUSTransaction status

Response Example

{
  "storage_spaces_data": [
    {
      "warehouse_no": "WH001",
      "storage_spaces_no": "A01-01",
      "storage_spaces_name": "Zone A Row 1 Level 1",
      "tran_status": "AU"
    }
  ]
}

Special Processing

DELETE then INSERT Mode
This API uses a "delete then insert" mode. During synchronization, all storage locations under the warehouse are deleted first, then new data is inserted.

Database Update SQL

Delete Old Data

-- Delete all storage locations under the warehouse
DELETE CMSNL WHERE NL001 = :warehouse_no

INSERT (Add Storage Location)

INSERT INTO CMSNL (NL001, NL002, NL003)
VALUES (
    :NL001,      -- Warehouse number
    :NL002,      -- Storage location number
    :NL003       -- Storage location name
)