Import Data to Demand Planning

Importing forecast and history in demand plan should not be done directly into the Demand Planning tables, because our internal structure is quite complicated, and it is important to keep data consistent with each other. So therefore we have made a LU dedicated to do this task, it is called FORECAST_DAY_IMPORT.

The import processes is as follows:

Data which can be imported

Limitations

Fields in FORECAST_DAY_IMPORT

Below are the fields you can import data to in the FORECAST_DAY_IMPORT LU

FIELD NAME DESCRIPTION
FLOW_ID Contains the FLOW_ID for the flow you want to import to, note only base flows can be used. Mandatory Field.
PART_NO Contains the PART_NO for the part you want to import. Must match part no found in PART CATALOG. Mandatory Field.
START_DATE The first date of the period. Mandatory Field.
END_DATE The last date of the period. Mandatory Field.
FORECAST The forecast (in inventory units), if it not null then the start date and end date has to be in the current forecast range. If forecast should not be imported then set it to NULL.
HISTORICAL_DEMAND The historical demand (in inventory units), allowed range for the start and end date is the entire range from the first history period (that is the maximum historical length is 36 and we have 12 period per year then it is possible to import data 3 years back in time from the current period) and to the present period. If historical demand should not be imported then it should be set to NULL.
ADJUSTED_DEMAND The adjusted demand (in inventory units), allowed range for the start and end date is the entire range from the first history period (that is the maximum historical length is 36 and we have 12 period per year then it is possible to import data 3 years back in time from the current period) and to the present period. If historical demand should not be imported then it should be set to NULL.
EVENT The Event (in inventory units), allowed ranges for the start and end date is the entire range from the first history period to the last forecast period. If event should not be imported it should be set to NULL.
BUDGET The budget (in inventory units) to be imported. Allowed ranges for the start and end date is the entire range from the first history period to the last forecast period. If budget should not be imported it should be set to NULL.
TARGET_SALES_PLAN The target sales plan(in inventory units) to be imported. Allowed ranges for the start and end date is the entire range from the first history period to the last forecast period. If target sales plan should not be imported it should be set to NULL.
PERIOD_PRICE The period price is imported. Allowed ranges for the start of history to the last forecast period. If Period Price should not be imported it should be set to NULL.
STATUS Translated status do not import to this field. New or Null records will be imported, Error and Warning indicates that there was a problem when importing this records and these will not be imported again.
STATUS_DB Untranslated Status field, do not import to this field
MESSAGE Message about why this record is not imported or warning message

As an alternative you can import directly to the FORECAST_DAY_IMPORT_TAB, this table have the same fields apart from the STATUS_DB does not exist in the table and they have the same meaning.

Note:

Its not possible to import forecast in weeks and budget in months in one go, in this case you either need to import the forecast in the first import job and then import the budget in the next. Or you need to split the budget in weeks and import it together with the forecast.

When importing forecast parts you can only import the flow id and the part number not any of the many parameters that exist on forecast part. If you want to do that you need to copy forecast part directly to the FORECAST_PART_TAB but then you need to run a Refresh DP data after the External Import job as well.

Usage with Data Migration

There is a number of ways to fill FORECAST_DAY_IMPORT with data. One of them is to use IFS Data Migration, this tool can in turn be used in a number of different ways we only show two examples here.

Importing data from file to Demand Plan Server using Data Migration

We start with a text file, containing the data we want to import

3;1003-DM;0;23.06.2013;26.06.2013;800;;;400;

0;1001-DM;0;01.01.2013;30.04.2013;20000;;;;

0;1001-DM;0;01.02.2013;05.05.2013;20000;;;;

0;1001-DM;0;01.05.2014;01.05.2014;300;;;;

0;1001-DM;0;30.04.2014;01.05.2014;300;;;;

0;1002-DM;0;01.02.2014;15.02.2014;30000;;;;

0;1002-DM;0;31.01.2014;15.02.2014;30000;;;;

0;1002-DM;0;30.07.2013;31.07.2013;30000;;;;

0;1002-DM;0;31.07.2013;01.08.2013;200;;;;

Go to “Application Base Setup\Data Migration\Migration Job”. Create a new entry with: 

Job ID Some name like IMPORT_FORECAST
Procedure name INSERT_OR_UPDATE
View Name FORECAST_DAY_IMPORT
File Path Path
File File name
File Location: On Client
Date Format DD.MM.YYYY
Column Separator <semicolon>
Decimal Point <point>

 Then save and change File mapping to that is matches the file in this case:

1 FLOW_ID
2 PART_NO
3 FORECAST_ID
4 START_DATE
5 END_DATE
6 FORECAST
7 BUDGET
8 TARGET_SALES_PLAN
9 EVENT
10 HISTORICAL_DEMAND

Then:

  1. Save It
  2.  Move to Application Base Setup\Data Migration\Execute Job
  3.  Find the job we are working on (IMPORT_FORECAST)
  4.  On the Detail tab click and select Load File
  5.  Save
  6.  Click “Start Online”

 And we are done data is imported into FORECAST_DAY_IMPORT_TAB. The only thing left to do is start the External Import job from the menu on the Demand Plan Server GUI.

Running Data Migration from inside the Demand Plan Server

Start by doing the same procedure as above. Only now data migration is run as a background job so the files have to be on the oracle server. So therefore change “File location” to “On Server”. Change “File Path” to the correct location on the server. Tip you can use F8 to get a list of the available directories.

Then:

  1. Go to Supply Chain Planning\Demand Plan\Basic Data\Demand Plan Server Setup\Scheduling\
  2. Select External Import Job
  3. Schedule it.
  4. In External Command enter:

declare

info_ varchar2(2000);

begin

  &APP_OWNER..intface_header_api.start_job(info_, 'ONLINE', 'IMPORT_FORECAST');

end;

This started the migration job from the Demand Plan Server. The last parameter is the name of the migration job. The second has to be ‘ONLINE’ in order for the migration job to done by the time the demand plan server starts to read from FORECAST_DAY_IMPORT.