BW Demand Planning Scheduling (DPS)

Tool Leader: Antoine Roy
IT leader of the application: Guillaume Thevenet
Name of project: Dynasys
PMO Project: 6046 S&OP with Dynasys - Core model and pilot
UR: UR335513 DYNASYS Sales Forecast / UR333365 DYNASYS Demand Planning
Reporting Coordinator: GONZALEZ-ROUX, Célia <celia.gonzalez-roux@solvay.com>
| Role Id | Role Title | Explanation | |
|---|---|---|---|
| SILICA | 2016 ((DIP-PP + DP)
| ERP BU : ENTRP00002 | |
| PEROX | beg 2017 (DP) June 2017 (DIP-PP) | ERP BU : PEROX | |
| SODA | June 2017 (DIP-PP) | ERP BU : SDSOA / SDERI | PF1 |
| EP | dec 2017 (DP) | ERP BU : ENTRP00030 | |
| Aroma Performance (PA) | dec 2017 (DP) planned 2018 (DIP-PP) | ERP BU : ENTRP00108 / ENTRP00194 (WP1) + PMEPL / PADIP / PACYT (PF1) | WP1 + PF1 (only mexique business) |
| Fibras | planned dec 2018 (DP) | ||
| Coatis | planned dec 2018 (DP) | ||
| Cytec TS | planned aug 2018 |
Number of users: tbd
Critical period: none
Geographical perimeter: worldwide
InfoArea:

Process chain Display Component:

| Role Id | Role Title | Explanation |
|---|---|---|
| ZR_RCS_CA_M52 | DP - Demand Planning | Role Menu Dynasys Currently (Nov 2016), only 2 queries published in this role
|
| ZBI_RCS_DP_A02 | Demand Planning - Dynasys | Role utilisateur Dynasys Authorization object ZBI_DPS
|
| ZBI_RCS_DP_A03 | Demand Planning - Dynasys Keyuser | Authorization object ZBI_DPS_K
|
See also file maintained by Authorization team : BW Catalog of Roles / link: https://drive.google.com/open?id=10GEfKYqrT1eeTO_uHYAheL1GX7L5y_pvH0KQU64qh5I
List of autorisation objects mandatory for the application.
| Authorization object | Explanation |
|---|---|
GBU (CPFCTR1_2) | ZR_*_CA_P05 |
Reporting Part DataFlow
General presentation
Most DSO / Cubes are used to extract data to the Dynasys tool.
Data are extracted from a source outside BW dynasys (it could be another BW application, ECC table, query etc), loaded into DSO and/or Cubes. Then data are transformed through an APD and loaded into flat files which are loaded into the Dynasys tool.
Useful file to understand dataflow from APD to source, and check filters applied all along the dataflow:
File generated by APD specification :
All amounts transfered to DynaSys are in Euro (EUR).
Many discussions have been led concerning the exchange rate to use. Finally the exchange rate has been set to CAR4 (active since 2018/07/26)
CAR4 exists only on BW side, It handle begin of month rates.
it is created from exchange rate CAR3 via program Z_CREATE_EXCHANGE_RATES_CAR4. The creating is handle via a scheduled process chain (name to find)
CTK_DYN02 to CTK_DYN05 seems not be used...to check when it is used !!!
File | Where is the conversion done? | Conversion routine | Exchange rate | Time reference | Comments |
DYS_BW_PNL.csv | Query BW_QRY_MVCOPA01_0017 | CTK_DYN07 | CAR4 | 0CALMONTH | |
DYS_BW_IH.csv | Query BW_QRY_MVSDSO44_0005 | CTK_DYN07 | CAR4 | 0BILL_DATE | |
DYS_BW_DH_DELDAT.csv DYS_BW_DH_GI.csv DYS_BW_FD_DELDAT.csv DYS_BW_FD_GI.csv | Transformation DSO_SD02 => IB_DYN_02 Transformation DPSDSO05 => IB_DYN_02 | CTK_DYN01 | will be CAR4 | 0DSDEL_DATE | |
| DSO DBDYN08 (seems not used in any file based on the DSO) | Transformation C_MATPNT2 => IP_DYN_06 | CTK_DYN01 |
TIP : To check exchange rate on SAP side, use transaction ZRATE (available on WP1 & PF1)

Only conversion in two steps are managed in Dynasys (UOM then T006; conversion in Three or more steps are not managed in Dynasys and should be updated by the business)
The different step of the routine are the following:
Creation of internal table between T006and T006D (T006D provide the fields MSSIE, base unit of a dimension DIMID)
Creation of internal table for DSO UOMCMAT2, filled with both conversion from UOM to UNIT and UNIT to UOM and joined with T006 to get Dimension DIMID
Quantity needs to be converted to KG.
The routine check:
If no conversion exists, Unit remains empty and will be manage as an error (see below)
The flow uses Error DTP. When Unit can't be converted, the routine raise an exception "cx_rsrout_skip_val". The error is loaded in the error queue with text from the message class ZDYN_CONV_ERROR
Not all error will be fixed. Most of these error are linked with BU outside of Dynasys perimeter.
Functional specification are available in the following spreadsheet:
In the following tabs:

The ZWPPTDYS is loaded on ECC side through the transaction ZWPPTMRPOUT (which load the ZWPPMRPOUT program)
This transaction use the program RMDMRPEXTRACT01 which create a list of material to extract.
Then, for each material, the program RMDMRPEXTRACT01 run through the exit ZCL_PP_IM_MD_SR_LIST_EXTRACT.
This exit reads the database for each material and loads in memory several table among which is table IT_MDPSX.
Then, through specific code, the table ZWPPTDYS is loaded from IT_MDPSX using method IF_EX_MD_SR_LIST_EXTRACT~EXTRACT_SR_LIST_INFOS
This table is loaded from WP1 into WBP in the DPDYN02 DSO (Propagation) and then in the DBDYN14 (Propagation).
This table is loaded from PF1 into WBP in the DPDYN05 DSO (Propagation) and then in the DBDYN14 (Propagation).
All rules are available in following transformations :
ODSO DPDYN02 -> ODSO DBDYN14
ODSO DPDYN05 -> ODSO DBDYN14
See short description of this rules below
Load each required table into hashed table.
Depending on value of field c_delkz:
Remarks:

Example :
If the PARNET_PLANT_ID is 8254, normally COMPL_ID linked to this plant is 61281 (by reading master data C_PLANT).

But for this flow, we previously read master data C_CUSTASS to see if this plant is a specific case :
Current values in C_CUSTASS (Update 09/03/2018 manually)

Previous values to 09/03/2018

And if it's the case, we apply the transcodification => in the example, NDC-66852 replace NDC-61281.
For the moment this master data C_CUSTASS is maintained manually.
Fields are assigned for expert routine (source to result)
System extension is added to field (Material, Plant, Partner plant ID etc) and remove unneeded 0 using function conversion_exit_alpha_output. These new value are stored in dedicated infooject to e used later in Phase 2 of script
A check is done to find any correspondance with content of specific table ZMATPLANT and ZMATVENDOR (see below) :
Two specific table have been created in SM30 to manage following rules


Two customised transaction have been created in SE93:
Once Phase 1 is finished, depending on DELKZ value, several fields are loaded:
All rules are checked one after the other. Once one check is validated, the check stop
Remarks: c_pfctr2 = BU SOURCE and c_recptbu = BU DESTINATION
DSO DBDYN14 is loaded by 4 DSO "Source" :

DSO DPDYN02 & DPDYN05 are loaded in full mode due to modification done on table ZWPPTDYS in ECC systems (adding and deletion lines everyday).
DSO DSO_DLV1 & DPSD001 are loaded in delta mode.
To not to have to delete data everyday DSO DBDYN14 and reload it from the four sources, we'll use a flag on object C_FLGZWDY (Flag ZWPPTDYS data) wich is equal to 'X' for all data coming from DSO DPDYN02 & DPDYN05.
Program ZBW_DYN001 with variant ZBW_DBDYN14 will be launched everyday (in process chain) before DBDYN14 loading in order to delete data with flag ZWPPTDYS data = 'X'.
After that DTP full will run for DPDYN02 & DPDYN05 and DTP delta for DPSD001 & DSO_DLV1.
Plant 7525 is not recognized on Dynasys side, deletion or modification are done on BW side following rules like below :
| File | Action done |
| DYS_BW_AS_DELDAT.csv | Delete the transferts of the source site 7525 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_AS_GI.csv | Delete the transferts of the source site 7525 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_EPO.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_FPO.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_FS_RECEIPT.csv | Delete the transferts of the source site 7525 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_FS_SHIPPING.csv | Delete the transferts of the source site 7525 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_ITI_RECEIPT.csv | Delete the transferts of the source site 7525 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_PO.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_PROD_HIST.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_QM.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
| DYS_BW_SKU_PW.csv | Replace plant 7525 by 7528 for all SILICA material (C_MATPNT2-C_PFCTR2 = ENTRP00002) |
These rules are generally applied in transformation (by routine) before DSO source of each file.
For DIP files below, delete line where "Receiving site" = "source site" :
File | APD | Source |
DYS_BW_AS_DELDAT.csv | APD 43 | DBDYN14 |
DYS_BW_AS_GI.csv | APD 45 | DBDYN14 |
DYS_BW_FS_RECEIPT.csv | APD 33 | DBDYN14 |
DYS_BW_FS_SHIPPING.csv | APD 34 | DBDYN14 |
DYS_BW_ITI_RECEIPT.csv | APD 36 | DBDYN14 |
This rule is applied in transformations before DSO DBDYN14 and each APD :

In Dynasys file exported, fields are generaly with an extension S or R corresponding of source system :
These fields are calculated and created in transformation before to be added in their DSO target.
It's also possible in specific dataflow these fields are directly calculated in APD.
Main fields with extension :

Stream: DPS
![]()
Main filter : C_PFCTR2 (BU) and PLANT
These 2 filter may be extended regularly due to the extension of Dynasys perimeter (RCS in january 2016, Soda in june 2016)
Other filters: C_MGN_ACC, DEL_TYPE, ITEM_CATEG, MATL_TYPE, REASON_REJ, REC_TYPE
Be careful, it's forbidden to have the same filter value twice for a global filter field (Active = Y only one time).
Reload data :
See below all DSO wich are to be reload :
Refer to Paragraph Recurring Procedures for detailed process
=> See Dynasys dataflow document (BW Layer = APD / field =*C_PFCTR2) :

Error stack are used in relation with Unit and Currency conversion.
Most if not all error are linked with BU outside current perimeter of project and won't be fixed.
Each DTP has the following settings:
DTP

Error DTP


Package Size is lower than Maximum Number of Errors per Pack as the number of error won't decrease (example in may 2016: 2567 records from DP_PUSL2 to DPDYN22, 17618 records from DPSD001 to DPDYN21 and 530 from DSO_DLV1 to DPDYN21)
Dynasys is a MSSQL tool, BW WBP is on an AIX server. No ODBC driver exists between BW and MSSQL server in Linux / AIX.
This problem was solved setting an UD connect connection
Main servers:
Important:
Files are created in the following folder in AL11 :
An archive is created everyday with generated file in following folder :
To avoid problem with quotes, routines have been added in APD to encapsulate existing quotes in description fields

Negativ sign have to be at the end of number in file, this is treated directly by routine in APD :

Documentation about Dynasys process and Interface here.
Daily: launched by the RSP_DAILY process chain around 6:00 AM each day.

Weekly: launched on saturday, 9:00 AM

Yearly: launched the 15th of January at 9:00 AM

Flag end of process chain: For both daily and weekly process chain, at the end of APD execution, a command is sent to the Dynasys tool.
Script sftp_put_dynasys_bw.ksh is executed to send files from BW repository to Dynasys server
This one is saved in repository /exploit/TA/programs/script/sftp_put_dynasys_bw.ksh.

List of file copied on the FTP is stored in /exploit/TA/programs/env

For each new file, these lists need to be udpated refer to Paragraph Recurring Procedures for detailed process
After execution, files are archived in following repository : /Exploit/BW/archive/DYNASYS and keeped during one rolling month.
Flat files are daily archived in repository /Exploit/BW/archive/DYNASYS
A filesystem cleanup procedure is managed by Adaio based on the File_Retention_Rules file (File maintained by Adagio team)
Rule in place : clean DynaSys files older than 1 month in all BW systems (WBD, WBQ, WBP).
For any change, email Adagio team
Most DSO & Cubes are loaded in full mode due to the low amount of data and/or calculation rules.
Exception:
NB : Statistics dating March, 2017.
Average duration (March 2017):
Remark : On going evolution will change Daily run to take into account the various dependences of DSO source wich are out of Dynasys perimeter (Deliveries, Sales order, Stock...).
Process will be cut in various process : DI-PP / DP / Master data & Reporting. (See part Planned evolution)
No data below 3 year before beginning of current year are kept. Ex: in Aprl 2016, only data greater than or equal to 01.01.2013 are loaded in Dynasys.
It involves that the volume of data loaded increase during the year, until arrived at its maximum at the end of december.
Reporting
No dedicated documentation on queries
Reporting Specification here.
n/a
Broadcast
n/a
Maintenance
In end routine DPDYN22 => DBDYN31 & DBDYN18 => DBDYN31, only ShipTo with a filled country is loaded in target.

To fix the issue, follow the steps bellow :
Due to loading routine in the propagation level of DPSDSO05 / DSO_SD02 which are loaded in delta mode, this field is not correctly updated
Correction done for 0CUST_SALES (see below), the same dataflow must be done for C_CUSTSAL Master data.
Modification on ZZ fields are not taken by the delta. Only full loading can fix this problem.

A specific extractor has been created based on KNVP table from WP1_400 in order to feed ZZ fields correctly.

This data loading is done everyday with the process chain ZPC_MD_ATTR_RCS.
After that we have to retreat data stored in DSO DPDYN22 to update ZI PArtner only if we have a modification. To do that a new transformation has been created :

A new DTP has been created too, launching it ZI partner is reading into master data 0CUST_SALES and updated in DPDYN22.
This DTP is in daily and weekly Dynasys process chain :
If you have the following DUMP when you execute an APD :

It means the repository where the file generated will be stored is full (/EXPLOIT).
In September 2016, ADAGIO Team added 50GB on WBP server : wbpsapr3.ibm.be.solvay.com
If the issue appears again please contact ADAGIO Team.
The lists are stored in AL11 directory /exploit/TA/programs/env
If a flat file name need to added or removed, send a email to IS-Adagio-SAP-Operations@solvay.com
NB: Adagio does the modification on a separated server which is replicated every hours. You have to wait to see modification.
Example of message :

CAUTION : all delta loading are impacted
Step1) Check the daily DynaSys chain (PC_DPS_DYNASYS_01) is finished via ST13

Step2) Add a new line in Global Filter (C_GLBFILT) for Stream DPS / Rule PLANT
Please indicates in the description the date and user code to track changes

Step3) Delete whole contain of following DSOs:
Reason : part of the loading is via DELTA mode
Step4) Launch the Process Chain PC_DPS_DYNASYS_12 (around 3-4h).
Same procedure than 'Adding a plant to DynaSys scope' but with Rule C_PFCTR2
Please indicates in the description the date and user code to track changes

Step1) Check the daily DynaSys chain (PC_DPS_DYNASYS_01) is finished via ST13

Step2) Add a new line in Global Filter (C_GLBFILT) for Stream DPS / Rule CPFCTR2_2
Please indicates in the description the date and user code to track changes

Step3) No more action requiered as BFC BU filter is only used for DSOs loaded via FULL process
Exchange rates are send daily to DynaSys via flat file DYS_BW_CURR.csv.
There are limited to Exchange Rate types ZRH2, CAR4 and C, and several currencies (ZAR, VEF, USD, TWD...). For all, conversion to EUR only.
It is possible to add currency to the current list (From currency / FCURR).
Step1) in WBD : modify 'DTP DAFICE01 -> DBDYN10 - Full limited' / DTP_AKLI1L2RFKV5X4Z6KR11T14Y4
Step2) transport till WBP.

CAUTION : It is not possible to change Exchange Rate Type (KURST) or To-currency (TCURR) without impact on the loading flow, and file generation.
Step1) Check the daily DynaSys chain (PC_DPS_DYNASYS_01) is finished via ST13

Step2) Update C_PLNTCON / Plant for Consignation (Receiving Plant from Delivery)
a) if few values have to be modified, use transaction RSD1, add or modify lines for C_PLNTCON / Plant for Consignation (Receiving Plant from Delivery)
In case of modification, do not forget to launch Change Log.
b) if several values, you can use update by flat file. Format is :
0LOGSYS; C_PLNTCON;C_PARTCUS;C_SHIPTOF
WP1_400;8063;2016260;57295
WP1_400;8039;2013950;57300
WP1_400;8171;2031655;57641
Step3) Delete whole contain of following DSOs
Reason : part of the loading is via DELTA mode
Step4) Launch the Process Chain PC_DPS_DYNASYS_12 (around 3-4h).
Several minor evolution managed by the Dynasis project team.
Process chain planning : Take into account various dependences of DSO Source wich are out of DYnasys perimeter (Deliveries, sales order, Stock...)
See the New Dynasys dataflow to implement here.
Originaly, there was a filter on field C_PFCTR2 in DTP linked to transformation between master data C_MATPNT2 and DSO DBDYN08 :

Filter value applied was OLAP variable V_0G_CWWE03_0001.
But the issue is that field C_PFCTR2 is not filled for source system PF1.
When we applied the filter, only data from source system WP1 was loaded in DSO DBDYN08.
To fix the issue, filter value was deleted and a start routine was added in transformation.
In this one, we read the master data C_MATPNT3 to keep C_PFCTR2 value with key Plant & Material.
If an evolution is done to fill C_PFCTR2 value for PF1 System in C_MATPNT2 master data, start routine could be deleted and filter value in DTP will be applied again.