‎2007 Feb 16 5:49 PM
Hello,
I am working on ECC 6.0, SAP ABAP/BASIS ver 7.0.
I have got a problem in table maintenance.
I am trying to use the event 01 of table generator.
My table has got a decimal field.
There I am writing this code snippet.
It is given in SAP help
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
LOOP AT TOTAL.
IF <ACTION> = 'N'.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
*******(make desired changes to the line TOTAL)
*#############Code written by me##############
MOVE total TO ztable.
SELECT SINGLE name1 FROM kna1 INTO ztable-name1
WHERE kunnr = ztable-kunnr.
MOVE ztable TO total.
*#############end of my code############
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM.
Now on execution of this code I am getting a dump on line.
MOVE total TO ztable.
The dump message is "UC_OBJECTS_NOT_CONVERTIBLE"
Now when I am changing the field in the table from decimal to Numc type it is working fine.
I have two questions-
1. Are decimal numbers not supported by Unicode?
2. If they are supported, then how should I change my code to handle them ( Do they have to be converted to Char type ) ?
Regards,
Mayank
‎2007 Feb 16 5:58 PM
Hi,
When you write the MOVE statment, that should be Charecter type or Numeric in Unicode ..
Regards
Sudheer
‎2007 Feb 16 6:03 PM
Hello Sudheer,
Thanks for your reply but my questions are regarding decimal points.
The questions are -
1. Are decimal numbers not supported by Unicode?
2. If they are supported, then how should I change my code to handle them ( Do they have to be converted to Char type ) ?
Regards,
Mayank
‎2007 Feb 16 6:11 PM
Hi,
As per my knowledge,
1) you can use the MOVE statment to Decimals in Unicode
2) You need to convert it to Char type before moving that field
Regards
Sudheer
‎2007 Feb 16 6:31 PM
Hello Sudheer,
While moving the values, I am capturing DEC field in CHAR.
Now it is working fine.
Regards,
Mayank