根据税码取得税率函数

自己写的根据税码取得税率函数[@more@]

实现原代码:

FUNCTION ZFN_GET_DUTY_RATE. *"---------------------------------------------------------------------- *"
*"區域介面:
*" IMPORTING
*" VALUE(I_MWSKZ) TYPE MWSKZ
*" EXPORTING
*" VALUE(E_ZDUTY) TYPE ZDUTY
*"----------------------------------------------------------------------

TABLES: A003,KONP.
CLEAR A003.
SELECT SINGLE * FROM A003 WHERE KAPPL = 'TX' AND ALAND = 'CN' AND MWSKZ = I_MWSKZ.
IF SY-SUBRC = 0.
CLEAR KONP.
SELECT SINGLE * FROM KONP WHERE KNUMH = A003-KNUMH AND KOPOS = 1.
IF SY-SUBRC = 0.
E_ZDUTY = KONP-KBETR / 1000.
ENDIF.

ENDIF.

ENDFUNCTION.

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

转载于:http://blog.itpub.net/9437124/viewspace-1021401/

你可能感兴趣的:(根据税码取得税率函数)