2009 Apr 02 3:04 PM
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
2009 Apr 02 3:10 PM
2009 Apr 02 3:08 PM
Hi,
Try to use the move statement or Equality(=)
Move : nast+5(100) to w_nast.
or
w_nast = nast+5(100).
Regards
Shiva
2009 Apr 02 3:10 PM
2009 Apr 02 3:23 PM
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
2009 Apr 02 3:31 PM
2009 Apr 02 3:37 PM
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
2009 Apr 02 3:45 PM
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.
2009 Apr 02 3:48 PM
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.
2009 Apr 02 3:44 PM
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
a®