There is a program that was built by Yukiti that compares the content of MSEG with ODS_IC01 (movements) and ODS_IC02 (revaluations).
Extractor - DTS_IM_VARIANCE based on function module
Function Module - Z_WBW_DTS_IM_001
Main tables used on function module
BKPF - Accounting Document Header
BSEG - Accounting Document Segment (Cluster Table)
CKMI1 - Index for Accounting Documents for Material
EKPO - Purchasing Document Item
MBEW - Material Valuation
MKPF - Header: Material Document
MLIT - Material Ledger Document: Items
MSSA - Total Customer Orders on Hand
MSSQ - Project Stock Total
QBEW - Project Stock Valuation
WB2_V_MKPF_MSEG2 - Data Selection from Material Documents (without WBGT) (view) with tables MKPF and MSEG
Main function module tasks
1) Check data from Movements and Revaluation;
2) Check IF data is in RCS but is not in BW, storing 'DSO_IC07' (/BIC/ADSO_IC0700)
3) IF movement was done in the day, check in 'DSO_IC07' the date (/BIC/C_CPUDT):
- IF there is no data in 'DSO_IC07' the date (/BIC/C_CPUDT), there is no diference at this moment.
- IF date (/BIC/C_CPUDT) is the same today, it should be loaded in the next load.
- IF date (/BIC/C_CPUDT) is less than today, check IF loads were done, ie: weekends, holidays, etc. In the other side, the data is issued, because some reason the load failed. In this case, it should be done a detailed analysis about missed documents, in order to do a setup table in RCS and do a full repair in BW with these documents.
4) Main paramater: Budat
- IF it is not inserted in the infopackage, the Function Module has a routine to fill this field, If sy-datum <= 15, run the last and current period, IF not, Just the current one.
- IF it is inserted in infopackage, do not run the FM routine.
- Other parameters: 'MBLNR', 'MJAHR', 'BUKRS', 'WERKS', 'MATNR', 'INFOSOURCE', depend on 'BUDAT'.
- Parameter 'INFOSOURCE' , IF it is filled with '2LIS_03_BF', run only Movements routine, but if it is filled with ' 2LIS_03_UM' , so run the Revaluation routine.
- The execution time for a monthly period is around 1 hour, but for revaluation the routine takes more time.
Process Chain Weekly IM Variance Stock
Step 1 - Deletion of DSO_IC07 content
Step 2 - Infopackage - filter
Loading PSA
Step 3 – DTP to load data from PSA to target DSO_IC07
Step 4 – Analysis results - from 151919 records, only 19 have to be reloaded because the differences
Records with differences that should be reloaded
Step 5 – Check the delta queue (RSA7) in order to see if document is the queue
Step 6 – Run setup table (SBIW) for Inventory movements or revaluation with documents identified in last step.
For material movements
Execute in background (program option or F9 key)
Set output device
Set to immediate
Save
Follow de process using transaction SM37
For revaluation - follow the same steps that you did for material movements
Change the infopackage 2lis_03_bf to ODS_IC01 (full repair) parameter in order to add the material documents or period
Start again the load in DSO_IC07
PSA
DTP
The first errors were fixed, but some new ones were loaded from last day (28.03) for companies 7424 and 6746. That's better to run this process 2 days after movement, because the delta sometimes delay more time.
Query created in WBP to check data in DSO_IC07
Run the query below in order to check if there are records in DSO_IC07:
Regarding the selection parameters: The parameter current Date (CPUDT) must be less than processing Day date:
E.g.: Supposing today is 03/03/2011, you should fill this parameter like: "< 03032011"
Check IF the documents from DSO_IC07 are found in the ods_ic01 e ods_ic02.
If those documents are not found in ODS_IC01 and ODS_IC01, then:
Follow the instructions from the subject "Main function module tasks" found in the Page 2 item 3


























