Solution for Inventory differences in BW due delta issues
There is a program that was built by Yukiti that compare 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):
4) Main paramater: Budat
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
