Application Development and Automation 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: 
Read only

offset problem in unicode system

Former Member
0 Kudos
562

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
Read only

Former Member
0 Kudos
496

HI,

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

8 REPLIES 8
Read only

Former Member
0 Kudos
495

Hi,

Try to use the move statement or Equality(=)

Move : nast+5(100) to w_nast.

or

w_nast = nast+5(100).

Regards

Shiva

Read only

Former Member
0 Kudos
497

HI,

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

Read only

0 Kudos
495

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

Read only

0 Kudos
495

Hi,

Can you paste your code here.

Read only

0 Kudos
495

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

Read only

0 Kudos
495

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.

Read only

0 Kudos
495

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.

Read only

former_member194669
Active Contributor
0 Kudos
495

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