SAP TZON_GET_OFFSET Function Module for
TZON_GET_OFFSET is a standard tzon get offset SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for tzon get offset FM, simply by entering the name TZON_GET_OFFSET into the relevant SAP transaction such as SE37 or SE38.
Function Group: TZ_UTIL
Program Name: SAPLTZ_UTIL
Main Program: SAPLTZ_UTIL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TZON_GET_OFFSET pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'TZON_GET_OFFSET'".
EXPORTING
IF_TIMEZONE = "Time Zone
IF_LOCAL_DATE = "Field of Type DATS
IF_LOCAL_TIME = "Field of type TIMS
IMPORTING
EF_UTCDIFF = "Difference of time zone from UTC (w/o Summer time)
EF_UTCSIGN = "Difference of time zone from UTC (w/o Summer time)
EF_IS_IN_DST = "
EXCEPTIONS
CONVERSION_ERROR = 1
IMPORTING Parameters details for TZON_GET_OFFSET
IF_TIMEZONE - Time Zone
Data type: TIMEZONEOptional: No
Call by Reference: Yes
IF_LOCAL_DATE - Field of Type DATS
Data type: DATSOptional: No
Call by Reference: Yes
IF_LOCAL_TIME - Field of type TIMS
Data type: TIMSOptional: No
Call by Reference: Yes
EXPORTING Parameters details for TZON_GET_OFFSET
EF_UTCDIFF - Difference of time zone from UTC (w/o Summer time)
Data type: TZNUTCDIFFOptional: No
Call by Reference: Yes
EF_UTCSIGN - Difference of time zone from UTC (w/o Summer time)
Data type: TZNUTCSIGNOptional: No
Call by Reference: Yes
EF_IS_IN_DST -
Data type: XFLAGOptional: No
Call by Reference: Yes
EXCEPTIONS details
CONVERSION_ERROR - Error During Translation
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TZON_GET_OFFSET Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_ef_utcdiff | TYPE TZNUTCDIFF, " | |||
| lv_if_timezone | TYPE TIMEZONE, " | |||
| lv_conversion_error | TYPE TIMEZONE, " | |||
| lv_ef_utcsign | TYPE TZNUTCSIGN, " | |||
| lv_if_local_date | TYPE DATS, " | |||
| lv_ef_is_in_dst | TYPE XFLAG, " | |||
| lv_if_local_time | TYPE TIMS. " |
|   CALL FUNCTION 'TZON_GET_OFFSET' " |
| EXPORTING | ||
| IF_TIMEZONE | = lv_if_timezone | |
| IF_LOCAL_DATE | = lv_if_local_date | |
| IF_LOCAL_TIME | = lv_if_local_time | |
| IMPORTING | ||
| EF_UTCDIFF | = lv_ef_utcdiff | |
| EF_UTCSIGN | = lv_ef_utcsign | |
| EF_IS_IN_DST | = lv_ef_is_in_dst | |
| EXCEPTIONS | ||
| CONVERSION_ERROR = 1 | ||
| . " TZON_GET_OFFSET | ||
ABAP code using 7.40 inline data declarations to call FM TZON_GET_OFFSET
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects