phil soady
phil soady

Reputation: 11328

How to get Date format in Japanese in ABAP

NW ABAP 7.0 in SU01 You can set a users date format to Japanese . Example Format 7

enter image description here

In code this works when run by the user.

" 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 

However we need to get this from a user that doesnt and cannot have this date format set.

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 ?

Upvotes: 3

Views: 1224

Answers (2)

Jagger
Jagger

Reputation: 10524

What about the following solution?

REPORT YYY.

WRITE |{ sy-datlo COUNTRY = 'JP ' }|.

Upvotes: 3

Oguz
Oguz

Reputation: 1926

If the user date setting works, you can use, set country command, I guess. Or you tried it already?

Upvotes: 1

Related Questions