2015 Jul 26 6:53 AM
Hello everyone,
I have a simple ABAP code like the following:
REPORT Z_TEST_INCLUDE .
INCLUDE Z_TEST_INCLUDE_TOP.
INCLUDE TEST_INCLUDE.
PERFORM WRITE_TEST_NUMBER.
Here, the WRITE_TEST_NUMBER. subroutine is implemented in the INCLUDE TEST_INCLUDE. In this case when I perform a syntax check, I confront an error stating that the implementation of WRITE_TEST_NUMBER. cannot be found.
However, when I more the INCLUDE TEST_INCLUDE to the end of main program, like the following, everything will be fine, and I receive no error.
REPORT Z_TEST_INCLUDE .
INCLUDE Z_TEST_INCLUDE_TOP.
PERFORM WRITE_TEST_NUMBER.
INCLUDE TEST_INCLUDE.
Why is this the case?
Thanks,
Arman
2015 Jul 26 9:13 AM
Hi,
it should not give you an error, you have to write START-OF-SELECTION event.
REPORT Z_TEST_INCLUDE .
INCLUDE Z_TEST_INCLUDE_TOP.
INCLUDE TEST_INCLUDE.
START-OF-SELECTION.
PERFORM WRITE_TEST_NUMBER.
so you have to write an event before perform or you have to write first
perform and after that define a form without EVENT.
Regards
Ibrahim
2015 Jul 26 8:29 AM
hi,
logically the form should be defined with perform prior to form routine.
reg,
SA.
2015 Jul 26 9:13 AM
Hi,
it should not give you an error, you have to write START-OF-SELECTION event.
REPORT Z_TEST_INCLUDE .
INCLUDE Z_TEST_INCLUDE_TOP.
INCLUDE TEST_INCLUDE.
START-OF-SELECTION.
PERFORM WRITE_TEST_NUMBER.
so you have to write an event before perform or you have to write first
perform and after that define a form without EVENT.
Regards
Ibrahim
2015 Jul 27 9:24 AM
2015 Jul 27 9:55 AM
Hi Arman,
I suppose it doesn't say 'Implementation can not be found'. It should be giving the error 'statement is not accessible'. In case there are no sub-routines defined in the program, implicit START-OF-SELECTION will be placed and the program works fine. If there are sub-routines being used, the program needs the event block to be explicitly placed.
Hope it helps,
~Athreya