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: 

Conversion Error in Function Module

Former Member
0 Kudos


Hi All,

We are using FM : TZ_LOCAL_TO_GLOBAL in our SAP BW system to populate one of the timestamp fields passing date, time and time zone -UK. FM is generating Conversion Error for all the records where date is 30th March 2014 & time is between 2 - 3AM.

On Further testing we observed that this issue is occuring betwee 2-3 AM on every 5th Sunday of March each year.

We guessed that the issue might be due to Day Light Saving settings becasue in dubugging it was failing at below convert statement.

CONVERT DATE ltimestamp_imp-date TIME ltimestamp_imp-time

  INTO TIME STAMP lv_timestamp TIME ZONE timezone.

We checked DayLight Saving settings in SPRO and found an entry for UK in Variable Summer Time Rules which we guess causing the issue but not sure.

Now I am looking for 3 answers here.

1. Is it above setting that is causing the issue.

2. if Yes, what this setting mean? Does it says not to post any transaction during this time.

3. What would be advisble approach to use this FM without converion error.

Regards

Jitendra

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos

At start of summer time (BST), clocks go forward of one hour. SO there is a period of 1 hour (1AM - 2AM) that "disappear". So I think you receive/use a wrong time value in ltimestamp_imp-time, refering a time that do not exist...

e.g. : "March 30, 2014 01:15:24 AM" is an invalid value in United Kingdom (without a Doctor Who intervention of course)

NB: At end of summer time (back to GMT), clocks go backwards, SO there the same period of 1 hour that occurs twice (But your FM wont raise any error)

Regards,

Raymond

0 Kudos

Hi Raymond,

From the screen shot attached I guess this time is maintained as 2-3 AM for UK. Is my understanding correct.

Regards

Jitendra

0 Kudos

I found When do the clocks change (but if a UK resident could answer ?)


In the UK the clocks go forward 1 hour at 1am on the last Sunday in March, and back 1 hour at 2am on the last Sunday in October.

You could also start OSS search with basic keywords giving the reference note 741734 - Incorrect times due to the time zone settings and then 126692 - Daylight saving time rules are incorrect which changed rule for UK and US in 1998 (and versions til 45A no longer maintained ?)  Read also  attachment of note 198411 - Current data and information about time zones.

Regards,

Raymond