Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Date format in Output types

0 Kudos
448

Hi All,

Is output type anyway related to date format.

As there is a case when we are trying to assign 2 output types at the same time, and try to save it, we get an update termination error.

On debugging the code we found that date formats it was chosing for 2 output types were different. ( Ex - DD.MM.YYYY and YYYY.MM.DD )

Regards,

Harish

4 REPLIES 4

Former Member
0 Kudos
241

Hello Harish,

Date format is determined by the global settings such as Country or more specifically the User Master. It is not based on output type.

Thanks,

Venu

Former Member
0 Kudos
241

hi,

Date format is always depends on user settings. to check those settings use the Tcode SU01-> DEFAULTS tab you will get your date format.

if you are trying it in ABAP code always wuse command "WRITE source date to taget date". then ABAP itself take care of formates

Former Member
0 Kudos
241

Hi Harish,

Date formats will may differ from user to user, this is depends on the User date format, if you want to use the Generic format then use the beloe code

Data: Date like SY-DATUM,

date1(10),

Move: SY_DATUM to DATE.

WRITE DATE to DATE1.

in this onw DATE1 will have the USER Format, whatever the user format, it will convert the DATE to that user, but in this case the year should come first i mean the format of SY_DATUM.

Thanks

Sudheer

ferry_lianto
Active Contributor
0 Kudos
241

Hi Harish,

You may take a look at this FM <b>CONVERT_DATE_TO_INTERNAL</b>.

Hope this will help.

Regards,

Ferry Lianto