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 errors

Former Member
0 Kudos

Hi All,

I am getting the following unicode errors :

1. WRITE: / 'iecon-zchvvente force à 1:*',IECON(50).

Here IECON is a structure which has CHAR as well as CURR fields.

The error is : The length declaration "50" exceeds the length of the character-type start (=39) of the structure. This is not allowed in Unicode programs. .

2. Begin of HBSEG ,

include structure Z*,

include structure bseg,

end of HBSEG.

BSEG = HBSEG.

This is giving a unicode error.Does it work like move corresponding.

Thanks and Regards,

Aman

4 REPLIES 4

umashankar_sahu
Active Participant
0 Kudos

hi Aman

in NON-Unicode system 1 byte = 1 character , but in unicode system it depends on plateform.

in unicode system with character processing(C, N, D, T and String) there is Byte processing (X and Xstring) available . genrally for asian Country 1 byte = 2 character now in your first qu.

1. if you are using a offset (50) to display data it will check the structure IECON , structure starts with character type data object and up to 39 place all the data object is of type character (C, or N or D or T or String), after 39 it may used to deaclare a data objects or field with some other data type(apart from c, n, d,t and string) from this onwards it assigned differntly in memory thats why u cannot access after setting offset 39. you can easily access up to 39 but after that if you want than declare a one local variable with character type with same length and pass the value in this variable and then access.

2. in case of second

BSEG = HBSEG.

in unicode system it is must that both are same line type with same number of same fileds field should contain same data types.

may be this is helpfull for you.

for more detail you can refer F1 help-->unicode

0 Kudos

Hi ,

In first case i used the class cl_abap_container_utilitiesto resolve the issue.

In second case I wanted to know how the statement would work in non unicode environment

0 Kudos

hi Aman

congr8s you solved your first problem.

in non unicode system Assignment between flat srtuctures, if it is incompatible flat structure are treated as data object of type c. thats why its not giving any error.

whereas in unicode program conversion rules apply which assign the most important role to the unicode fragement view of the structures.

0 Kudos

begin of hbseg,

include structure Z*,

include structure bseg,

end of hbseg.

now does this mean bseg = hbseg is equivalent to move-corresponding hbseg to bseg in ECC6.