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

function loop error

Karan_Chopra_
Active Participant
0 Likes
1,165

i have created a FM and the code contains some form calls

but it gives loop errors

mu code is of the form..

function

perform call1

<b>Error here(endfuction expected)</b>

form call1

end form

endfunction

10 REPLIES 10
Read only

Former Member
0 Likes
1,119

You need to create your subroutine in an INCLUDE program of the function group, not direct in the module itself.

Regards,

Nick

Read only

Former Member
0 Likes
1,119

function.

perform call1.

endfunction.

when u double click on call1, create the same in an include program and write the neccessary code inside the include program.

it will work...

Read only

Former Member
0 Likes
1,119

hi,

the declaration for call1 is incorrect .. it should be declaraed outside the function module..

you can write it separately n then include in your program by using INCLUDE statement.

Read only

Karan_Chopra_
Active Participant
0 Likes
1,119

it is showing the same error

Read only

0 Likes
1,119

Have you defined the subroutine outside the function and removed the original defintion?

Read only

0 Likes
1,119

Hi

create include program and give form definition here.

activate both function module and include.....even if u get errors.....activate anyway.

Then go to function module....click on object list and check if include program is under this function module.

Hope there are no syntax errors.

Regards

Vasu

Read only

Karan_Chopra_
Active Participant
0 Likes
1,119

it is showing but still same error

Read only

Former Member
0 Likes
1,119

You don't need an include:

function test.

perform call1.
endfunction .

form call1.
end form.

Rob

Read only

Karan_Chopra_
Active Participant
0 Likes
1,119

rob

if i do that it shows unknown variable error in the subroutine definition

Read only

0 Likes
1,119

Yes, but your original problem should be solved.

If you have further problems, you should post the real code, not pseudo code in a separate thread.

Rob