‎2006 Aug 31 7:03 AM
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
‎2006 Aug 31 7:06 AM
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.
‎2006 Aug 31 7:06 AM
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.
‎2006 Aug 31 7:11 AM
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