FI 替代相关 Oss Note
记录 FI substitution 相关 OSS Note 查看时自己关注的要点。并非翻译或全文解读。
42615
会计凭证冲销 (FB08 / F.80)不会触发替代,因为冲销凭证 (reversal document)必须和原凭证只有借贷方相反,其他完全相同 (当然凭证日期可以有一些变化)。
会计凭证替代有三种,header 替代,line item 替代和 complete document 替代。line item 替代时不能修改 header 的字段,否则系统产生一个 dump: PERFORM_PARAMETER_TOO_SHORT
。
关键字段不应该被替代,比如会计科目、金额、GSBER 等。
如何允许某字段被替代
如果默认情况下,某字段不能被替代,使用下面的方法将该字段设置为可以被替代 (以 BSEG-MABER
为例 )
Step 1: 修改 GB01 表 :
将
BOOLCLASS CLASSTYPE BCLTAB BCLFIELD BEXCLUDE
009 S BSEG MABER X
修改为:
BOOLCLASS CLASSTYPE BCLTAB BCLFIELD BEXCLUDE
009 S BSEG MABER
bexclude
修改为 space
。用一种自己熟悉的方法修改。比如使用 ABAP 的 modify
:
report z_modify_gb01.
data zgb01 like gb01.
select single * into zgb01 from gb01
where boolclass = '009'
and classtype = 'S'
and bcltab = 'BSEG'
and bclfield = 'MABER'
and beclude = 'X' .
* bexclude 修改为 space
zgb01-bexclude = ''.
modify gb01 from zgb01.
说明:
BOOLCLASS - Specifies the Boolean class. This is determined in the application area and callup point in each case, for example:
008 - Document header (FI)
009 - Line item (FI)
015 - Complete document (FI)
016 - Cost of sales accounting
100 - Document header (CO)
CLASSTYPE - Specifies if the field can be used for validations (B), substitutions (S) or both (A).
BCLTAB - Table that is used
BLCFIELD - Field of this table
BEXCLUDE - Can be used ' ' or cannot be used 'X'.
- complete document :
boolclass = '015'
。同时要删除 GB01 中的下面一行:
BOOLCLASS CLASSTYPE BCLTAB BCLFIELD BEXCLUDE
015 S BSEG * X
Step 2: 重新生成 substitution export routines
使用程序 RGUGBR00
重新生成 substitution export routines。
Complete doucment 替代的作用范围
At callup point 3, substitution is only carried out if the document is posted in FI (with program SAPMF05A or SAPF110S) or in MM invoice verification (with program SAPMM08R). When posting via the FI/CO interface, for example, with direct input (RFBIBL00 Mode 'D' or transfer billing document with Transaction VF01) no substitution is carried out.
这一点,386896 有专门说明。
386896
FI 完全凭证替代只适用于 FI 手工凭证和 MR01 所做的 LIV 凭证。其他组件所做凭证,不会运行 FI 替代。
如果要实现其他组件业务传给 FI 的会计凭证,有两种方法:
- BTE: process 1120 和 process 1130
- ERP 2004 版之后,可以使用 BADI : ac_document
97557
97557 介绍凭证更改 (document change)时候替代 (substitution)是否起作用。简单来说,就是凭证更改的时候,如果修改凭证抬头 (document header),则凭证抬头必须有字段被修改过。如果修改凭证行项目,则至少在行项目中有字段被修改过。
原文:
When you change documents (Transaction FB02), a substitution is only carried out for callup point 1 (document header) if a field has been changed manually in the document header.
When you change documents, a substitution is only carried out for callup point 2 (line item) if a field has been changed manually in the line in question.
参考资料
42615 - Substitution in FI
97557 - Substitution in FI for change document
386896 - Substitution at call-up point 3 ("Complete document")
Substitution with BADI AC_DOCUMENT in FI transaction codes
842318 - Frequently asked questions about validations and substitutions