2012 Aug 17 5:27 AM
Hi,
I have a string like say, "28.08.2012 21:30:00". I need the entire string to be converted into a decimal value as it is. How do I proceed with this? I'm new to ABAP.
Regards,
Ninaada
2012 Aug 17 5:37 AM
Try replacing the specialn character using REPLACE statement and then move the content to a
decimal variable.
2012 Aug 17 5:50 AM
2012 Aug 17 5:54 AM
2012 Aug 17 5:56 AM
Hi,
Try this.
DATA: p1 TYPE string VALUE '28.08.2012 21:30:00'.
DATA: p2 type p DECIMALS 1 .
REPLACE ALL OCCURRENCES OF '.' in p1 WITH SPACE.
REPLACE ALL OCCURRENCES OF ':' in p1 WITH SPACE.
CONDENSE P1 NO-GAPS.
P2 = P1.
WRITE P2.
Regards,
Riyas.
2012 Aug 17 9:08 AM