‎2006 Nov 18 3:34 PM
Hi,
if I want to convert text field to internal value I can use FM CONVERSION_EXIT_xyz_INPUT if there is a conversion exit.
Simple date, time and numeric fields get converted automatically. Is there a way to do this conversion without a screen field?
TNX,
Clemens
‎2006 Nov 18 3:49 PM
Hi
What are you exactly meaning?
U can write a code to convert the data before showing it and convert it again after showing it.
These code won't triggered automatically, of course.
Max
‎2006 Nov 18 3:59 PM
Max,
I'd like to use the same routine the system uses when converting implicitly. i.e. time in fomat 16:15 will become 161500 internally or 21.03.2006 will become 20060321 or 100,123.26 in US or 100.123,26 will be 100123.260 internal.
As far as I know, this is down in the screen processor and can not be used by ABAP, but who knows exactly. Still have not lost my hope.
Regards,
Clemens
‎2006 Nov 18 4:46 PM
Hi
U should convert tha data by yourself, if know the kind of data you should know which convertion you need to do.
Anyway try this:
CALL FUNCTION 'CONVERT_TIME_INPUT'
EXPORTING
INPUT = '20:30:11'
* PLAUSIBILITY_CHECK = 'X'
IMPORTING
OUTPUT = TIME
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
WRONG_FORMAT_IN_INPUT = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: DATE TYPE SY-DATUM.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = '19.11.2006'
IMPORTING
DATE_INTERNAL = DATE
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Max
‎2006 Nov 22 9:48 AM
Ok, the answer is: Although there is some software doing implit I/O conversion for ABAP simple types, you can not use them from ABAP dynamic or static.
Not just satisfying and still I believe there must be a way to call respective kernel function.
Life goes on,
Clemens