Application Development 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: 

System field that holds the current # of a recursive call ?

Former Member
0 Kudos

Is there a sy-***** field that holds the number of the current call, in a recursive form ?

Thanks,

Avraham

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

No there isn't but you could use a static variable within the form.

i.e.

do 10 times.
  perform my_form.
enddo.

form my_form.

statics: lv_count  type i.

add 1 to lv_count.

write: / lv_count.
endform.

Darren

2 REPLIES 2

Former Member
0 Kudos

Hi,

No there isn't but you could use a static variable within the form.

i.e.

do 10 times.
  perform my_form.
enddo.

form my_form.

statics: lv_count  type i.

add 1 to lv_count.

write: / lv_count.
endform.

Darren

0 Kudos

Yes I just ended up using a global one instead.

Was just wondering if SAP provided such a thing.

Thanks