- JAVA 日期+时间 转换 ABAP 日期时间
DATA: lv_ts TYPE string,
lv_date TYPE sy-datum, "日期
lv_time TYPE sy-uzeit. "时间
" JAVA 传入的timestamp 格式
lv_ts = 1698032440000 + 8 * 60 * 60 * 1000. "1698061240000
" 调用 类 进行转换
CALL METHOD cl_pco_utility=>convert_java_timestamp_to_abap "JAVA时间戳转日期
EXPORTING
iv_timestamp = lv_ts
IMPORTING
ev_date = lv_date
ev_time = lv_time.
"lv_date = 20231023
"lv_time = 114040
p_ps_0127_ztcsj = lv_date && lv_time.
- ABAP 日期+时间 转换 JAVAtimestamp
lv_date = 20231023
lv_time = 114040
CALL METHOD cl_pco_utility=>CONVERT_ABAP_TIMESTAMP_TO_JAVA "
EXPORTING
IV_DATE = lv_date
IV_TIME = lv_time
"IV_MSEC = ''
IMPORTING
EV_TIMESTAMP = lv_ts. " 1698061240000