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 error : " The structure does not start with character-type"

Former Member
0 Kudos

Unicode problem:

Data Declaration :

p_data_in like w3mime (RAW data of length 255 )

p_data_out like w3mime (RAW data of length 255 )

the error happens in the follwing code

p_data_outl_offset = p_data_inl_offset.

saying " The structure does not start with character-type"

5 REPLIES 5

Former Member
0 Kudos

RAW

Uninterpreted byte string. Fields of type RAW may only have a maximum length of 255 in tables. If longer Raw fields are used in tables, you must choose data type LRAW. This length restriction is not valid for structures.

LRAW

Any uninterpreted string of bytes at least 256 places in length. Fields of this type must be at the end for transparent tables and have a preceding length field of type INT2. For an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required.

Former Member
0 Kudos

Hi Richard,

As W3MIME is a strucute, you can not perform offset operation on structure.

Declare as follows

DATA: p_data_in like <b>w3mime-LINE[/b,.

p_data_out like <b>w3mime-LINE</b>.

Thanks,

Vinay

Former Member
0 Kudos

Hi,

Instead of using a structure in the addition, use the structure field i.e. instead of

p_data_outl_offset = p_data_inl_offset.

try using

<b>p_data_out-LINE0(l_offset) = p_data_in-LINE0(l_offset).</b>

or

<b>p_data_out-LINEl_offset = p_data_in-LINEl_offset.</b>

<b><REMOVED BY MODERATOR></b>

Regards,

Mukul

Message was edited by:

Alvaro Tejada Galindo

0 Kudos

Mukul,

Thanks for ur timely reply.

But it says new error now.

DATA: BEGIN OF crlf,

cr TYPE c VALUE cl_abap_char_utilities=>CR_LF,

lf TYPE c VALUE cl_abap_char_utilities=>NEWLINE,

END OF crlf.

in the above definition .

This was the code before unicode enabling.

*DATA: BEGIN OF crlf,

  • cr TYPE x VALUE '0D',

  • lf TYPE x VALUE '0A',

  • END OF crlf.

0 Kudos

Hi,

Please paste the error in this thread.

Regards,

Mukul