2010 Dec 08 8:43 PM
HI
I am using the FM 'RS_CONV_EX_2_IN' to convert external format to internal and when i enter as input field
P2002-BEGUZ i face dump ,the fileld is time field from pa30/20 time field. TYPE T(6)
the dump is invalid_fieldname = 15 ,
For other field of time its working . like XUMODTIME from transcation su01
So how can i overcome these issue ?
Regards
Alex
2010 Dec 08 9:09 PM
Read your FM documentation, input has to be type C....the code below returns sy-subrc = 0 and lv_time2 = 151515...
DATA: lv_time(8) TYPE c,
lv_time2 TYPE t,
ls_tab TYPE tabfield.
lv_time = '15:15:15'.
ls_tab-tabname = 'P2002'.
ls_tab-fieldname = 'BEGUZ'.
CALL FUNCTION 'RS_CONV_EX_2_IN'
EXPORTING
input_external = lv_time
table_field = ls_tab
* CURRENCY =
IMPORTING
output_internal = lv_time2
EXCEPTIONS
input_not_numerical = 1
...... (all exceptions)....
write sy-subrc.
write lv_time2.
2010 Dec 08 9:09 PM
Read your FM documentation, input has to be type C....the code below returns sy-subrc = 0 and lv_time2 = 151515...
DATA: lv_time(8) TYPE c,
lv_time2 TYPE t,
ls_tab TYPE tabfield.
lv_time = '15:15:15'.
ls_tab-tabname = 'P2002'.
ls_tab-fieldname = 'BEGUZ'.
CALL FUNCTION 'RS_CONV_EX_2_IN'
EXPORTING
input_external = lv_time
table_field = ls_tab
* CURRENCY =
IMPORTING
output_internal = lv_time2
EXCEPTIONS
input_not_numerical = 1
...... (all exceptions)....
write sy-subrc.
write lv_time2.