【转载】通过 FUNCTION NET_DUE_DATE_GET 得到MIRO付款日期(DUE ON DATE)

来源:互联网 发布:小米笔记本office软件 编辑:程序博客网 时间:2024/06/10 18:23
Vendor/Customer Net Due Date 计算逻辑.
要想得到 Net Due Day 就要先知道另一个时间的计算逻辑.
BaseLine Date:Date to which the periods for the cash discount deadline and the due date for net payment refer. This is the case for line items in open item accounts.
从help上给出的解释看出这个日期一个是用来计算cash discount deadline, 一个就是计算 net due date.
我们先来看payment的定义.
Tcode: OBB8
Net <wbr>Due <wbr>Date
从上面的图可以看出 Baseline date 有两项决定:
1.) Default for baseline date.
2.) Baseline date calculation.
我们以Vendor为例说明.
Net <wbr>Due <wbr>Date

Net <wbr>Due <wbr>Date
当前设定的Posting Date 为2013/09/20,
所以BaseLine Date 就应该为 2013/09/20 下一月的15号, 也就是 2013/10/15
这个日期是存储在Table BSIK-ZFBDT中.
明白了BaseLine Date 计算逻辑就很容易得出Net Due Date了.
从上图很容易的就得出 Net Due Date 是在Baseline Date第3个月的10号, 也就是 2014/01/10
这个日期存储在 Table BSEG-FDTAG中(这里有问题)
当然我们如不想去查 BSEG 这个大Table的话, 也可以用Function 去计算出出这个值.
  CALL FUNCTION 'NET_DUE_DATE_GET'
    EXPORTING
      i_zfbdt p_zfbdt   " Baseline Date
      i_zbd1t p_zbd1t   " Fixed Date 1
      i_zbd2t p_zbd2t   "
      i_zbd3t p_zbd3t   "
      i_shkzg 'S'       " Vendor('H'), Customer('S')
      i_rebzg p_rebzg   "
      i_koart 'D'       " Vendor('K'), Customer('D')
    IMPORTING
      e_faedt p_fdtag.  " Net due Date
  CHECK NOT p_fdtag IS INITIAL.

Net <wbr>Due <wbr>Date
0 0
原创粉丝点击