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 problem in unicode system

Former Member
0 Kudos

hi,

we have following in code in unicode system

data w_nast(100).

select single * from nast into nast.

w_nast to nast5(100).

offset length exceeds error

thanks

raju

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

NAST+5(100) = W_NAST.
or
MOVE W_NAST TO NAST+5(100.

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try to use the move statement or Equality(=)

Move : nast+5(100) to w_nast.

or

w_nast = nast+5(100).

Regards

Shiva

Former Member
0 Kudos

HI,

NAST+5(100) = W_NAST.
or
MOVE W_NAST TO NAST+5(100.

0 Kudos

hi avinash,

Thanks for your reply

i have done the same thing move nast to w_nast+5(100)

still it is giving the same error becuase the code in unicode system

error the sum of offset and length (=100) exceeds the length of the(=77) of the structure

please help us.

exact code

tables nast.

data w_nast(100).

select single * from nast into nast.

*w_nast = nast+5(100).

move nast+5(100) to w_nast.

thanks,

raju

0 Kudos

Hi,

Can you paste your code here.

0 Kudos

tables nast.

data w_nast(100).

select single * from nast into nast.

w_nast = nast+5(100).

error message the sum off the offset and length (=105) exceeds the length of the start (=77) of the structure

0 Kudos

Hi,

Try this way..

TABLES nast.

DATA w_nast(100).
DATA l_string TYPE char2000.

SELECT SINGLE * FROM nast INTO nast.
CALL FUNCTION 'HR_99S_COPY_STRUC1_STRUC2'
  EXPORTING
    p_struct1 = nast
  IMPORTING
    p_struct2 = l_string.
IF sy-subrc EQ 0.
  w_nast = l_string+5(100).
ENDIF.

WRITE w_nast.

0 Kudos

you cannot copy a structure to char.

use like this.

tables nast.

data w_nast like nast.

select single * from nast into nast.
w_nast = nast.

Rhea.

former_member194669
Active Contributor
0 Kudos

Try this way


types : begin of t_nast.
types : nast1(5) type c.
types : nast2(100) type c.
types : end of t_nast.

data : wa_nast type t_nast.

select single * from nast into nast.

write : nast to wa_nast.

Now you wa_nast-nast2 have value 100 offset