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 move tables

Former Member
0 Likes
936

Hi i'm checkin unicode in some reports and i have a question.

i have this instruction: tg_p0008_i[] = tg_p0092_i[]., and the new version tell me that it isn't unicode compatible, i need know how i can make this in the new version, sorry for my english.

Edited by: helios garcia on Feb 4, 2009 3:49 PM

Edited by: helios garcia on Feb 4, 2009 3:50 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
874

Hi,

This will help you...

Moving contents from one structure to another

Before Unicode:

SRTFDLOW = XSRTFDLOW.

Resolution:

CLASS CL_ABAP_CONTAINER_UTILITIES DEFINITION LOAD.

DATA: LV_TAB(1000) TYPE C.

CALL METHOD

CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING

IM_VALUE = XSRTFDLOW

IMPORTING

EX_CONTAINER = LV_TAB

CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C

EXPORTING

IM_CONTAINER = LV_TAB

IMPORTING

EX_VALUE = SRTFDLOW.

6 REPLIES 6
Read only

Former Member
0 Likes
874

hi,

use class 'cl_abap_container_utilities'

structures are mutually incompatible

Ex:

data: begin of STRUC,

NUMBER(20) type n,

F2 type p,

end of STRUC,

NUMBER(20) type n.

NUMBER = STRUC.

USE:

if both the structures are same type use

MOVE-CORRESPONDING.

If structures are different use

  • MOVE ls_work_rec TO pit_raw_data.

CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING

IM_VALUE = ls_work_rec

IMPORTING

EX_CONTAINER = L_CONTAINER

EXCEPTIONS

ILLEGAL_PARAMETER_TYPE = 1

others = 2.

Read only

Former Member
0 Likes
875

Hi,

This will help you...

Moving contents from one structure to another

Before Unicode:

SRTFDLOW = XSRTFDLOW.

Resolution:

CLASS CL_ABAP_CONTAINER_UTILITIES DEFINITION LOAD.

DATA: LV_TAB(1000) TYPE C.

CALL METHOD

CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

EXPORTING

IM_VALUE = XSRTFDLOW

IMPORTING

EX_CONTAINER = LV_TAB

CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C

EXPORTING

IM_CONTAINER = LV_TAB

IMPORTING

EX_VALUE = SRTFDLOW.

Read only

0 Likes
874

i need move contents of tables, no structures is the same instruction?

Read only

0 Likes
874

You will have to loop and move between work areas...

Between tables directly wont be possible.

Read only

0 Likes
874

Try this way


loop at tg_p0092_i.
  move-corresponding tg_p0092_i to tg_p0008_i.
  append tg_p0008_i.
endloop.

a®

Read only

former_member156446
Active Contributor
0 Likes
874

Try this;

refresh: tg_p0008_i[].
append lines of  tg_p0092_i to tg_p0008_i.