ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SD-RV_accounting_document_create函数的代码解读的科目确定的补充

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

原创 Linux操作系统 作者:vcdone 时间:2009-03-28 22:50:00 0 删除 编辑

几个月以前写了一篇关于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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-08-19

  • 博文量
    62
  • 访问量
    107038