‎2007 Feb 20 5:21 AM
Hi All,
Its very urgent can you give me a soln to the below code.
data: begin of t_allocate occurs 0.
include structure zsd_allocate.
data: end of t_allocate.
if sy-subrc ne 0.
write: / t_allocate(80),
/ t_allocate+80(80), <------- error
/ t_allocate+160.
uline.
endif.
The above code is throwing an error as: The sum of the offset length (=160) exceeds the length of the start (=93) of the structure.This is not allowed in unicode.
‎2007 Feb 20 5:42 AM
Hi ,
In Unicode the there will be a problem for offset .
Use the following code marked in bold.
<b>types : begin of typ_str,
str(80) type c,
end of types .</b><b>data : cf(80).</b>
data: begin of t_allocate occurs 0.
<b> include structure typstr as part1.</b>
include structure zsd_allocate.
data: end of t_allocate.
if sy-subrc ne 0.
<b>cf = t_allocate-part1.</b>
write: / t_allocate(80),
<b>/ cf</b>
the above line will solve your problem
/ t_allocate+80(80), <------- error
/ t_allocate+160.
uline.
endif.
Please reward if useful.