2021 Oct 05 8:03 AM
Do any Function module is available for converting the Date into floating point value. I have tried using FM- CTCV_CONVERT_DATE_TO_FLOAT but straight away using it is not working.
Can some help me is there any custom logic/ code additionally to be written along with this FM
Regards
Akshay
Do any Function module is available for converting the Date into floating point value. I have tried using FM- CTCV_CONVERT_DATE_TO_FLOAT but straight away using it is not working.
Can some help me is there any custom logic/ code additionally to be written along with this FM
Regards
Akshay
2021 Oct 05 8:57 AM
2021 Oct 05 9:04 AM
2021 Oct 05 9:30 AM
Converting to a timestamp gives a decimal number. Is that what you mean? Look up the abap keyword documentation for CONVERT.
2021 Oct 05 10:23 AM
This conversion works well as you can see, no need of a function module!
DATA(float) = CONV f( CONV d( '20211005' ) ).
ASSERT float = 738069.
2021 Oct 05 1:14 PM
Hello experts,
Thank you for your suggestions
I am trying to convert the date format into the float format.
This I am doing as I need to pass the dates through IT-AUSP table ATFLV Field.
And the date is user input (SY-Datum) while datatype of ATFLV field is Float. So conversion needed.
Please suggest
Regards
Akshay
2021 Oct 05 1:23 PM
As you can see in my answer, the date format is converted into the float format. Or maybe you expect a different conversion method?
2021 Oct 05 1:45 PM
Or in fact, maybe you don't want any value conversion?
DATA(date) = CONV d( '20211005' ).
DATA(ausp) = VALUE ausp( atflv = CONV string( date ) ).
ASSERT ausp-atflv = 20211005.
2021 Oct 06 6:41 AM