SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L1S31 {
font-style: italic;
color: #808080;
}
.L1S32 {
color: #3399FF;
}
.L1S33 {
color: #4DA619;
}
.L1S52 {
color: #0000FF;
}
REPORT
ZWZ_TEST.
DATA
: RES LIKE
bseg-wrbtr .
DATA
: date
LIKE
sy-datum .
DATA
: curr_ex LIKE
bapicurr-bapicurr .
date
= '20100107'
.
DATA
: fa LIKE
bseg-wrbtr ,
fc LIKE
t001-waers ,
lc LIKE
t001-waers ,
ty LIKE
tcurr-kurst .
fa = 101
.
fc = 'USD'
.
lc = 'RMB'
.
ty = 'M'
.
curr_ex = fa .
CALL
FUNCTION
'BAPI_CURRENCY_CONV_TO_INTERNAL'
"转换成本币格式
EXPORTING
currency
= fc
amount_external = curr_ex
max_number_of_digits = 13
IMPORTING
amount_internal = fa.
CALL
FUNCTION
'CONVERT_TO_LOCAL_CURRENCY'
"转换MONEY
EXPORTING
date
= date
foreign_amount = fa
foreign_currency = fc
local_currency = lc
* rate = '1.2'
type_of_rate = ty
IMPORTING
local_amount = RES
EXCEPTIONS
no_rate_found = 1
OTHERS
= 2
.
WRITE
:/ sy-subrc ,RES .
ENDIF
.
币别转换
最新推荐文章于 2024-06-17 08:53:04 发布