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

ABAP dump for Offset specification for a structure too large?

Former Member
0 Likes
1,842

Dear experts:

As subject. Abap dump message 'In this case, the offset specification 48 for the structure "<TABLE1>"

exceeds the length of the character-type initial part (=46).'

This is abap dump message. My abap code as below, dump occur in boldface. This is strange, because actually for this case l_pos = 24 and x_namtab-leng = 12, so that offset specification is 36. But system return is 48. Please help. Thanks a lot!!

LOOP AT x_namtab.

CASE x_namtab-viewfield.

WHEN 'USNAM'.

l_pos = x_namtab-position / 2.

<table1>+l_pos(x_namtab-leng) = sy-uname.

WHEN 'DATUM'.

l_pos = x_namtab-position / 2.

<table1>+l_pos(x_namtab-leng) = sy-datum.

WHEN 'UZEIT'.

l_pos = x_namtab-position / 2.

<table1>+l_pos(x_namtab-leng) = sy-uzeit.

WHEN 'TERM'.

l_pos = x_namtab-position / 2.

<table1>+l_pos(x_namtab-leng) = l_term.

ENDCASE.

ENDLOOP.

Hello Nicole,

Thanks for the effort. That should be good enough.

Vikranth

9 REPLIES 9
Read only

Former Member
0 Likes
1,429

Try clearing the field l_pos after the case statement.

LOOP AT x_namtab.

l_pos = x_namtab-position / 2.

CASE x_namtab-viewfield.

WHEN 'USNAM'.

<table1>+l_pos(x_namtab-leng) = sy-uname.

WHEN 'DATUM'.

<table1>+l_pos(x_namtab-leng) = sy-datum.

WHEN 'UZEIT'.

<table1>+l_pos(x_namtab-leng) = sy-uzeit.

WHEN 'TERM'.

<table1>+l_pos(x_namtab-leng) = l_term.

ENDCASE.

clear : l_pos.

ENDLOOP.

Edited by: Veeranji Reddy on Jul 29, 2010 2:52 PM

Read only

0 Likes
1,429

Thanks for your help. But it's not work. Because i try to change the code to '<table1>+24(12) = sy-uname.' Still dump.

Best Regards,

Nicole Chen

Read only

0 Likes
1,429

Then your structue <table1> has length less than 36..... in debug mode check its length.

Read only

0 Likes
1,429

Dear All:

My problem was answered. Thanks for All help.

Best Regards,

Nicole Chen

Read only

0 Likes
1,429

Would be great if you could share the solution, which could be of help to others in future facing similar problem

Read only

0 Likes
1,429

Dear All:

This problem was data type. My program is append to standard program. That is, i add new code in table maintenance. I used the <table1> and x_namtab for

Read only

0 Likes
1,429

Dear All:

This problem was the cause of data type. My program is append to standard program. That is, i add new code in table maintenance for my requirements. <table1> and x_namtab was declaration when create table maintenance form the system. But when data type is 'DEC' the system calculate position will be different. But I not found what's difference. For my case, just change the data type will be OK.

So sorry, I just can be explain to these, because my English not pretty good.

Read only

0 Likes
1,429

Hello Nicole,

Thanks for the effort. That should be good enough.

Vikranth

Read only

0 Likes
1,429

Dear Vikranth:

Thanks for your remind. Actually I got a lot of help from the forum. To many experts help me to solve the problems. I really appreciate. I will remember to share my experience to help when I solve problems.

Thanks a lot!!

Best Regards,

Nicole Chen