Application Development and Automation 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: 
Read only

DATE FORMAT

Former Member
0 Likes
1,142

hi experts,

i have problem with date format.in my sap system date format is mm/dd/yyyy.

when the user selects particular date in selection screen it was displaying the format mm/dd/yyyy.

but the user wants dd/mm/yyyy format.

please give me some idea.

Thanks

sai

12 REPLIES 12
Read only

bpawanchand
Active Contributor
0 Likes
1,113
  • Execute SU01 Txn

  • Click on Defaults Tab and there you can set the date

Read only

Former Member
0 Likes
1,113

Hi

use EDIT MASK

for more info please go through the KEY word docu where you can find an example tooo

Thanks and regards

Ramchander Rao.K

Read only

Former Member
0 Likes
1,113

Hi,

USe FM /SAPDII/SPP05_CONVERT_DATE

Converts the date to user-defined format

Regards,

Rajat

Read only

former_member386202
Active Contributor
0 Likes
1,113

Hi,

Use below FMs

CONVERT_DATE_TO_EXTERNAL Conversion: Internal to external date (like screen conversion)

CONVERT_DATE_TO_INTERNAL Conversion: External to internal date (like screen conversion)

Regards,

Prashant

Read only

Former Member
0 Likes
1,113

Hi Sai,

Do what pavan said. It will work. To add to that after changing the default setting you need to logoff and login again for the changes to take effect.

Regards

Read only

Former Member
0 Likes
1,113

Hi,

use thi fm

CONVERSION_EXIT_PDATE_OUTPUT

hope it will help you

regards,

anand

Edited by: anand prakash rai on Dec 4, 2008 9:06 AM

Read only

Former Member
0 Likes
1,113

hi ..

declare one variable with Char formate with proper length. and then after that just do the concatenate

operation of the date into your desired formate:

here iam given u some code just see the concatnation operation and try it once..

DATA: lv_date type sy-datum, " this will be in this formatee yyyymmdd

gv_date(10) type c.

concatenate lv_date+6(2) '/' " dd you will get

lv_date+4(2) '/' " mm you will get

lv_date+0(4) " year you will get here

into gv_sdate. " gv_date will be of "dd/mm/yyyy".

just try it.. it will set to u r requirment..all the best.

UR's

GSANA

Read only

Former Member
0 Likes
1,113

hi Experts thanks for ur replies.but my problem is when the user enter the date in selection screen it should display in format dd/mm/yyyy.but my system format is mm/dd/yyyy.if i change in SU01 then it will efect remaining developments.for this requirement only he need like this.

plz guide me.

Thanks

Sai

Read only

0 Likes
1,113

Hi Sai,

You have to maintain the settings for that particular user in SU01 only. It will reflect only for that user

Regards

Read only

Former Member
0 Likes
1,113

hi ravi,

thanks for ur answer.but can u give me any other option which will limited to this program only through coding.

Thanks

sai

Read only

0 Likes
1,113

declare your select optons as s_date as char10.

Here you accept date as dd/mm/yyyy

Then before using the date for futhur operations

loop at s_matnr.

Use FM CONVERT_DATE_TO_INTERNAL

Pass s_date-high to get the date in s_date-high.

Do the same for s_matnr-low.

modify s_date.

endloop.

Continue processing as normal then

Regards,

Prashant

Read only

Former Member
0 Likes
1,113

menu (from any transaction): System / User profile / Own data

there you can change.

hope this helps

---

SET COUNTRY 'US'.

WRITE L_DATE TO L_CHAR_DATE MM/DD/YYYY.

---

DATA : DATE TYPE CHAR10.

CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'

EXPORTING

DATIN = '20081013'

FORMAT = 'DD.MM.YYYY'

IMPORTING

DATEX = DATE

.

WRITE : / DATE.