‎2010 Mar 30 7:21 PM
Hi Gurus,
Issue: At present the Shipment Execution time is defaulting to Local Time but the requirement is to always populate Eastern Standard Time (EST). Right now if the shipment creates in US West coast, shipment Execution Date and Time populates with that local time but I need to populate EST.
I need a function module which will take input as 'Time Zone' like EST and return Date and Time (OR) the input could be 'Country' and State and return the local time.
Thanks in Advance.
Regards,
ananth.
‎2010 Mar 30 7:41 PM
Check this FM if of any help
TZ_LOCATION_TIMEZONE
[http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFTIM/CAGTFTIM.pdf]
[http://abaplog.wordpress.com/2007/02/19/handling-date-and-time-on-sap-systems-running-across-multiple-time-zones/]
‎2010 Mar 30 7:44 PM
Here is your solution.
The function module IB_CONVERT_INTO_TIMESTAMP is used to convert the time to the GMT. The input parameters are DATE, TIME and the TIMEZONE(user's time zone, default value SY-ZONLO). The output parameter is the timestamp in GMT.
The function module IB_CONVERT_FROM_TIMESTAMP is used to get the time in required time zone. The input parameters for this are the timestamp obtained from the above function module and the time zone, to which the time needs to be converted.
The output parameters are the date, time in the required time zone.