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: 

stru1 and struc2 are not mutually converitible in a unicode program?

Former Member
0 Kudos

hi,

in valuepart1 is type c of length 240.

x_bape_vbap is type bape_vbap. of structure consists of char and interger field .

MOVE x_bape_vbap TO x_extensionin-valuepart1.

while doing this operations this going to dump please find the solution for it

Syntax Error:

Program Z_xxxxxxxxxxx 617

"X_EXTENSIONIN-VALUEPART1" and "X_BAPE_VBAP" are not mutually

convertible in a Unicode program.

Program Z_xxxxxxxxxxx 661

"X_EXTENSIONIN-VALUEPART1" and "X_BAPE_VBAP" are not mutually

convertible in a Unicode program. .

Program Z_Z_xxxxxxxxxxx 702

"X_EXTENSIONIN-VALUEPART1" and "X_BAPE_VBAP" are not mutually

convertible in a Unicode program. .

Program Z_Z_xxxxxxxxxxx 743

"X_EXTENSIONIN-VALUEPART1" and "X_BAPE_VBAP" are not mutually

convertible in a Unicode program. .

3 REPLIES 3

Former Member
0 Kudos

Hi Shabeer,

In Unicode System (US) you can not simply move one structure to a string. That's because the types are treated differently: Character types are: C, N, D, T, STRING and character type structures. All others are called byte-types (F, P, X and XSTRING). A structure in US is divided into fragments, i.e. after any change of Character-type to byte-type and vice versa and between byte-types there is a gap (filler). Let me show you a small example between a NUS (non-unicode system) and US of a structure (there is no difference if the structure is nested):

DATA: BEGIN OF STRUC, 
             a(1) TYPE X, 
            BEGIN OF SUB_STRUC, 
               b(1) TYPE X, 
               c(6) TYPE C, 
               date  TYPE D, 
            END OF SUB_STRUC, 
            d    TYPE I, 
         END OF STRUC.

NUS |a|b|c     |date      |d   |

NU  |a|Filler|b|Filler|c     |date      |Filler|d   |

In this example a is a fragment, b is a fragment, c and date is a fragment and d is a fragment.

It's easy to realize that the structure of NUS and US have a different length! And therefore the System yells and dumps in your case.

Your solution: You have to seperate your MOVE statements.

Heinz

Former Member
0 Kudos

Hi,

Instead of

MOVE x_bape_vbap TO x_extensionin-valuepart1.

you have to use the following code.

field-symbols: <X_VBAP> type x,

<X_EXTN> type x.

assign x_bape_vbap to <X_VBAP> casting.

assign x_extensionin-valuepart1 to <X_EXTN> casting.

<X_EXTN> = <X_VBAP>.

Cheers!

Sidharth

Former Member
0 Kudos

Thank u