2008 Mar 27 5:17 PM
HELLO!
PLS CAN SOMEBODY EXPLAIN TO ME
HOW IS THE HANDLING OF DATE AS
FLOAT VALUE. WHICH SENSE DOES IT
MAKE TO STORE DATE AS FLOAT VALUE
AND CONVERT IT LATER A.S.
REGARDS
ERTAS
HELLO!
PLS CAN SOMEBODY EXPLAIN TO ME
HOW IS THE HANDLING OF DATE AS
FLOAT VALUE. WHICH SENSE DOES IT
MAKE TO STORE DATE AS FLOAT VALUE
AND CONVERT IT LATER A.S.
REGARDS
ERTAS
2008 Mar 27 5:22 PM
I have seen in some applcations that date is stored to the left of the decimal and time to the right.
But not in an SAP application.
2008 Mar 27 5:25 PM
hello why is the FM CTCV_CONVERT_FLOAT_TO_DATE
existing if so ?
Thx
ertas
2008 Mar 27 5:33 PM
Use this to convert date : CTCV_CONVERT_DATE_TO_FLOAT
Code: tables: cawn.
DATA: Y_PACK(16) TYPE P,
date(30) value '12032008'.
data: float1 type CAWN-ATFLV.
PACK DATE TO Y_PACK.
FLOAT1 = Y_PACK.
write:/ float1.
Edited by: S@N on Mar 27, 2008 6:42 PM
2008 Mar 27 5:39 PM
go to SE37 and enter CTCV_CONVERT_FLOAT_TO_DATE . Use the "Where Used" Button and run it. Seems the use it to calculate a shelf life.
2008 Mar 27 6:05 PM
hi use this...
data: test LIKE CAWN-ATWRT value '20080327',
out like CAWN-ATFLV .
CALL FUNCTION 'CTCV_CONVERT_DATE_TO_FLOAT'
EXPORTING
DATE = test
IMPORTING
FLOAT = out.
write:/ out.
.
regards,
venkat
2008 Mar 27 7:28 PM
hi venkat appikonda
can you give me also an example
with
CTCV_CONVERT_FLOAT_TO_DATE
Regards
ilhan
2008 Mar 27 7:43 PM
hi this may be used some times if the date format is like yyyymmdd other wise this is used ...
data: a type f,
n(8) type n,
b type DATUM,
c(10) type c.
a = '2.0060315000000000E+07'.
n = a.
b = n.
write b to c.
write:/ c.
hi it is no where used in the abap..programs , fms ,classes....
reagrds,
venkat.