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

Former Member
0 Likes
559

HI

I'm working in ECC version.

Problem in offest

data : begin of itab occurs 0

zp1(2),

zp2(3),

zp3(5),

zp(10),

carrv like s807-aenetwr,

end of itab.

data : text(40).

concatenate '(' itab+4(20) ')' into text.

The error I get is sum of the offset exceeds lenght of

the structure

How can I solve the problem.

1 ACCEPTED SOLUTION
Read only

former_member125661
Contributor
0 Likes
533

what u r trying to achieve is as good as concatenate itab-zp22(1) itab-zp3 itab-zp carrv0(4) into text.

But it looks like length of carrv for one of the conditions is < 4. So it errors out. It is a good idea to use fields when you use concaternation.

Use can use the concatenation the way i used above and probably limit carrv+0(n) , where n is LE 3,depending on the size.

3 REPLIES 3
Read only

Former Member
0 Likes
533

Hi,

You need to mention fieldname with itab in concatenate statement. If you use itab+4(20) system will not understand what is the field you are referring to.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
533

Hi chaitanya

What's the size of "carrv like s807-aenetwr"? if this is not greater than 3 it wont work.

Hope it helps

Regards

Jaime

Read only

former_member125661
Contributor
0 Likes
534

what u r trying to achieve is as good as concatenate itab-zp22(1) itab-zp3 itab-zp carrv0(4) into text.

But it looks like length of carrv for one of the conditions is < 4. So it errors out. It is a good idea to use fields when you use concaternation.

Use can use the concatenation the way i used above and probably limit carrv+0(n) , where n is LE 3,depending on the size.