如何在 ABAP 中获取日文日期格式
How to get Date format in Japanese in ABAP
西北 ABAP 7.0
在 SU01 中,您可以将用户日期格式设置为日语。示例格式 7
在代码中,这在用户 运行 时有效。
" user date format set to JAPANESE DATFM 7
DATA: l_char TYPE text240, l_char1 TYPE c.
write sy-datum to l_char.
l_char1 = l_char(1). " THIS WORKS
但是,我们需要从没有也不能设置此日期格式的用户那里获取此信息。
write someDate to l_char 'YYYY.MM.DD' is possible.
But the format for Japanese is not available.
function CONVERT_DATE_TO_EXTERNAL
only works for the logged in users format.
Is there a functional that can delivery the japanese date string ?
如果用户日期设置有效,我猜你可以使用 set country 命令。或者你已经试过了?
下面的解决方案呢?
REPORT YYY.
WRITE |{ sy-datlo COUNTRY = 'JP ' }|.
西北 ABAP 7.0 在 SU01 中,您可以将用户日期格式设置为日语。示例格式 7
在代码中,这在用户 运行 时有效。
" user date format set to JAPANESE DATFM 7
DATA: l_char TYPE text240, l_char1 TYPE c.
write sy-datum to l_char.
l_char1 = l_char(1). " THIS WORKS
但是,我们需要从没有也不能设置此日期格式的用户那里获取此信息。
write someDate to l_char 'YYYY.MM.DD' is possible.
But the format for Japanese is not available.
function CONVERT_DATE_TO_EXTERNAL
only works for the logged in users format.
Is there a functional that can delivery the japanese date string ?
如果用户日期设置有效,我猜你可以使用 set country 命令。或者你已经试过了?
下面的解决方案呢?
REPORT YYY.
WRITE |{ sy-datlo COUNTRY = 'JP ' }|.