Application Development 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: 

unicode - container for structures- how?

Former Member
0 Kudos

following problem that this code is working in non-unicode but not in unicode systems:

DATA bla_form type containertable.

  • table containertable contains of 2 fields, 1st is character with length 500,2nd is 'version' with numc length 4

DATA alb_form type xyz_table.

  • table xyz_table contains like 40 field,each different varying from 1 to 60 length and wild mixture of char,int, numc, dats, tims, etc.

bla_form = alb_form.

Of course i getting an error that both tables arent of same type when switching to unicode. unfortunately i dont really think changing bla_form to xyz_table is a good idea because it has so many fields and it is really often used in funtions and methods.

what is the standard way of proceeding here?

best regards,sven

points will be awarded,of course!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can do it with field-symbols and by using ASSIGN...CASTING.

TYPES: BEGIN OF containertable,
         field1 TYPE edichar500,
         field2 TYPE version,
       END OF containertable.

DATA: bla_form TYPE containertable.
*table containertable contains of 2 fields, 1st is character with length 500,
*2nd is 'version' with numc length 4

DATA alb_form TYPE knb1.
* table xyz_table contains like 40 field,each different varying from 1 to 60 length
*  and wild mixture of char,int, numc, dats, tims, etc.
*

SELECT SINGLE * FROM knb1 INTO alb_form.

FIELD-SYMBOLS <bla_form> TYPE containertable.

ASSIGN alb_form TO <bla_form> CASTING.

WRITE: / <bla_form>.

1 REPLY 1

Former Member
0 Kudos

You can do it with field-symbols and by using ASSIGN...CASTING.

TYPES: BEGIN OF containertable,
         field1 TYPE edichar500,
         field2 TYPE version,
       END OF containertable.

DATA: bla_form TYPE containertable.
*table containertable contains of 2 fields, 1st is character with length 500,
*2nd is 'version' with numc length 4

DATA alb_form TYPE knb1.
* table xyz_table contains like 40 field,each different varying from 1 to 60 length
*  and wild mixture of char,int, numc, dats, tims, etc.
*

SELECT SINGLE * FROM knb1 INTO alb_form.

FIELD-SYMBOLS <bla_form> TYPE containertable.

ASSIGN alb_form TO <bla_form> CASTING.

WRITE: / <bla_form>.