系統環境:SAP HANA 1610
業務背景介紹
在日常業務中,應付會計在進行發票校驗MIRO對賬時,可能會遇到報錯信息:“消息號F5727,在FI中達到的項目最大編號,已超過FI憑證('999')的項目最大“,導致發票校驗無法過賬;
問題原因
對于此種情況,根本原因有兩點,其中之一是系統生成會計憑證時,對于GL類型賬戶分配相同的數據,若里面值字段(例如物料工廠采購訂單采購行項目等字段)不相同的話,則會進行細分,就易導致會計憑證行項目過多;其二是不管是HANA系統還是ECC,其會計憑證過賬,均記賬到BSEG表中,且BSEG-BUZEI字段字符長度只有3位數字;
解決方案
解決方案根據系統環境可分為ECC版本和HANA版本,不過其基本原理一致:通過系統配置,實現會計憑證合并,來減少FI憑證行項目;OBCY/OBCYX事物代碼(所屬后臺表TTYPV/TTYPVX),存儲會計憑證中行項目值不同導致無法合并的字段;即除了TTYPV/TTYPVX中值字段以外的所有字段都是相同的,它們能被合并成一個單獨的項目。在會計憑證過賬時,其存儲在TTYPV/TTYPVX字段的內容會被刪除;
1)ECC版本,可直接采用OBCY,對于MIRO發票校驗,其參考過程選擇”RMRP發票收據“,字段填充內容可查看“額外知識-OBYC典型配置內容”所示;
2)HANA版本,SAP提供OBCYX和OBCYA事物代碼,進行數據合并,OBCYX針對BSEG進行合并處理,OBCYA針對HANA專屬表ACDOCA進行合并;備注:需打NOTE 77161
系統配置-HANA
1. 實現ACDOCA表數據合并
1)維護SM30:FINSVS_ACDOC_FCT
對EBELN 和EBELP 2個字段,雙擊進入明細,對“匯總級別”修改成按“2相關匯總”,原來默認為空;即ACDOCA 中字段的匯總,按照基于參考交易 (AWTYP)、憑證類型 (BLART)、公司代碼 (BUKRS) 和分類賬 (RLDNR) 的特征組合進行匯總。
2)維護OBCYA
2. 實現BSEG表數據合并
1)維護SM31:V_TTYPS
因HANA 1610版本中,OBCYX表字段不存在采購訂單EBELN和行項目EBELP,故需要在此處新增EBELN和EBELP字段;備注:在此之前,需打NOTE 77161,才能新增成功,代碼補丁內容如下所示;
對于參考過程為RMRP發票收據,維護表和字段所示:
3. MIRO測試實現
MIRO發票校驗,模擬測試顯示會計憑證行項目共48行(含物料、工廠、數量等),正式運行保存憑證顯示為30行,分配字段僅含采購訂單,物料、工廠、數量等內容均為空;
憑證合并使用風險:-來自36353NOTE
采用OBCY進行憑證合并后,因BSEG中物料、數量等細節數據缺失,會與標準事物代碼邏輯存在矛盾,標準事物代碼查詢報表不可使用,例如MIRO發票校驗合并FI憑證后,標準事物代碼IDCNGRIR_GNB(已收貨未開票報表查詢)無法查詢到數據,其根本邏輯來源于BSEG;
具體注意事項如下:
Notes:
When you carry out summarization using the material number (MATNR) during position management or invoice verification transactions, the 'material number' information is lost in the BSEG document table of Financial Accounting. Therefore no entries are written to the BSIM table. This can have the following consequences:
Transactions such as MR51 (accounting documents for material) or MB5B (balance at posting date) produce incorrect results.
The evaluation of balances at material number level (characteristic 0MATERIAL) in the SAP Business Information Warehouse displays faulty or incomplete results.
You can no longer use the Value Flow Monitor (transaction CKMVFM) to compare differences at material level between price difference accounts and the relevant FI postings.
If you delete the material number (MATNR), the amount (MENGE), the unit of measure (MEINS) or the plant (WERKS) in position management, this information is no longer available in financial accounting. The RMVKON00 report (transactions MRKO and MRPI) however, which indicates and settles the consignation stock, is based on the documents of financial accounting. This has two consequences:
If the FI documents are not summarized, each individual withdrawal is indicated in the report and can also be individually settled. If the FI documents are summarized, several withdrawals can be displayed in one single report line and can no longer be separately settled. Furthermore, certain data, such as material number, amount and unit of measure, may no longer be displayed.
If in the FI documents the material number or the plant is deleted and you settle the withdrawal, the tax codes that you defined using the tax indicator (in the material master) or in a purchasing info record can no longer be found. Instead, only the taxcode that you defined as default value in the Customizing settings for the invoice verification (transaction OMR2) is determined. If no valid tax code has been defined there, the settlement terminates with message FF 704.
思考題;
1.前端來源進行會計憑證過賬時,對于GL類型賬戶分配相同,其值字段不同,SAP采用按不同憑證行項目進行記賬處理,有什么優勢?
答:采用數據分析時,可不用查詢前端數據來源,直接獲取BSEG中的數據(含物料、工廠、數量、單位、事物類型),更加快捷方便;
備注:標準事物代碼IDCNGRIR_GNB(已收貨未開票報表查詢),其根本邏輯就來源于BSEG;
相關NOTE
1779136 -Extended summarization of FI documents
77161 -Summarization of postings in FI with purchase order reference
36353 -Accounting Interface: Summarization of FI documents
額外知識
額外知識-OBCY/OBCYX:OBCYX可根據參考過程+憑證類型+公司代碼+表+字段進行憑證合并;OBCY只能根據參考過程+表+字段進行合并;兩者功能一致,OBCYX更加細化;值得注意的是,設置了OBCYX就不能設置OBCY,反之亦然;兩者只能使用一個;
額外知識-OBYC典型配置內容:BKPF-AWTYP對象類型+值字段;