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: 

Offset length error in a Unicode system

Former Member
0 Kudos

Hi All,

I have a offset error as follows:

The offset declaration "52" exceeds the length of the character-type start (=15) of the structure. This is not allowed in Unicode programs.

The syntax in 4.6c system is: SHIFT int_usr02+52 LEFT BY 4 PLACES.

But in ECC am getting a syntax error as described above.

int_usr02 is defined as: data: int_usr02 LIKE usr02 OCCURS 0 WITH HEADER LINE.

And usr02 is transp.table.

Please guide me.

Your help will be much appreciated

Thanks in Advance,

Indu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

add the below code

FIELD-SYMBOLS : <FS_USR01>.

DATA : L_LEN TYPE I,

L_LIN TYPE I.

ASSIGN INT_USR02 TO <FS_USR01> CASTING TYPE C.

DESCRIBE FIELD <FS_USR01> LENGTH L_LIN IN CHARACTER MODE.

L_LEN = L_LIN - 52.

SHIFT <FS_USR01>+52(L_LEN) LEFT BY 4 PLACES.

4 REPLIES 4

Former Member
0 Kudos

Hi Indumati,

try this

it will definitely work

SHIFT int_usr02+52 LEFT BY 4 PLACES

sol:

SHIFT int_usr02-FieldName+52(specify length here) LEFT BY 4 PLACES

syntax:

SHIFT Field+offset(len) LEFT BY 4 PLACES

Regarda,

Chinna

Former Member
0 Kudos

Hello,

As said by you that USR02 is a Transparent table (I too know that ), you need to specify the field name while you are using the offset.

Hope it helps.

Thanks,

Jayant

Former Member
0 Kudos

add the below code

FIELD-SYMBOLS : <FS_USR01>.

DATA : L_LEN TYPE I,

L_LIN TYPE I.

ASSIGN INT_USR02 TO <FS_USR01> CASTING TYPE C.

DESCRIBE FIELD <FS_USR01> LENGTH L_LIN IN CHARACTER MODE.

L_LEN = L_LIN - 52.

SHIFT <FS_USR01>+52(L_LEN) LEFT BY 4 PLACES.

0 Kudos

Hi Sreekanth,

Thanks a lot for the immediate and helpful answer.The code solved my problem.Thanks again.

Regards,

Indu