Usage > Trade connectors > APS Forecast > APS Forecast > APS Forecast setup 

This function is used to set up the interface with the product dedicated to the Supply Chain Management:  AZAP.
This setup is used to manage, through data files in the .csv format, the flows coming from and designed for AZAP.

This flows, concerning the Inventory module, are the following:

Flow X3 to AZAP :

  • Products/Products
  • Conversion of product units
  • Product criteria
  • Customer/Sites
  • Site criteria/customers
  • Sales history
  • Orders WIPs

Flow AZAP to X3 :

  • Sales forecasts

 
SEEREFERTTO Once the setup is done, the processing can be launched using the following function: AZAP interface launch

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Entry screen

Presentation

The setup consists in indicating:

  • The default work directory where the files to import must be searched and the files to export must be generated.
  • The default storage directory of the processed files.
  • The references of the export and import pivots describing the .csv files to process, specifying, if necessary:
     
    - a selection of the export of products, for the orders WIPs and for the sales history,
    - the number of packing units for which the conversion information with the stock unit are exported,
    - the selection of products and sites criteria to exports,
    - the aggregation level of sales data,
    - the choice to delete the former previsions or all the sales previsions when importing sales forecasts.

Close

 

Fields

The following fields are present on this tab :

Block number 1

  • Identifier (field ID)

Identification code of the interface setup.

  • field INTIT

 

Block number 2

  • Destination type (field TYPEXP)

 

  • Work directory (field VOLFILWRK)

 

  • Storage directory (field VOLFILSTO)

 

Exports

Enter the pivot code describing the file lines of the Products to export: produits.csv.
By default this is the SCMAITM pivot.
It is possible to filter the products to export by entering a selection reference in the Products selection.

This field is used to specify a products selection reference, which will be suggested, by default, when launching the interface processing.

SEEINFO Only the products of "Sold" type (information contained in the product category) are exported.

Enter the pivot code describing the file lines of the Products/Conversions to export: conversion.csv.
By default this is the SCMAITMTCO pivot.

  • field FIL0400

 

  • Packing units (field FIL04)

The first line of the Products/Conversions file systematically contains, for each product, the conversion information between the sales and stock units.
From 1 to 4 optional lines can be added by activating the corresponding checkboxes, in order to export the conversion information on the conversions between the 4 packing units and the stock unit.

  • 1 (field PCU0FLG)

 

  • 2 (field PCU1FLG)

 

  • 3 (field PCU2FLG)

 

  • 4 (field PCU3FLG)

 

Enter the pivot code describing the file lines of the Products/Criteria to export: critstr.csv.
By default this is the SCMAITMCRI pivot.

  • Code type (field ITMCRITYP)

For each criterion, it is possible to include either the code, or the title, or both at the same time in the file.

  • field FIL0700

 

  • Product statistical groups (field FIL07)

Statistical group criteria 1 to 5 are only exported if the corresponding checkboxes are activated.
When a criterion is not exported, the corresponding column is not present in the file.

  • 1 (field TSICOD0FLG)

 

  • 2 (field TSICOD1FLG)

 

  • 3 (field TSICOD2FLG)

 

  • 4 (field TSICOD3FLG)

 

  • 5 (field TSICOD4FLG)

 

  • field FIL0800

 

  • Category (field TCLCODFLG)

This criterion is exported only if the corresponding checkbox is activated.
When a criterion is not exported, the corresponding column is not present in the file.

  • Product line (field CFGLINFLG)

 

  • User (field PLANNERFLG)

 

Renseignez le code du pivot décrivant les lignes du fichier des Sitesà exporter : sites.csv.
Par défaut, il s'agit du pivot : SCMAFCY.
SEEINFO Dans AZAP, les sites sont des clients ou des dépôts, le fichier des sites contiendra donc des informations sur les sites de stockage et sur les clients.

Renseignez le code du pivot décrivant les lignes du fichier des Sites/Critèresà exporter : critstrsite.csv.
Par défaut, il s'agit du pivot : SCMACRIFCY.
SEEINFO Dans AZAP, les sites sont des clients ou des dépôts, le fichier des sites/Critères contiendra donc des informations sur les sites de stockage et sur les clients.

  • Code type (field FCYCRITYP)

For each criterion, it is possible to include either the code, or the title, or both at the same time in the file.

  • field FIL1200

 

  • Country (field CRYFLG)

This criterion is exported only if the corresponding checkbox is activated.
When a criterion is not exported, the corresponding column is not present in the file.

  • Category (field BCGCODFLG)

 

  • field FIL1300

 

  • Customer statistical groups (field FIL13)

 

  • 1 (field TSCCOD0FLG)

Statistical group criteria 1 to 5 are only exported if the corresponding checkboxes are activated.
When a criterion is not exported, the corresponding column is not present in the file.

  • 2 (field TSCCOD1FLG)

 

  • 3 (field TSCCOD2FLG)

 

  • 4 (field TSCCOD3FLG)

 

  • 5 (field TSCCOD4FLG)

 

  • field FIL1400

 

  • Bill-to customer (field BPCINVFLG)

This criterion is exported only if the corresponding checkbox is activated.
When a criterion is not exported, the corresponding column is not present in the file.

  • Group customer (field BPCGRUFLG)

 

Sales exports

  • Aggregation level (field SOHGRU)

Radio button used to specify the level of aggregation. The level of aggregation defines the data grouping on the sales history and the sales orders in progress.
When Week or Month is selected, the date of the start date of the week or month is exported.

This field is used to indicate the reference of a selection on order that will be applied on the sales orders in progress and the sales history if this history is issued from closed orders.
It is a default selection, which can be modified when launching the interface.

Enter the pivot code describing the file lines of the Sales historyto export: ventes.csv.
By default this is the pivot: SCMAHSOH
The sales history can either rely on:
- the paid orders for which a quantity has been delivered or invoiced, that is possible to filter entering a selection reference in the Orders selection field,
- or the deliveries and invoices that can be filtered, by entering a selection reference in the Deliv/Invoice selection field.

  • Deliveries/invoices (field HISSDHFLG)

This box is checked to indicate that the sales history comes from deliveries and invoices, that can be selected by entering a selection code in the following field.
This history relies on the actual or actual flows:
+ the validated deliveries
+ the direct invoices with stock movement
+ the validated "order" invoices with stock movement
+ the validated "delivery" invoice lines with stock movement without delivery number
- the delivery returns
- the validated direct credit memos with stock movement
- the validated credit memos on invoice with stock movement

SEEINFO An unpaid order can already have an ordered quantity; this quantity is taken into account in the history. The quantity remaining to be delivered is taken into account in the order WIP.

This field can only be accessed if the sales history comes from the deliveries and invoices.
This field is used to specify the reference of a delivery and invoice selection formula, which will be suggested, by default, when launching the interface processing.

  • field FIL0501

 

  • field FIL0502

 

  • Closed orders (field HISSOHFLG)

This box is checked to indicate that the sales history comes from the paid orders for which a quantity has been delivered or invoiced.
When a selection reference is entered in the Order selectionfield, this selection is also applied to the sales history.

Enter the pivot code describing the file lines of the Sales orders in progressto export: carnet.csv.
By default, this is the pivot: SCMASOH
It is possible to filter the open orders to export by entering a selection reference in the field Orders selection.
SEEINFOIn case the sales history comes from deliveries and invoices, an open order can have a quantity already delivered which will be taken into account in the history. The quantity taken into account in the WIP corresponds to the quantity remaining to be delivered.

Imports

Enter the pivot code describing the file lines of the Sales forecaststo import: previsions.csv.
By default, this is the pivot: SCMAHOS

  • Deletion of forecasts by product (field SOSDLTFLG)

This checkbox is used to indicate that the former forecasts of each product of the imported file will be deleted before importing the new ones.
It can be checked at the same time as the RTZ of forecasts box.

  • Forecast rtz (field SOSRAZFLG)

This checkbox is used to specify that all the forecasts will be deleted before processing the file.
It can be checked at the same time as the Deletion of forecasts by product box.

Close

 

Principles of functioning

The processing by the interface is carried out using .csv files.

General information on the files

  • Format: .csv
  • Type: ASCII (can be modified by entry point, see below)
  • The fields have a variable length and are separated by ";"  (this can be modified by entry point, see below)
  • For numbers, the decimal mark is the point.
  • For dates, the format is "YYYYMMDDHHmm" or "YYYYMMDD"
  • Durations are expressed in hours
  • Booleans can take either the value 0 (false) or 1 (true)
  • The files are DOS files (end of line characters: \013\010 or \r\n).
  • Files have headers.

The description of the lines of each file is given by a Pivot which specifies the order of the fields, their size and describes how they are loaded (directly via table fields or via functions).

The file names, their description and the pivots used by default are indicated below.

SEEINFO Non-transmitted information

  • Valuation: they are not managed in this interface. Any information concerning the amounts, the currencies (on the products as well as on the sales) will be transmitted in standard, via this interface.
  • The exceptional events, i.e. the non-systematic phenomena that interfere with sales (example: promotions).

Export flow: X3 --- AZAP

 Expected files

 

Pivots

 produits.csv

 Products/Products

 SCMAITM

 conversion.csv

 Products / Conversions

 SCMAITMTCO

 critstr.csv

 Products / Criteria

 SCMAITMCRI

 sites.csv

 Sites

 SCMAFCY

 critstrsite.csv

 Sites / Criteria

 SCMACRIFCY

 ventes.csv

 Sales history

 SCMAHSOH

 carnet.csv

 Order WIPs / Order book

 SCMASOH

Import flows: AZAP --- X3

 Expected files

 

Pivots

 previsions.csv

Sales forecasts

 SCMASOS

Entry points

The PIVOTSFILE entry point of the CONNECTFCT processing can be used to modify the coding type of the files and the column separator.

Description of the files exported from Sage X3

Products: products.csv

Pivot: SCMAITM

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

 Product Host Code

 A

 20

 No

 

 ITMMASTER

 ITMREF

 Product

 No

 

 2

 Title
Product

 A

 30

 Yes

 

 ITMMASTER

 ITMDES1

 Description 1

 No

 

 3

 Product title 2

 A

 30

 Yes

 

 ITMMASTER

 ITMDES2

 Description 2

 No

 

 4

 Sales unit

 A

 3

 Yes

 

 ITMMASTER

 SAU

 Sales unit

 No

Notes :

  • The file header is made up with the codes of the columns set up on the pivot.
  • Only the products of "Sold" type (information contained in the product category) are exported.
  • The setup authorizes the entry of a product selection: for the selected products, conversion information as well as criteria are exported in separate files: conversion.csv and critstr.csv.

Products / Conversions: conversion.csv

Pivot: SCMAITMTCO

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

 Product Host Code

 A

 20

 No

 

 ITMMASTER

 ITMREF

 Product

 No

 

 2

 Unit 1

 A

 3

 No

 

 ITMMASTER

 WUOM1

 

 No

 

 3

 Unit 2

 A

 3

 No

 

 ITMMASTER

 WUOM2

 

 No

 4

 Coefficient

 N

 

No 

 

 ITMMASTER

 WCOEUOM

 

 No

Notes :

  • The file header is made up with the codes of the columns set up on the pivot.
  • For each product, the file contains: 
     
    - a first line with the conversion information between the sales unit and the stock unit. This line is always displayed even though the sales and stock units are the same. 
     
    - Optional lines on the conversions between the 4 packing units and the stock unit, according to the setup carried out.

Products / Criteria: critstr.csv

Pivot: SCMAITMCRI

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

 Product Host Code

 A

 20

 No

 

 ITMMASTER

 ITMREF

 Product

 No

 

 2

 AZAP status (1)

 A

 

 No

 

 ITMMASTER

 WAZAPSTA

 AZAP status

 No

 

 3

 Product status (2)

 A

 

 No

 

 ITMMASTER

 ITMSTA

 Product status

 No

 

 4

 Statistical group 1

 A

 

 Yes

 

 ITMMASTER

 WTSICOD0

 Statistical group 1

 No

 

 5

 Statistical group 2

 A

 

 Yes

 

 ITMMASTER

 WTSICOD1

 Statistical group 2

 No

 

 6

 Statistical group 3

 A

 

 Yes

 

 ITMMASTER

 WTSICOD2

 Statistical group 3

 No

 

 7

 Statistical group 4

 A

 

 Yes

 

 ITMMASTER

 WTSICOD3

 Statistical group 4

 No

 

 8

 Statistical group 5

 A

 

 Yes

 

 ITMMASTER

 WTSICOD4

 Statistical group 5

 No

 

 9

 Category

 A

 

 Yes

 

 ITMMASTER

 TCLCOD

 Category

 No

 

 10

 Product line

 A

 

 Yes

 

 ITMMASTER

 CFGLIN

 Product line

 No

 11

 User

 A

 

Yes 

 

 ITMMASTER

 PLANNER

 Planner

 No


(1) The value of the AZAP status is set to 1 for the products with an active status, otherwise, it is set to 0.
(2) The Products statuses are defined in the 246 local menu.

Notes :

  • The file header is made up with the titles of the columns set up on the pivot. The titles cannot have more than 15 characters.
  • According to the setup carried out, it is possible, for each criterion, to have the code or the title only, or both: code and title.
  • The criteria 4 to 11 can be exported or not, according to the setup carried out. When not exported, the columns are not displayed in the file.

Sites: sites.csv

Pivot: SCMAFCY

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

 Site Host Code
Client or Site for X3

 A

 15

 No

 

 FACILITY

 FCY

 Site

 No

 

 2

 Long title

 A

 35

 Yes

 

 FACILITY

 FCYNAM

 Name

 No

 

 3

 Short title

 A

 10

 Yes

 

 FACILITY

 FCYSHO

 Short title

 No

Notes :

  • The file header is made up with the codes of the columns set up on the pivot.
  • For AZAP, the sites are clients or warehouses. All the clients and storage sites are then exported via this file. The difference will be made in AZAP.
  • The sites criteria will be exported in a separated file: critstrsite.csv

Sites / Criteria: critstrsite.csv

Pivot: SCMACRIFCY

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

Site Host Code
Client or Site for X3

 A

 15

 No

 

 FACILITY

 FCY

 Site

 No

 

 2

 Country

 A

 

 No

 

 BPARTNER

 CRY

 Country

 No

 

 3

 Category)

 A

 

 Yes

 

 BPCUSTOMER

 BCGCOD

Category

 No

 

 4

 Statistical group 1

 A

 

 Yes

 

 BPCUSTOMER

 WTSCCOD0

Statistical group 1

 No

 

 5

 Statistical group 2

 A

 

 Yes

 

 BPCUSTOMER

 WTSCCOD1

Statistical group 2

 No

 

 6

 Statistical group 3

 A

 

 Yes

 

 BPCUSTOMER

 WTSCCOD2

Statistical group 3

 No

 

 7

 Statistical group 4

 A

 

 Yes

 

 BPCUSTOMER

 WTSCCOD3

Statistical group 4

 No

 

 8

 Statistical group 5

 A

 

 Yes

 

 BPCUSTOMER

 WTSCCOD4

Statistical group 5

 No

 

 9

 Bill-to customer

 A

 

 Yes

 

 BPCUSTOMER

 BPCINV

Invoice customer

 No

 

 10

Group customer

 A

 

 Yes

 

 BPCUSTOMER

 BPCGRU

Group customer

 No

Notes :

  • The file header is made up with the titles of the columns set up on the pivot. These titles cannot have more than 15 characters. 
  • For AZAP, the sites are clients or warehouses. All the clients and storage sites are then exported via this file. The difference will be made in AZAP.
  • According to the setup carried out, it is possible, for each criterion, to have the code or the title only, or both: code and title.
  • The criteria 2 to 10 can be exported or not, according to the setup carried out. When not exported, the columns are not displayed in the file.

Sales history: ventes.csv

Pivot: SCMAHSOH

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

Delivery date requested
or delivery date
or period (1)

 D

 

 No

 

 SORDERQ

 DEMDLVDAT

 Requested delivery date

 No

 

 2

Sales Site Host Code
Order giver for X3

 A

 

 No

 

 SORDERQ

 BPCORD

 Sold-to customer

 No

 

 3

Product Host Code

 A

 

 No

 

 SORDERQ

 ITMREF

Product

 No

 

 4

Quantity in SAU (2)

 N

 

 No

 

 SORDERQ

 QTY

Ordered Qty

 No

 

 5

Original Site Host Code
Shipping site for X3

 A

 

 No

 

 SORDERQ

 STOFCY

Shipping site

 No

 
(1) According to the aggregation level selected, the effective date or the start date of the period (week or month) is taken into account for the data grouping.
(2) the quantity must be expressed in SAU: sales unit.

Notes :

  • The file header is made up with the codes of the columns set up on the pivot. 
  • If the history comes from paid orders, the export concerns the paid order lines which quantity has been delivered or invoiced. The setup authorizes the entry of a selection of orders.
  • If the history is coming from deliveries/invoices, the export concerns the actual flows:
    + validated deliveries
    + validated direct invoices with stock movement
    + validated "order" invoices with stock movement
    + validated "delivery" invoice lines with stock movement and no delivery number
    - delivery returns
    - validated direct credit memos with stock movement
    - validated credit memos on invoices with stock movement
    The setup authorizes the entry of a selection of deliveries/invoices.

Order WIPs: carnet.csv

Pivot: SCMASOH

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

Planned delivery date (1) (2)

 D

 

 No

 

 SORDERQ

 EXTDLVDAT

 Planned deliv date

 No

 

 2

Sales Site Host Code
Order giver for X3

 A

 

 No

 

 SORDERQ

 BPCORD

 Sold-to customer

 No

 

 3

Product Host Code

 A

 

 No

 

 SORDERQ

 ITMREF

Product

 No

 

 4

Quantity in SAU (3) (4)

 N

 

 No

 

 SORDERQ

 TDLQTY

Qty to deliver

 No

 

 5

Original Site Host Code
Shipping site for X3

 A

 

 No

 

 SORDERQ

 STOFCY

Shipping site

 No

(1) for the open orders, it is the required delivery date: DEMDLVDAT
(2) According to the aggregation level selected, the effective date or the start date of the period (week or month) is taken into account for the data grouping.
(3) the quantity must be expressed in SAU: sales unit.
(4) An unpaid order (from the order book) can already have a delivery quantity (taken into account in the history), so the quantity taken into account in the order book is the quantity remaining to be delivered.

Notes :

  • The file header is made up with the codes of the columns set up on the pivot.  
  • The export concerns the unpaid order lines.
  • The setup authorizes the entry of a selection of orders.

Description of the files imported from Sage X3

Sales forecasts: previsions.csv

Pivot: SCMASOS

File 

No. 

 Title

 Type

Lngth
max

Optional 

Pivot 

Code
table 

Code
field 

Title 

 

Field
not managed

 

 1

Forecast date (1)

 D

 

 No

 

 ORDERS

 ENDDAT

 End date

 No

 

 2

Original Site Host Code
Shipping site for X3

 A

 

 No

 

 ORDERS

 STOFCY

Storage site

 No

 

 3

Product Host Code

 A

 

 No

 

 ORDERS

 ITMREF

Product

 No

 

 4

Quantity in STK (2)

 N

 

 No

 

 ORDERS

 EXTQTY

Planned Qty

 No

(1)  According to the level of aggregation selected in AZAP, it will be the effective date or the period end date.
(2) the quantity must be expressed in STK: stock unit.

Notes :

  • The import concerns the sales forecasts carried out in AZAP.
  • The expected file must have a header.  
  • It is possible to setup the deletion:
    - either of former forecasts of each imported file product, before importing the new ones,
    - or of all the forecasts, before the file processing.

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation