修復MC.9過賬日期的庫存值與實際不一樣的問題

harson發表於2009-05-07
[@more@]最近財務部門調取MC.9報表檢視過去某個時間段的庫存,發現MC.9的值與MB5B值不一致.後調查發現,MC.9的值為錯誤值,MB5B的是正確的.查閱網上相關文章,遇到此類問題的還不止我們一個.
<wbr> <wbr> <wbr> <wbr> MC.9的取值來自於資訊結構S031和S032,具體內容可以透過SE16N檢視.S031存放的是在每個週期中的異動情況 (可以是以周月等等為週期,取決於IMG設定), S032存放當前的庫存和庫存價值,而S039則是鏈結了S031&S032,並且包含了一些沒有在資料庫中儲存、只在執行報表時才依據其他一些資料計算值的附加欄位.S039通常被用作參考,實際資料必須透過報表RMCBS039來寫入S039.它的用途有:
a) 在標準分析功能中,對於計劃/實際比較儲存計劃資料.(storing planned figures for planned/actual comparisons in the standard analysis.)
b) 在庫存控制中,建立柔性的分析.
<wbr> <wbr> <wbr> <wbr> <wbr> S031的構成在NOTE 中有詳細描述. S031的內容出錯可能來自多方面,遇到這種情況只有重建資訊結構了.
<wbr> <wbr> <wbr> <wbr> <wbr> S031表欄位的說明:
MANDT <wbr> <wbr> <wbr> Client
SSOUR <wbr> <wbr> <wbr> Statistic(s) origin
VRSIO <wbr> <wbr> <wbr> Version number in the information structure
SPMON <wbr> <wbr> <wbr> Period to analyze - month
SPTAG <wbr> <wbr> <wbr> Period to analyze - current date
SPWOC <wbr> <wbr> <wbr> Period to analyze - week
SPBUP <wbr> <wbr> <wbr> Period to analyze - posting period
WERKS <wbr> <wbr> <wbr> Plant
MATNR <wbr> <wbr> <wbr> Material Number
LGORT <wbr> <wbr> <wbr> Storage Location
以上欄位構成表主鍵。
Val. stock receipts 欄位顯示的是相關庫存地點收貨的數量,如果存在負數,則是存在收貨撤消的專案,比如mvt 102的移動.如果行記錄中沒有顯示庫存地點,則表示為外包商從我方的收貨,通常為541。
Val. stock issues 欄位顯示的是相關庫存地點發貨的數量,如果存在負數,則是存在發貨撤消的專案,比如mvt 262的移動.如果記錄中沒有庫存地點,則表示為外包商物料耗用,通常為543。
<wbr> <wbr> <wbr> <wbr> <wbr> 關於S031的生成,可以使用TC:Oli1 (將程式設為後臺執行較好,因為生成時間比較長),生成前, 用OLIX將S031中的不需要的版本資料刪掉,防止操作上不慎生成重複累加的值. <wbr>
<wbr> <wbr> <wbr> 生成後使用OLIX將生成的版本COPY到版本000中.這一步是由於SAP生成時預設版本是&(,而MC.9預設呼叫的是000版,故需要COPY,否則MC.9報表執行時會顯示沒有記錄的(當然你也可以設定使用者引數MCR值X來使mc.9可以選擇讀取的版本). <wbr>
<wbr> <wbr> <wbr> 關於重新生成結構,實際有很多TC,從oli1到oli9都是,但不同的TC用於生成不同的資訊結構。比如,oli1是根據物料移動的資料來生成,取自表mseg等,用來生成S031,oli3取的是採購相關的資料,生成S012,具體過程未研究完畢,以後再更新。 <wbr> <wbr> <wbr> 就我們公司的應用來看,S031用OLI1生成,S032使用OLI2生成,隨機抽查沒發現問題,發現問題再改這段文字吧。
<wbr> <wbr> 總之,按照SAP NOTE提到的標準方法有兩種,可在
中查到,我用的是B過程,大體如下:
<wbr> <wbr> 1、停用LIS 倉庫控制相關的LIS報表更新.IMG-PATH:
<wbr>+ Logistics - General + Logistics Information System (LIS) + Logistics Data Warehouse + Updating + Updating Control + Activate update
2、用程式RMCA0315刪除S031,程式 RMCA0325刪除 S032中相應000版本資料。
3、重新啟用更新
4、使用程式RMCBNEUA更新S031、S032,再順序執行程式RMCBNEUB,變式S031_S032,在此期間,不能有R3的操作。
附錄:
<wbr> <wbr> <wbr> 事務 NPRT 檢視指定日期對資訊結構的手動更新日誌
<wbr> <wbr> <wbr> report RMCP6VER <wbr> 複製實際資料到計劃版本,

<wbr> <wbr> <wbr> <wbr> report RMCBS039 傳輸S031&S032的最後資料到S039,
<wbr> <wbr> <wbr> <wbr> 相關IMG:
停用資訊結構的更新 或設定週期配置
<wbr> <wbr> <wbr> <wbr> + Logistics - General + Logistics Information System (LIS) + Logistics Data Warehouse + Updating + Updating Control + Activate update

重要的NOTES:

<wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> Notes <wbr> 79083 <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr>


另一部分參考資料,感謝原作者:

摘抄別人的原步驟:

Firstly, I used version “&(6” as temporary version – you could use any other name.
  1. Delete version “&(6” for S031, S032, S033, S034, S035 (if they exists) -- tcode olix
  2. Get material documents data for “&(6” – again S031, S032, S033, S034, S035 -- tcode oli1
  3. Get invoices data for “&(6” – again S031, S032, S033, S034, S035 -- tcode oliz
  4. Stock values for “&(6” – again S031, S032, S033, S034, S035 -- tcode oli2
  5. Delete version “000” (the main version) of S031, S032, S033, S034, S035 -- tcode olix
  6. Copy data in version “&(6” to version “000” for S031, S032, S033, S034, S035 -- tcode olix

Another article <wbr>written by a IMG fellow <wbr>for your reference, Please remember to have a test in your test system before you update IS data in your production machine .

SAP LIS - Wrong figures in Logistics Information System

Warning - Please test it in developer first. <wbr>

Alert : It can result in data loss or inaccurate data in your LIS table if not done properly.

This is bound to happened especially if the users made changes to the Purchase Order and you have set the online updates for your LIS. <wbr> <wbr> Fields like Material groups are consider keys fields and should not be change as it somehow impact the updates to LIS.

If the figures are wrong for a particular period, you can do a reorganization for all the Purchase Order for the particular months.

Assuming that you want to reorganize the whole S012. <wbr>

When you execute OLI3, it will locked any Purchase Order that it is processing. <wbr> Therefore, it is advisable to run it during off office hours.

First Step :-

  • OLI3 - Statistical setup of info structures from purchasing documents
  • Info structure to be set up S012
  • Save under version &(
  • Tick Delete/create indices
  • Specify the Purchasing Documents or Document Date
  • Name of run S012-1
  • Tick New run?
  • Date of termination 99.99.9999
  • Time of termination 99:99:99
  • Tick Redetermine update group?
  • Tick Update documents?

NPRT - Log for Setup of Statistical Data

Final Step:-
OLIX - Copy/delete versions of an info structure
First Screen

  • Info structure S012
  • Processing type Copy + Delete

Second Screen

  • Source version &(
  • Untick Do not copy initial records
  • Tick Reset target version
  • Untick No automatic period conversion

Now, you can check the figures using transaction MCE5or any of the transaction that uses the table S012.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195776/viewspace-1021855/,如需轉載,請註明出處,否則將追究法律責任。

相關文章