‎2008 Jul 08 11:36 AM
Dear Friends
I have main program and I'm using include program,
In the include program, i want to use PERFORM statement and place subroutine program in the same include program, is it possible?
i was tried so many times,
but syntax error coming as follows,
Incorrect nesting: Before the statment "FORM" , the structure introduced by "IF" must be concluded with "ENDIF".
when I placed subroutine in the main program it's working properly
please suggest me what can i do or any helpful words.
Thanks in Advance.
‎2008 Jul 08 11:39 AM
‎2008 Jul 08 11:41 AM
Hi Nelson,
Incorrect nesting: Before the statment "FORM" , the structure introduced by "IF" must be concluded with "ENDIF".
Your error clearly specifies that the IF statement is not closed with ENDIF. Close it with ENDIF.
Hope this helps you.
Regards,
Chandra Sekhar
‎2008 Jul 08 11:48 AM
Hi
Regarding your error, it's clearly suggest that you have to close your if statement.
so close it than check it.
Regards
Nikunj Shah
‎2008 Jul 08 12:00 PM
Frends
Thanks for your reply
but problem is not the IF or ENDIF statement
because when i comment the subroutine part and PERFORM statement , that error missing.
it may be other case.
‎2008 Jul 08 12:02 PM
Hi,
I tried and it worked. Could you please include similar code snippet in the message.
Regards
Anirudha
‎2008 Jul 08 12:07 PM
Hi,
Probably u r placing the cursor at wrong place. Write ur PERFORM statement in ur include, double click on that, It will ask where to create. Here select main program and enter. Now it will introduce
FORM...
ENDFORM
in the end of the main program. Now try to activate ur program(Select all the includes and main program at the same time and activate)
It will solve the issue.
Thanks,
Vinod.
‎2008 Jul 08 12:19 PM
Frends
this is the sample code
PERFORM TEST_AB.
*&---------------------------------------------------------------------*
*& Form TEST_AB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM TEST_AB .
ENDFORM. " TEST_AB
if place in Main program its working, but i want to placed in the same Include program.
‎2009 Feb 18 5:35 AM
‎2009 Feb 18 5:51 AM
Hy Nelson!!!
Wait!! ......just remember one thing that FORM ..ENDFORM should be after the END-OF-Selection.
so you are writing as..
START-OF-SELECTION.
include program.
edn-of-program.
so that form is coming in between Start-of-selection and end-of-selection...
just put that form ....Endform inside the main progam after end-of-selection your issue will be solved..
regards
sas