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

subroutine (perform) inside the include program

former_member190312
Active Participant
0 Likes
2,641

Hi all,

i am writting a subroutine inside an include.include itself is present inside a subroutine.

form x.

include xyz.

endform.

inside this include, structure of program is like below.

include xyx.

perform y.

perform z.

form y.

endform.

form z.

endform.

so i am geting error like before statement form structure introduced by form must be ended with endform.

can i use perform & form statement inside include?

if not then how is it possible to put perform statements inside that include. this include is nothing but an exit

of program--MV50AFZ1.plz suggest me .it is very urgent.

any suggestion will be highly appreaciated.

Regards

pabitra

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,138

You can use FORM and PERFORM statemens inside an include, but you can not use the INCLUDE statement which has FORM routine definitions inside a FORM defintion. This is the reason for your error.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,139

You can use FORM and PERFORM statemens inside an include, but you can not use the INCLUDE statement which has FORM routine definitions inside a FORM defintion. This is the reason for your error.

Regards,

Rich Heilman

Read only

0 Likes
1,138

For example, if you have a bunch of FORM defintions in your INCLUDE program and you want to be able to call these in the MV50AFZ1 program, simply put the INCLUDE statement at the very top of this program, NOT inside of an existing FORM defition of that program, then you can call the FORMS in your INCLUDE from inside the FORMS of the MV50AFZ1 program.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,138

<b>inside this include, structure of program is like below.</b>

include xyx.

perform y.

perform z.

form y.

endform.

form z.

endform.

-


Maintain separate Include to keep the FORMS when u ae defining PERFORMS in Include program. Then it will allow u to activate