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: DO_WHILE_VARY_NOT_IN_RANGE

Former Member
0 Likes
1,210

Hi All,

I am using following code in my program but it shows me abap dump i.e. DO_WHILE_VARY_NOT_IN_RANGE.

DO 20 TIMES

VARYING dat-dar FROM p0041-dar01 NEXT p0041-dar02

VARYING dat-dat FROM p0041-dat01 NEXT p0041-dat02.

It would be really great if you tell me how to avoid this error.

Thanks a lot for your reply.

Regards,

Priti Thakur

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
877

HI,

In infotype P0041 dat01..and dar01 to dat12 and dar12 exist..

Instead of your DO 20 TIMES.. change it to DO 12 TIMES and your problem should be resolved..

Revert if you need more.

Hi All,

I am using following code in my program but it shows me abap dump i.e. DO_WHILE_VARY_NOT_IN_RANGE.

DO 20 TIMES

VARYING dat-dar FROM p0041-dar01 NEXT p0041-dar02

VARYING dat-dat FROM p0041-dat01 NEXT p0041-dat02.

It would be really great if you tell me how to avoid this error.

Thanks a lot for your reply.

Regards,

Priti Thakur

2 REPLIES 2
Read only

Former Member
0 Likes
878

HI,

In infotype P0041 dat01..and dar01 to dat12 and dar12 exist..

Instead of your DO 20 TIMES.. change it to DO 12 TIMES and your problem should be resolved..

Revert if you need more.

Read only

0 Likes
875

Hi Ankesh,

Thanks a lot for your help. I dint realize this

Regards,

Priti