06-19-2007 10:42 PM
I have field which is Char type. The input to this field will be date format. How to convert to the date input to CHAR or make to CHAR to accept DATE as input.
06-19-2007 10:51 PM
It would be better to define a field of type date.
You can declare a field like:
Parameters : p_date like sy-datum.
And then convert it into char field.
write p_date to v_char.
Or
<b>If you want to convert char field to date, you can use function CONVERSION_EXIT_IDATE_INPUT</b>
06-19-2007 10:57 PM
The field is under select options we can enter a range....
How to acheive it.
06-19-2007 11:03 PM
<b>select-options : s_date for sy-datum.</b>
And then convert it into char field.
write s_date-low to v_char.
or if you have multiple dates then.
loop at s_date.
write s_date-low to ..
write s_date-high to...
endloop.
or if you still want to go with the character field on the screen.
LOOP AT S_DATE.
CALL FUNCTION CONVERSION_EXIT_IDATE_INPUT
EXPORTING INPUT = S_DATE-LOW
IMPORTING OUTPUT = V_DATE1.
CALL FUNCTION CONVERSION_EXIT_IDATE_INPUT
EXPORTING INPUT = S_DATE-HIGH
IMPORTING OUTPUT = V_DATE2.
<b>* Here may you be you can write code to append these 2 fields to other internal table.</b>
ENDLOOP.
Can you give me the exact logic, how you want to use these fields.
06-20-2007 12:14 AM