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

strange matter

Former Member
0 Likes
999

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

7 REPLIES 7
Read only

Former Member
0 Likes
965

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.

Read only

Former Member
0 Likes
965

hello why is the FM CTCV_CONVERT_FLOAT_TO_DATE

existing if so ?

Thx

ertas

Read only

0 Likes
965

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

Read only

0 Likes
965

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.

Read only

Former Member
0 Likes
965

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

Read only

Former Member
0 Likes
965

hi venkat appikonda

can you give me also an example

with

CTCV_CONVERT_FLOAT_TO_DATE

Regards

ilhan

Read only

0 Likes
965

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.