Challenge – In projects where multiple timezones are involved in assessing Date/Timestamp, one of the challenge is posed when a local timezone information is requested on an invoice form or any document like that.

Solution: SAP provides two standard FMs. IB_CONVERT_INTO_TIMESTAMP converts the local time to GMT. To identify local timezone SY-ZONLO can be used. The resultant Date/Timestamp is in GMT which can be converted into desired Date/Timestamp using FM IB_CONVERT_FROM_TIMESTAMP by passing GMT Date/Timestamp.

One question remains – how do I identify desired timezone for desired Date/Timestamp? Answer lies in ADRC table which has a field TIME_ZONE. This field should be populated. If that information is not populated, using Country-State relationship and FM TZ_LOCATION_TIMEZONE can be found. It is helpful most of the times.