Import parameters

Context of use

The csv integration described below relates to the management of stock statements in MES. It is used to synchronize the stock statement of one deposit from an ERP (or other system) to the MES. The stock statement is a retroactive stock statement ; it is defined for a date-time in the past. Following the integration of the csv file, regulation movements are created in MES, so that the retroactive stock statement be the one imported.

Directory

/data/stock-statements

Files reference

  • filename : header

Other parameters (see importStockStatementToWorkshop in AdminHub)

Context (companyCode and establishmentCode)

The import is set by a context defined by one company code (companyCode) and one establishment code (establishmentCode).

A single deposit has to be set.

DateType

It is the date of the retroactive stock statement. The regulation movements of the stock will be at this date.

It can have different values :

  • Today

  • Yesterday

  • Day before yesterday

  • Customised date ; in this case, the date has to be set (startDate)

Time

It is the time of the retroactive stock statement. The regulation movements of the stock will be at this time (time of inclusion in stocks)

Files content

Data structure

Field Column Data type Required Business rules

Date de stock

stockDate

String (ISO-8601)

X

YYYY-MM-DD

Company code

companyCode

String

X

2 characters max

Establishment code

establishmentCode

String

X

2 characters max

Item code

itemCode

String

X

20 characters max

Deposit code

depositCode

String

X

20 characters max

First quantity

firstQuantity

Double

First stock unit code

firstStockUnitCode

String

X

5 characters max

Second quantity

secondQuantity

Double

Second stock unit code

secondStockUnitCode

String

5 characters max

Batch

batch

String

20 characters max

Example

stockDate;companyCode;establishmentCode;itemCode;depositCode;firstQuantity;firstStockUnitCode;secondQuantity;secondStockUnitCode;batch
2022-01-30;TS;01;MP104001;110;19.945;Kg;;;T118200131
2022-01-30;TS;01;MP104001;110;19.945;Kg;10;P;