Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unicode Structure assignment problem

Former Member
0 Likes
510

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

2 REPLIES 2
Read only

Former Member
0 Likes
441

hii use this

in data statement write bkpf type objecttab-table.

your problem will be solved

OBJECTTAB-TABLE = BKPF.(Getting Unicode Error).

Read only

0 Likes
441

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