SAP Function Modules

NLS_GET_TIMEZONE_INFO SAP Function module - Get ABAP TimeZone Information







NLS_GET_TIMEZONE_INFO is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name NLS_GET_TIMEZONE_INFO into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SI18NTZI
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM NLS_GET_TIMEZONE_INFO - NLS GET TIMEZONE INFO





CALL FUNCTION 'NLS_GET_TIMEZONE_INFO' "Get ABAP TimeZone Information
  TABLES
    tbl_t002 =                  " ttab_t002     Language Keys
    tbl_ttzz =                  " ttab_ttzz     Time zones
    tbl_ttzzt =                 " ttab_ttzzt    Time Zones Descriptions
    tbl_ttzr =                  " ttab_ttzr     Time zone rules
    tbl_ttzd =                  " ttab_ttzd     Daylight Saving Time Rules
    tbl_ttzdf =                 " ttab_ttzdf    Fixed Daylight Saving Time Rules
    tbl_ttzdv =                 " ttab_ttzdv    Variable Daylight Saving Time Rules
    .  "  NLS_GET_TIMEZONE_INFO

ABAP code example for Function Module NLS_GET_TIMEZONE_INFO





The ABAP code below is a full code listing to execute function module NLS_GET_TIMEZONE_INFO including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_tbl_t002  TYPE STANDARD TABLE OF TTAB_T002,"TABLES PARAM
wa_tbl_t002  LIKE LINE OF it_tbl_t002 ,
it_tbl_ttzz  TYPE STANDARD TABLE OF TTAB_TTZZ,"TABLES PARAM
wa_tbl_ttzz  LIKE LINE OF it_tbl_ttzz ,
it_tbl_ttzzt  TYPE STANDARD TABLE OF TTAB_TTZZT,"TABLES PARAM
wa_tbl_ttzzt  LIKE LINE OF it_tbl_ttzzt ,
it_tbl_ttzr  TYPE STANDARD TABLE OF TTAB_TTZR,"TABLES PARAM
wa_tbl_ttzr  LIKE LINE OF it_tbl_ttzr ,
it_tbl_ttzd  TYPE STANDARD TABLE OF TTAB_TTZD,"TABLES PARAM
wa_tbl_ttzd  LIKE LINE OF it_tbl_ttzd ,
it_tbl_ttzdf  TYPE STANDARD TABLE OF TTAB_TTZDF,"TABLES PARAM
wa_tbl_ttzdf  LIKE LINE OF it_tbl_ttzdf ,
it_tbl_ttzdv  TYPE STANDARD TABLE OF TTAB_TTZDV,"TABLES PARAM
wa_tbl_ttzdv  LIKE LINE OF it_tbl_ttzdv .


"populate fields of struture and append to itab
append wa_tbl_t002 to it_tbl_t002.

"populate fields of struture and append to itab
append wa_tbl_ttzz to it_tbl_ttzz.

"populate fields of struture and append to itab
append wa_tbl_ttzzt to it_tbl_ttzzt.

"populate fields of struture and append to itab
append wa_tbl_ttzr to it_tbl_ttzr.

"populate fields of struture and append to itab
append wa_tbl_ttzd to it_tbl_ttzd.

"populate fields of struture and append to itab
append wa_tbl_ttzdf to it_tbl_ttzdf.

"populate fields of struture and append to itab
append wa_tbl_ttzdv to it_tbl_ttzdv. . CALL FUNCTION 'NLS_GET_TIMEZONE_INFO' TABLES tbl_t002 = it_tbl_t002 tbl_ttzz = it_tbl_ttzz tbl_ttzzt = it_tbl_ttzzt tbl_ttzr = it_tbl_ttzr tbl_ttzd = it_tbl_ttzd tbl_ttzdf = it_tbl_ttzdf tbl_ttzdv = it_tbl_ttzdv . " NLS_GET_TIMEZONE_INFO
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
it_tbl_t002  TYPE STANDARD TABLE OF TTAB_T002 ,
wa_tbl_t002  LIKE LINE OF it_tbl_t002,
it_tbl_ttzz  TYPE STANDARD TABLE OF TTAB_TTZZ ,
wa_tbl_ttzz  LIKE LINE OF it_tbl_ttzz,
it_tbl_ttzzt  TYPE STANDARD TABLE OF TTAB_TTZZT ,
wa_tbl_ttzzt  LIKE LINE OF it_tbl_ttzzt,
it_tbl_ttzr  TYPE STANDARD TABLE OF TTAB_TTZR ,
wa_tbl_ttzr  LIKE LINE OF it_tbl_ttzr,
it_tbl_ttzd  TYPE STANDARD TABLE OF TTAB_TTZD ,
wa_tbl_ttzd  LIKE LINE OF it_tbl_ttzd,
it_tbl_ttzdf  TYPE STANDARD TABLE OF TTAB_TTZDF ,
wa_tbl_ttzdf  LIKE LINE OF it_tbl_ttzdf,
it_tbl_ttzdv  TYPE STANDARD TABLE OF TTAB_TTZDV ,
wa_tbl_ttzdv  LIKE LINE OF it_tbl_ttzdv.


"populate fields of struture and append to itab
append wa_tbl_t002 to it_tbl_t002.

"populate fields of struture and append to itab
append wa_tbl_ttzz to it_tbl_ttzz.

"populate fields of struture and append to itab
append wa_tbl_ttzzt to it_tbl_ttzzt.

"populate fields of struture and append to itab
append wa_tbl_ttzr to it_tbl_ttzr.

"populate fields of struture and append to itab
append wa_tbl_ttzd to it_tbl_ttzd.

"populate fields of struture and append to itab
append wa_tbl_ttzdf to it_tbl_ttzdf.

"populate fields of struture and append to itab
append wa_tbl_ttzdv to it_tbl_ttzdv.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name NLS_GET_TIMEZONE_INFO or its description.