hi all,
can one of you resolve this issue for me.
i have a table control on a screen which has one field as a currency field (afrv-hrbet).
i also have a separate I/O field on the screen of the same type as the table control currency field.
i am supplying values to both of these from the program (module pool). the trouble comes when i try to supply negative values....the I/O field accepts and displays the negative value but the table control field does not do so and execution ends up giving a dump for a conversion failure.
plz let me know why this is happening.
here is a test code extract in the module pool
DATA : BEGIN OF itab OCCURS 0,
fld1(10),
fld2(10),
fld3(10),
fld4 TYPE afrv-hrbet,
sel TYPE c,
END OF itab.
afrv-hrbet = '-100'.
*this is the I/O field that refers to dict definition,
*the table control field (itab-fld4) does not..it picks *up its type from the program....is this the issue?????
itab-fld1 = 'abc'.
itab-fld2 = 'abc'.
itab-fld3 = '100'.
itab-fld4 = '100'.
APPEND itab.
itab-fld1 = 'pqr'.
itab-fld2 = 'pqr'.
itab-fld3 = '200'.
itab-fld4 = '200'.
APPEND itab.
************************the above code runs fine but the following gives a dump
itab-fld1 = 'abc'.
itab-fld2 = 'abc'.
itab-fld3 = '100'.
itab-fld4 = '-100'.
APPEND itab.
itab-fld1 = 'pqr'.
itab-fld2 = 'pqr'.
itab-fld3 = '200'.
itab-fld4 = '-200'.
APPEND itab.
regards,
PJ