Mobile: 135 8576 5961 / WeChat: IM_WILLIAM_C / Mail: william.chen.cn@outlook.com /
分类: IT业界
2014-04-21 18:47:12
下面是基于基准日期(Baseline)、付款条款(Payment terms)计算付款到期日(due date)的一个测试program。
稍作修改即可作为可用逻辑哟。
REPORT zforum101 . TABLES: faede, bsid, bsega, t052. PARAMETERS : p_zterm LIKE t052-zterm DEFAULT '1400'. PARAMETERS : bldat TYPE sy-datum DEFAULT '20060801'. SELECT SINGLE * FROM t052 WHERE zterm = p_zterm. CLEAR faede. MOVE-CORRESPONDING t052 TO faede. MOVE: t052-ztag1 TO faede-zbd1t, t052-ztag2 TO faede-zbd2t, t052-ztag3 TO faede-zbd3t. MOVE bldat TO faede-bldat. faede-koart = 'D'. CALL FUNCTION 'DETERMINE_DUE_DATE' EXPORTING i_faede = faede IMPORTING e_faede = faede EXCEPTIONS OTHERS = 1. bsega-netdt = faede-netdt. WRITE bsega-netdt.