SD-RV_accounting_document_create函数的代码解读的科目确定的补充

几个月以前写了一篇关于RV_accounting_document_create函数代码的分析的文章,其中对科目确定没有详细说明。这里补充说明。

在阅读本文章之前,我想大家先阅读下列的相关连接

 

关于定价技术的表关系和定价过程配置确定的说明

http://blog.csdn.net/CompassButton/archive/2008/01/21/2056783.aspx

 

SAP定义的几个标准Cost Condition的说明和科目配置

http://blog.csdn.net/CompassButton/archive/2007/08/11/1738029.aspx

 

RV_accounting_document_create函数的代码解读

http://blog.csdn.net/CompassButton/archive/2008/12/11/3496203.aspx

 

在RV_accounting_document_create函数会调用'RV_INVOICE_ACCOUNT_DETERM' 去确定sd模块配置的帐码对应的财务科目。但是'RV_INVOICE_ACCOUNT_DETERM'函数碰到税之类帐码将不查找sd模块配置的帐码对应的财务科目。也就是税的科目配置不在sd的科目配置。那税码对应科目取的是财务OBCN的配置。

form relevant_for_account_determ tables t_komv structure konv
                                 using ls_vbrk structure vbrk
                                       ls_vbrp structure vbrp
                                       lv_mode
                                       lv_new_acct_det
                                 changing p_accsubrc.

  p_accsubrc = 4.

* only active conditions
  check: t_komv-kinak = space.

* not for taxes
  check: t_komv-koaid na 'WD'.

* only conditions with a value ( exception: sales documents )
  check: ( t_komv-kwert ne 0 or ls_vbrk-vbtyp ca vbtyp_verk ).

* not for downpayment clearings
  check: t_komv-kntyp ne 'e'.

* for invoice updates ( mode A or B ): only rebate conditions
  check: ( lv_mode = space or t_komv-koaid = 'C' ).

* only for non-statistical conditions or accruals or transfer prices or
* prices for internal billing or invoice list conditions
* note that prices for internal billing are only relevant for
* make-to-order situations
  check: ( t_komv-kstat = space or
           t_komv-kruek ne space or
         ( t_komv-kntyp eq 'b' and ls_vbrk-vbund ne space ) or
           t_komv-kntyp eq 'c' or
         ( ( t_komv-kntyp eq 'I' or not t_komv-kfkiv is initial )
             and not ls_vbrp-posnv is initial ) or
           t_komv-kreli ne space ).

* item cancellation: sfakn is not set but accounts should be copied
* exception: rebate conditions ( these have no account because
* they are newly determined when the invoice is saved )
  if ls_vbrk-vbtyp ca 'NS' and not t_komv-sakn1 is initial
                           and lv_new_acct_det is initial.
    exit.
  endif.

  p_accsubrc = 0.

ENDFORM.                    " relevant_for_account_determ

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15232446/viewspace-589136/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15232446/viewspace-589136/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值