Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module to calculate the current time ?

Former Member
0 Likes
4,356

Hello People,

Question 1: Wat is the function module to calculate the current time, and give the system variable in alv list header. I dont want to use this system variable SY-UZEIT to get the time ... I need a function module to generate the system time ...

Question 2 : List Header is printing to the right hand side and contents are getting printed in the left hand side ... I want the header list to be printed to the left and contents to be printed towards the right ... Please help ... No links please ... I wud be generous if I get the right answer ...

Thanks in advance ...

Cheers ...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,860

Hi

Answer 1: use F.M GET_SYSTEM_TIME_REMOTE. use paramater L_DATE and L_TIME.

for Question 2: How you are creating alv: using F.M or class cl_gui_alv_grid or cl_salv_table ?

Thanks

Vishal kapoor

Edited by: vishal kapoor on Nov 27, 2008 12:08 PM

10 REPLIES 10
Read only

Former Member
0 Likes
2,860

Hi,

BORRS_LOCATION_TIMEZONE

TZ_LOCATION_TIMEZONE Time zones: Determine time zone for a location (land, region)

Edited by: Neenu Jose on Nov 27, 2008 7:34 AM

Read only

0 Likes
2,860

Can u explain the functionality of this function module in detail and how to give values to this function module .

BORRS_LOCATION_TIMEZONE. will my problem be solved with this function module.

thanks ...

Read only

0 Likes
2,860

hi nenu ,

this FM is coming as it does not exists ..

is'nt this a standard FM. ???

Read only

0 Likes
2,860

Hi

get county and zip code importing parameters from table TTZ5Z

get region from table T005S as per your country.

pass these three parameters to your F.M

Thanks

Vishal Kapoor

Read only

0 Likes
2,860

Hi Prashanti , This FM is available in ECC 6.0 which version u r using ?

Read only

0 Likes
2,860

Hi Vishal,

I've declared two variables

DATA: LDATE(20),

LTIME(20).

CALL FUNCTION 'GET_SYSTEM_TIME_REMOTE'

IMPORTING

  • K_DATE =

  • K_TIME =

L_DATE = LDATE

L_TIME = LTIME

AND IN THE FORM HEADER I'VE GIVEN IT AS,

WA_HEADER-TYP = 'S'.

WA_HEADER-INFO = ': Date'.

WA_HEADER-KEY = LDATE.

APPEND WA_HEADER TO IT_HEADER.

WA_HEADER-TYP = 'S'.

WA_HEADER-INFO = ': Time'.

WA_HEADER-KEY = LTIME.

APPEND WA_HEADER TO IT_HEADER.

STILL IM NOT GETTING WAT ELSE IS REQUIRED ?

Read only

agnihotro_sinha2
Active Contributor
0 Likes
2,860

hi,

try using OIL_GET_CURRENT_DATE_TIME..

Read only

Former Member
0 Likes
2,861

Hi

Answer 1: use F.M GET_SYSTEM_TIME_REMOTE. use paramater L_DATE and L_TIME.

for Question 2: How you are creating alv: using F.M or class cl_gui_alv_grid or cl_salv_table ?

Thanks

Vishal kapoor

Edited by: vishal kapoor on Nov 27, 2008 12:08 PM

Read only

Former Member
0 Likes
2,860

Hi,

Please go thru the link once where u have a list of function modules which will surely help you:

http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm.

Regards,

Rahul

Read only

Former Member
0 Likes
2,860

HI

If you want current time, u can use

data : lv_endtime type zcreatedtime.

get time field lv_endtime.