Application Development 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: 

Compile Error Statement is not accessible

Former Member
0 Kudos

Hi All,

I have report in SAP 4.7 . when i do syntax check on it it give a warning -"statement is not accessible."

But same thing when we compile we are getting as Syntax error in ECC 6.0 .

when I compile it, it prompts

<i><b>Include ZHRIPENR

Statement is not accessible.</b></i>

<i><b>My REPORT program -</b></i>

REPORT ZHRIBANK NO STANDARD PAGE HEADING

LINE-SIZE 80

LINE-COUNT 65.

START-OF-SELECTION.

INCLUDE ZHRIPENR.

END-OF-SELECTION.

<i><b>My INCLUDE program -</b></i>

*INCLUDE ZHRIPENR.

.....

......

PERFORM BATCH_INIT.

......

.......

FORM BATCH_INIT.

....

....

...

ENDFORM. " (BATCH_INIT)

when I compile it, it prompts

<i><b>Include ZHRIPENR

Statement is not accessible.</b></i>

Please let me know how can i proceed .

Cheers,

Reddy

6 REPLIES 6

Former Member
0 Kudos

START-OF-SELECTION.

INCLUDE ZHRIPENR.

END-OF-SELECTION.

include not works with this event

varma_narayana
Active Contributor
0 Kudos

Hi ..

The Reason may be bcoz you are Placing the FORM statements inside the Include.

Just Remove the FORMS from the Include and Place the in ur Main program in the Last.

Note: Subroutine definitions has to be in the end of the code.

REWARD IF HELPFUL.

0 Kudos

Hi ,

Same program working fine in SAP R/3 4.7 system . when you do a Syntax check it only pops up a warning.

But same program is giving a syntax error in ECC 6.0.

Cheers,

Reddy

former_member223537
Active Contributor
0 Kudos

Yes, there would certainly be additional validations in the upgraded version.

Include needs to be defined before Start of selection .

0 Kudos

Hi Prasanth ,

Checked the one you mentioned.

Placed INCLUDE out side the Selection block but still same syntax error.

Cheers,

Reddy

Former Member
0 Kudos

Solved.

Shuffled the lines in the code . It works now.