‎2007 Jan 16 6:04 AM
Hi All,
I am working on conversion of ABAP programs from non Unicode version to Unicode version.I am getting error when I assign general structure to particular table.
For example:
DATA : BEGIN OF OBJECTTAB OCCURS 1.
INCLUDE STRUCTURE CLTABLE.
DATA : END OF OBJECTTAB.
MODIFY OTAB INDEX 1.
IF CALLED_FROM = '2'.
OBJECTTAB-TNAME = 'BKPF'.
OBJECTTAB-TABLE = BKPF.(Getting Unicode Error).
APPEND OBJECTTAB.
CALL FUNCTION 'CTMS_OBJECT_AREA'
TABLES
OBJECTS = OBJECTTAB.
ENDIF.
I know to solve this problem by equalizing the both the structures like
OBJECTTAB-TABLE(4096) = BKPF(4096). But my problem is can we make generalized statement by using field strings so that I can assign different tables later part of the program.
For example
MODIFY OTAB INDEX 1.
REFRESH OBJECTTAB.
IF CALLED_FROM = '2'.
OBJECTTAB-TNAME = 'VBKF'.
OBJECTTAB-TABLE = VBKF.(Getting Unicode Error).
APPEND OBJECTTAB.
CALL FUNCTION 'CTMS_OBJECT_AREA'
TABLES
OBJECTS = OBJECTTAB.
ENDIF.
Appreciate your help in this problem.
Thanks in advance.
Regards,
Ameer Baba
‎2007 Jan 16 8:45 AM
hii use this
in data statement write bkpf type objecttab-table.
your problem will be solved
OBJECTTAB-TABLE = BKPF.(Getting Unicode Error).
‎2007 Jan 16 9:00 AM
See the structure of BJECTTAB and make it to character type. basically Unicode does not support non-char type flds. in the statements with '='
reward points if it is helpful