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

Perform in Include

Former Member
0 Likes
1,373

Hi All,

can i write a perfom in the 'Z' include of the user exit. i have written the Form and End form at the end of my include. i am getting the error as 'incorrect nesting : Before the statement "FORM", the structure introduced by "FUNCTION" must be concluded by "ENDFUNCTION".

can any one tell me the solution for this.

Thanks

suresh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
889

Hi suresh,

1. Unfortunately this won't work.

2. Bcos we cannot write FORM-ENDFORM

inside the include.

3. It should be either before the FUNCTION,

or after END FUNCTION.

4. But since this is a user-exit,

we cannot change the code of the FM.

5. So in your case, its better,

to create another Z Program,

and write the FORM-ENDFORM inside it.

6. Then call this form in your include using the syntax

PERFORM MYFORM IN PROGRAM ZPROG.

regards,

amit m.

2 REPLIES 2
Read only

Former Member
0 Likes
890

Hi suresh,

1. Unfortunately this won't work.

2. Bcos we cannot write FORM-ENDFORM

inside the include.

3. It should be either before the FUNCTION,

or after END FUNCTION.

4. But since this is a user-exit,

we cannot change the code of the FM.

5. So in your case, its better,

to create another Z Program,

and write the FORM-ENDFORM inside it.

6. Then call this form in your include using the syntax

PERFORM MYFORM IN PROGRAM ZPROG.

regards,

amit m.

Read only

Former Member
0 Likes
889

Hi,

Create a New Include say Z_INCLUDE.

In the User Exit,

FUNCTION .

INCLUDE Z_INCLUDE.

ENDFUNCTION.

In Z_INCLUDE.

PEFORM PROCESS_DATA.

FORM PROCESS_DATA.

  • write your code here

ENDFORM.

Best regards,

Prashant