cancel
Showing results for 
Search instead for 
Did you mean: 

Date format issue

Former Member
0 Kudos

Hi Friends !

We have web application for dealers for placing the orders . Recently we observed correct format of dates are not being transferred from SAP to web shop due to which all campaign dates are set to 31/12/9999. The expected format from SAP is say 26032013 but program sending the date in format-2013-03-26 which is wrong . Is this related to config .How can i correct the date format .

Regards,

Sandeep

Accepted Solutions (0)

Answers (3)

Answers (3)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Check the settings for country formats (the corresponding country for the dealer) in tcode OY01 (table T005X).

I hope this helps you

Regards

Eduardo

Former Member
0 Kudos

Hi Eduardo,

I have checked the setting and its in the format DD.MM.YYYY where as FM is sending data in format YYYY-MM-DD and our expected format in web application is- YYYYMMDD. So i believe its not related to OY01 settings as there are no changes done in this transaction since long .

Regards,

Sandeep

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

If your application is a customer application (i.e. a Z report) check the management versions for this objects. The right form sounds to this

DATA: date(8).

date(2) = sy-datum+6(2).

date+2(2) = sy-datum+4(2).

date+4(4) = sy-datum(4).

And the other (the worst) sounds to any function module related or to the older format WRITE with options type DD/MM/YYYY or writing before the command SET COUNTRY 'ES' (for instance 'ES' and read the option from OY01) but as you said, this isn't the origin of the issue.

I hope this helps you

Regards

Eduardo

Former Member
0 Kudos

Hi Sandeep,

Please use below FM for the date conversion.

CONVERT_DATE_TO_INTERNAL

Regards,

Trevor Wong.

Former Member
0 Kudos

Hi,

just write down below code where your date is coming after that and after executing this code take the work area value and get  your  date format

CONCATENATE  sy-datum+6(2)

               sy-datum+4(2)

               sy-datum(4) INTO wa

                separeted by '/'.

Regards,

Pravanjan

Former Member
0 Kudos

Hi,

Thanks for your suggestion and i will consider it . But there is no change in the FM used and also its happening from last one week suddenly .

Regards,

Sandeep N