06-26-2006 9:48 AM
hi,
what are the parameters for this FM? & their data types.
Ananda
06-26-2006 9:52 AM
Hi
This is the interface:
FUNCTION SD_DATETIME_DIFFERENCE.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(DATE1) TYPE D
*" VALUE(TIME1) TYPE T
*" VALUE(DATE2) TYPE D
*" VALUE(TIME2) TYPE T
*" EXPORTING
*" VALUE(DATEDIFF) TYPE P
*" VALUE(TIMEDIFF) TYPE P
*" VALUE(EARLIEST) TYPE C
*" EXCEPTIONS
*" INVALID_DATETIME
So the type D is datum (so those parameters are dates), type T is for time, type P is for number.
Max
06-26-2006 9:49 AM
Hi herath,
1. The parameters of type
DATE and TIME only.
D = Date
T = Time
regards,
amit m.
06-26-2006 9:50 AM
Hi,
data and time are the parameters for the input..
eg:
date1 = 25.06.2006
time1 = 02.21.90
date2 = 26.06.2006
time2 = 02.25.90
Cheers,
Simha.
06-26-2006 9:52 AM
Hi,
Importing parameter are date and time only.
Exporting Parameter ARE PACKED NUMBER AND CHAR
06-26-2006 9:52 AM
Hi
This is the interface:
FUNCTION SD_DATETIME_DIFFERENCE.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(DATE1) TYPE D
*" VALUE(TIME1) TYPE T
*" VALUE(DATE2) TYPE D
*" VALUE(TIME2) TYPE T
*" EXPORTING
*" VALUE(DATEDIFF) TYPE P
*" VALUE(TIMEDIFF) TYPE P
*" VALUE(EARLIEST) TYPE C
*" EXCEPTIONS
*" INVALID_DATETIME
So the type D is datum (so those parameters are dates), type T is for time, type P is for number.
Max
06-26-2006 9:53 AM
Hi,
The parameters for this FM are
DATE1 type d
TIME1 type t
DATE2 type d
TIME2 type t
Exporting param
DATEDIFF type p
TIMEDIFF type p
Rgds,
prakash
06-26-2006 9:54 AM
Hi,
This FM takes two date and two time and returns the difference between the two.
You have to pass all the 4 values to get the result
Sameena
06-26-2006 9:58 AM
Hai Ananda
Check the following Code
Data : tndr_expd type dats,
tndr_expt type tims.
DATA earliest.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
EXPORTING
DATE1 = p_zvttk-tndr_expd
TIME1 = p_zvttk-tndr_expt
DATE2 = sy-datlo
TIME2 = sy-timlo
IMPORTING
EARLIEST = earliest
EXCEPTIONS
INVALID_DATETIME = 1
OTHERS = 2.
IF earliest = '1'.
p_status = overdue.
ENDIF.
Thanks & regards
Sreenivasulu P
07-23-2010 11:46 AM
Hello,
The problem with this function module is:
1. It will return only the Days and Hours. It will not give the minutes and seconds.
2. If one time is not available then it will not return anything. Therefore all 4 fields must have some values other than 0.
Can someone please tell me if i can get the Minutes and Seconds also ? This function is still lagging with the Minutes and seconds though it gets the minutes and seconds in the input field.
Thanks.