04-01-2022 10:34 AM
Tue Dec 14 00:00:00 CST 2021
CL_PCO_UTILITY
cl_abap_datfm
04-02-2022 5:20 AM
function zrfc_converter_billingdate .
*"----------------------------------------------------------------------
*"*"局部接口:
*" IMPORTING
*" VALUE(STR) TYPE STRING
*" EXPORTING
*" VALUE(DATE) TYPE DATS
*"----------------------------------------------------------------------
"Tue Dec 14 00:00:00 CST 2021
"认证日期
data:lt_date type table of string.
data:ls_date type string.
data:return_code type sy-subrc.
data:month_names type standard table of t247 with header line.
call function 'MONTH_NAMES_GET'
exporting
language = sy-langu
importing
return_code = return_code
tables
month_names = month_names[]
exceptions
month_names_not_found = 1
others = 2.
split str at space into table lt_date.
read table lt_date into ls_date index 6.
if sy-subrc eq 0.
date+0(4) = ls_date.
endif.
read table lt_date into ls_date index 2.
if sy-subrc eq 0.
clear:month_names.
translate ls_date to upper case.
month_names-ktx = ls_date.
read table month_names with key ktx = month_names-ktx.
if sy-subrc eq 0.
date+4(2) = month_names-mnr.
endif.
endif.
read table lt_date into ls_date index 3.
if sy-subrc eq 0.
date+6(2) = ls_date.
endif.
endfunction.
04-01-2022 12:51 PM
Could you ask a question in plain English please? You have translators if you don't speak English well.
04-02-2022 2:30 AM
04-02-2022 4:33 AM
"Tue Dec 14 00:00:00 CST 2021
"认证日期
DATA:lt_date TYPE TABLE OF string.
DATA:ls_date TYPE string.
DATA:return_code TYPE sy-subrc.
DATA:month_names TYPE STANDARD TABLE OF t247 WITH HEADER LINE.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
language = sy-langu
IMPORTING
return_code = return_code
TABLES
month_names = month_names[]
EXCEPTIONS
month_names_not_found = 1
OTHERS = 2.
SPLIT invoice-deductibledate AT space INTO TABLE lt_date.
READ TABLE lt_date INTO ls_date INDEX 6.
IF sy-subrc EQ 0.
tb_zmmbw-zrzrq+0(4) = ls_date.
ENDIF.
READ TABLE lt_date INTO ls_date INDEX 2.
IF sy-subrc EQ 0.
CLEAR:month_names.
month_names-ktx = ls_date.
READ TABLE month_names WITH KEY ktx = month_names-ktx.
IF sy-subrc EQ 0.
tb_zmmbw-zrzrq+4(2) = month_names-mnr.
ENDIF.
ENDIF.
READ TABLE lt_date INTO ls_date INDEX 3.
IF sy-subrc EQ 0.
tb_zmmbw-zrzrq+6(2) = ls_date.
ENDIF.
04-02-2022 5:11 AM
function zrfc_bw_converter_date.
*"----------------------------------------------------------------------
*"*"局部接口:
*" IMPORTING
*" VALUE(STR) TYPE STRING
*" EXPORTING
*" VALUE(DATE) TYPE DATS
*"----------------------------------------------------------------------
"Tue Dec 14 00:00:00 CST 2021
"认证日期
data:lt_date type table of string.
data:ls_date type string.
data:return_code type sy-subrc.
data:month_names type standard table of t247 with header line.
call function 'MONTH_NAMES_GET'
exporting
language = sy-langu
importing
return_code = return_code
tables
month_names = month_names[]
exceptions
month_names_not_found = 1
others = 2.
split str at space into table lt_date.
read table lt_date into ls_date index 6.
if sy-subrc eq 0.
date+0(4) = ls_date.
endif.
read table lt_date into ls_date index 2.
if sy-subrc eq 0.
clear:month_names.
translate ls_date to upper case.
month_names-ktx = ls_date.
read table month_names with key ktx = month_names-ktx.
if sy-subrc eq 0.
date+4(2) = month_names-mnr.
endif.
endif.
read table lt_date into ls_date index 3.
if sy-subrc eq 0.
date+6(2) = ls_date.
endif.
endfunction.
04-02-2022 5:20 AM
function zrfc_converter_billingdate .
*"----------------------------------------------------------------------
*"*"局部接口:
*" IMPORTING
*" VALUE(STR) TYPE STRING
*" EXPORTING
*" VALUE(DATE) TYPE DATS
*"----------------------------------------------------------------------
"Tue Dec 14 00:00:00 CST 2021
"认证日期
data:lt_date type table of string.
data:ls_date type string.
data:return_code type sy-subrc.
data:month_names type standard table of t247 with header line.
call function 'MONTH_NAMES_GET'
exporting
language = sy-langu
importing
return_code = return_code
tables
month_names = month_names[]
exceptions
month_names_not_found = 1
others = 2.
split str at space into table lt_date.
read table lt_date into ls_date index 6.
if sy-subrc eq 0.
date+0(4) = ls_date.
endif.
read table lt_date into ls_date index 2.
if sy-subrc eq 0.
clear:month_names.
translate ls_date to upper case.
month_names-ktx = ls_date.
read table month_names with key ktx = month_names-ktx.
if sy-subrc eq 0.
date+4(2) = month_names-mnr.
endif.
endif.
read table lt_date into ls_date index 3.
if sy-subrc eq 0.
date+6(2) = ls_date.
endif.
endfunction.
04-02-2022 5:20 AM
function zrfc_converter_deductibledate .
*"--------------------------------------------------------------------
*"*"局部接口:
*" IMPORTING
*" VALUE(STR) TYPE STRING
*" EXPORTING
*" VALUE(DATE) TYPE DATS
*"--------------------------------------------------------------------
"2022-01-25 00:00:00.0
"
call method cl_abap_datfm=>conv_date_ext_to_int
exporting
im_datext = str
im_datfmdes = '6'
importing
ex_datint = date.
endfunction.