ABAP FMS to get Chinese Beijing time,China

Today, We need to get the Beijing Time in SAP system.

As we know beijing is in UTC+8.

So below is the sample code fms to get time.

 

Hope you like this.

FUNCTION ZFM_GET_BEIJING_TIMES.

*”———————————————————————-
*”*” 
*”  EXPORTING
*”     VALUE(O_DATUM) TYPE  SY-DATUM
*”     VALUE(O_UZEIT) TYPE  SY-UZEIT
*”———————————————————————-
DATAl_tzone     TYPE syzonlo VALUE ‘UTC+8’,
l_timestamp TYPE timestamp.
GET TIME STAMP FIELD l_timestamp.
CONVERT TIME STAMP l_timestamp TIME ZONE l_tzone
INTO DATE o_datum TIME o_uzeit.

 


You can get any time zone times if you pass the value as below rules.

Australian Central Daylight Savings Time-UTC+10:30
Australian Central Standard Time-UTC+9:30
Acre Time-UTC-5
Australian Central Western Standard Time-UTC+8:45
Atlantic Daylight Time-UTC-3
Australian Eastern Daylight Savings Time-UTC+11
Australian Eastern Standard Time-UTC+10
Afghanistan Time-UTC+4:30
Alaska Daylight Time-UTC-8
Alaska Standard Time-UTC-9
Amazon Summer Time-UTC-3
Amazon Time-UTC-4
Armenia Time-UTC+4
Argentina Time-UTC-3
Atlantic Standard Time-UTC-4
Arabia Standard Time-UTC+3
Atlantic Time-UTC-4/UTC-3
Australian Western Standard Time-UTC+8
Azores Summer Time-UTC+0
Azores Standard Time-UTC-1
Azerbaijan Time-UTC+4
Brunei Time-UTC+8
Baker Island Time-UTC-12
Brunei Darussalam Time-UTC+8
Bolivia Time-UTC-4
Brasilia Summer Time-UTC-2
Brasilia Time-UTC-3
British Summer Time-UTC+1
Bangladesh Standard Time-UTC+6
Bougainville Standard Time-UTC+11
Bhutan Time-UTC+6
Central Africa Time-UTC+2
Cocos Islands Time-UTC+6:30
Central Daylight Time-UTC-5
Cuba Daylight Time-UTC-4
Central European Summer Time-UTC+2
Central European Time-UTC+1
Chatham Daylight Time-UTC+13:45
Chatham Standard Time-UTC+12:45
Choibalsan Summer Time-UTC+9
Choibalsan Standard Time-UTC+8
Chamorro Standard Time-UTC+10
Chuuk Time-UTC+10
Clipperton Island Standard Time-UTC-8
Central Indonesia Time-UTC+8
Cook Island Time-UTC-10
Chile Summer Time-UTC-3
Chile Standard Time-UTC-4
Colombia Summer Time-UTC-4
Colombia Time-UTC-5
Central Standard Time-UTC-6
Cuba Standard Time-UTC-5
China Standard Time-UTC+8
Central Time-UTC-6/UTC-5
Cape Verde Time-UTC-1
Central Western Standard Time-UTC+8:45
Christmas Island Time-UTC+7
Davis Time-UTC+7
Dumont d’Urville Time-UTC+10
Easter Island Summer Time-UTC-5
Easter Island Standard Time-UTC-6
East Africa Time-UTC+3
Ecuador Time-UTC-5
Eastern Daylight Time-UTC-4
Eastern European Summer Time-UTC+3
Eastern European Time-UTC+2
Eastern Greenland Summer Time-UTC+0
Eastern Greenland Time-UTC-1
Eastern Indonesian Time-UTC+9
Eastern Standard Time-UTC-5
Eastern Time-UTC-5/UTC-4
Further-eastern European Time-UTC+3
Fiji Time-UTC+12
Falkland Islands Summer Time-UTC-3
Falkland Islands Time-UTC-4
Fernando de Noronha Time-UTC-2
Galapagos Time-UTC-6
Gambier Islands-UTC-9
Georgia Standard Time-UTC+4
French Guiana Time-UTC-3
Gilbert Island Time-UTC+12
Gambier Island Time-UTC-9
Greenwich Mean Time-UTC+0
Gulf Standard Time-UTC+4
South Georgia Time-UTC-2
Guyana Time-UTC-4
Hawaii-Aleutian Daylight Time-UTC-9
Hawaii-Aleutian Standard Time-UTC-10
Hong Kong Time-UTC+8
Heard and McDonald Islands Time-UTC+5
Khovd Summer Time-UTC+8
Khovd Standard Time-UTC+7
Indochina Time-UTC+7
Israel Daylight Time-UTC+3
Indian Chagos Time-UTC+6
Iran Daylight Time-UTC+4:30
Irkutsk Time-UTC+8
Iran Standard Time-UTC+3:30
Indian Standard Time-UTC+5:30
Irish Standard Time-UTC+1
Israel Standard Time-UTC+2
Japan Standard Time-UTC+9
Kyrgyzstan time-UTC+6
Kosrae Time-UTC+11
Krasnoyarsk Time-UTC+7
Korea Standard Time-UTC+9
Lord Howe Daylight Time-UTC+11
Lord Howe Standard Time-UTC+10:30
Line Islands Time-UTC+14
Magadan Time-UTC+11
Marquesas Islands Time-UTC-9:30
Mawson Station Time-UTC+5
Mountain Daylight Time-UTC-6
Marshall Islands-UTC+12
Macquarie Island Station Time-UTC+11
Marquesas Islands Time-UTC-9:30
Myanmar Standard Time-UTC+6:30
Moscow Time-UTC+3
Mountain Standard Time-UTC-7
Malaysia Standard Time-UTC+8
Mountain Time-UTC-7/UTC-6
Mauritius Time-UTC+4
Maldives Time-UTC+5
Malaysia Time-UTC+8
New Caledonia Time-UTC+11
Newfoundland Daylight Time-UTC-2:30
Norfolk Time-UTC+11
Nepal Time-UTC+5:45
Nauru Time-UTC+12
Newfoundland Standard Time-UTC-3:30
Newfoundland Time-UTC-3:30
Niue Time-UTC-11
New Zealand Daylight Time-UTC+13
New Zealand Standard Time-UTC+12
Omsk Time-UTC+6
Oral Time-UTC+5
Pacific Daylight Time-UTC-7
Peru Time-UTC-5
Kamchatka Time-UTC+12
Papua New Guinea Time-UTC+10
Phoenix Island Time-UTC+13
Philippine Standard Time-UTC+8
Philippine Time-UTC+8
Pakistan Standard Time-UTC+5
Saint Pierre and Miquelon Daylight time-UTC-2
Saint Pierre and Miquelon Standard Time-UTC-3
Pohnpei Standard Time-UTC+11
Pacific Standard Time-UTC-8
Pacific Time-UTC-8/UTC-7
Palau Time-UTC+9
Paraguay Summer Time-UTC-3
Paraguay Time-UTC-4
Réunion Time-UTC+4
Rothera Research Station Time-UTC-3
Sakhalin Island time-UTC+11
Samara Time-UTC+4
South African Standard Time-UTC+2
Solomon Islands Time-UTC+11
Seychelles Time-UTC+4
Singapore Time-UTC+8
Sri Lanka Standard Time-UTC+5:30
Srednekolymsk Time-UTC+11
Suriname Time-UTC-3
Samoa Standard Time-UTC-11
Showa Station Time-UTC+3
Tahiti Time-UTC-10
French Southern and Antarctic Time-UTC+5
Thailand Standard Time-UTC+7
Tajikistan Time-UTC+5
Tokelau Time-UTC+13
Timor Leste Time-UTC+9
Turkmenistan Time-UTC+5
Tonga Time-UTC+13
Turkey Time-UTC+3
Tuvalu Time-UTC+12
Ulaanbaatar Summer Time-UTC+9
Ulaanbaatar Standard Time-UTC+8
Kaliningrad Time-UTC+2
Coordinated Universal Time-UTC
Uruguay Summer Time-UTC-2
Uruguay Standard Time-UTC-3
Uzbekistan Time-UTC+5
Venezuelan Standard Time-UTC-4
Vladivostok Time-UTC+10
Volgograd Time-UTC+4
Vostok Station Time-UTC+6
Vanuatu Time-UTC+11
Wake Island Time-UTC+12
West Africa Summer Time-UTC+2
West Africa Time-UTC+1
Western European Summer Time-UTC+1
Western European Time-UTC+0
Wallis and Futuna Time-UTC+12
West Greenland Time-UTC-3
West Greenland Summer Time-UTC-2
Western Indonesia Time-UTC+7
Eastern Indonesia Time-UTC+9
Western Standard Time-UTC+8
Yakutsk Time-UTC+9
Yekaterinburg Time-

About me:

This post is come from www.hot583.com, you can share/use it with the post  original link for free.

But pay attention of any  risk yourself.

微信原文《The End》

今日热点在看SAP HOT583