cancel
Showing results for 
Search instead for 
Did you mean: 

Timezone in SF integration

Former Member
0 Kudos

Hello All,

we are integrating the employee data from ECC to SF using the transaction HRSFI_SYNCH_EMP_DATA.

We get the issue with the field Timezone.

As per the documentation we have two options

Option 1: select "User Data" for time zone and the system will fetch data from user ID of the pernr. This will not suite our system because the time zones are not maintained for all the Users in SAP.

Option 2: Select "Own Implementation". We have implemented the Badi (HRSFI_B_EMPL_DATA_REPLICATION) and menthod (GET_TIMEZONE). The country and region of the employee is fetched form IT0006-Permanent Address and passed to the standard FM TZ_LOCATION_TIMEZONE to find the timezone.

But apparently all the timezones in SAP are not available/valid in SF. Due to this, SF is not accepting the SAP time zone values we are passing for some of the countries.

If any one has come across a similar issue, please guide us to solve this.

Appreciate your response.

Thanks,

Krishna.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Krishna,

I had a similar issue for GMT time zone, since we are only using GMT for now  I added the custom implementation and added a tweak.

Our issue was two-fold, when using GMT time zone, the UTC difference is calculated (this varied if BST) and if 0 (meaning CET time) the text returned was 'Africa/Casablanca'. The difference is then used to select the relevant mapping value in a hard-coded case block,

.

The default text for GMT (if working correctly) is also 'Europe/Berlin' which is not what SFSF expects so I overrode the returned mapping which fixed all out issues.

The code went something like this:

" added override to fix Africa/Casablanca issue
  
if lv_timezone eq 'GMTUK' and ( lv_utcdiff eq '000000' or lv_utcdiff eq '010000' ).
     lv_utcdiff
= 'Z10000'.
  
endif.

  
CASE lv_utcsign.

    
WHEN '+'.

      
CASE lv_utcdiff.
        
WHEN 'Z10000'. " added override since there is no Europe/London
           rv_value
= 'Europe/London'.
        
WHEN '000000'.
           rv_value
= 'Africa/Casablanca'.                   "#EC NOTEXT
        
WHEN '010000'.
           rv_value
= 'Europe/Berlin'.                       "#EC NOTEXT

I have found other issues as well so I have been compiling feedback across a number of points related to integrating using HCI with the SAP team in Germany.

If you are using multiple timezones and have identified more than a few incorrect mappings, a Z mapping table might be the way to go.  I presumed once highlighted with SAP there would be another patch which would overwrite the current implementation, so I just added a few tweaks in the custom method.

Hope that helps.

Regards,

Malcolm

Answers (2)

Answers (2)

Former Member
0 Kudos

The issue is solved by a new mapping table in ECC.

In the Time Zone BAdi, code is implemented to fetch the Country/Region from IT0006 and fetch the corresponding timezone in SF format (Australia/ACT) from the custom mapping table.

Thanks,

Krishna.

lukemarson
Active Contributor
0 Kudos

Hi Krishna,

SuccessFactors supports around 590 time zones so I'm surprised they don't map. I would take a deeper look at your BAdI implementation and review the logic. It might be that there is just some missing mapping taking place.

Good luck!

Luke

Former Member
0 Kudos

Hello Luke,

Thanks for your support.

The logic in the BAdI is very simple and here it is.

1. Fetch the country and state of the Permanent Address of the employee (IV_PERNR) from IT0006.

2. Fetch the timezone using the std FM 'TZ_LOCATION_TIMEZONE' passing the country and state fetched in step 1.

the std FM used in Step2 fetches the Time Zone from table TTZ5S (Assign time zones to regions).

Eg: Country AU; Region ACT has the time zone AUSACT in SAP, but SF is not ready to take that. And SF is expecting "Australia/ACT"

The synch works perfect when the SAP and SF timezones are same, i.e., the time zone is CET in both SAP and SF for country AT state ST and the data synchs good for this PERNR.

The last option is to maintain a custom mapping table for the time zones in SAP and that in SF. But want to know if there is a standard way of doing this.

Thanks,

Krishna