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 problum

0 Likes
504

HI Experts,

I am working on upgradetion project in 4.6C version this below code working fine. In ECC 6.0 its going for Dump can any one help me on this why its going for dump.

data: offset type i.

form init_structure using name structure.

select * from dd03l

into corresponding fields of table ydd03l

where tabname = name

order by position.

offset = 0.

loop at ydd03l.

ydd03l-offset = offset.

offset = offset + ydd03l-intlen.

modify ydd03l.

endloop.

move space to structure.

loop at ydd03l.

perform field_assign using structure+ydd03l-offset(1) '/'.

endloop.

endform.

Dump message:

In the running program "ZPACRIM_AP_LOAD", the field "STRUCTURE" of the type

"u" and length 309 was to be accessed with the offset 328.

However, subfield accesses with an offset specification that is not

smaller than the field length are not permitted.

Thanks in advance,

Ramesh

3 REPLIES 3
Read only

Former Member
0 Likes
432

Hi Ramesh ,

the length of the field ydd03l-structure is 309 and is of type u (as u declared) .

but the offset value is 328 which means you are tring to access 328th field which is not possible.

make sure u do not exceed the length of the strucure field when u use offset.

regards,

Ramya

Read only

0 Likes
432

Hi,

Thanks a lot for ur quick responce. i did't declare structure as type 'U'. It has been like this.

perform init_structure using 'BBKPF' *bbkpf.

Thanks & Regards,

Ramesh.

Read only

Former Member
0 Likes
432

what is the length of structure?

regards,

Ramya