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: 

Statement not accessible error in Implicit Enhancement of SAPMPE03

amber_garg
Active Participant
0 Kudos
2,479
ENDMODULE.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Include MPMKMO00, End                                                                                S
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZENH_PE03.
 MESSAGE 'hi' TYPE 'I'.
ENDENHANCEMENT.
*$*$-End:   (1)

As shown above i added a line MESSAGE 'Hi' Type 'I' in the implicit enhancement portion. But it gives me error "Statement not accessible"

Thanks

1 ACCEPTED SOLUTION

amber_garg
Active Participant
0 Kudos
388

Thanks guys ,

BTW this is almost a 2 yrs old post , so I have myself forgotten what i was trying to do that time .But neverthless thank you so much all of you.

8 REPLIES 8

Former Member
0 Kudos
388

Well, under what circumstances would you expect to see this message?

Rob

0 Kudos
388

@Rob : Its expected to come when a particlar code is unreachable by the compiler in any condition and hence termed as inaccessible.

But in this case since SAP itself has provided Implicit enhancement after the ENDMODULE , so how can we make use of it.

PS: I am new to Enhancements

THanks

0 Kudos
388

No - I meant, how would you expect to the the message that you are trying to write?

Rob

0 Kudos
388

@Rob: For testing purpose , what i intended to do is , have a message displayed while the program is loaded hence for this particular standard prog (Creating HR features of tcode PE03) I wrote a MESSAGE command in the implicit enhancement.

Regarding Statement not ACcessible , I think it should have been written either inside a subroutine or INCLUDE but I tried that also , still getting the same error

krishnadhuriya
Explorer
0 Kudos
388

Hi Amber,

For writing statements in implicit enhancement..,
use subroutines or Includes.

former_member1716
Active Contributor
0 Kudos
388

Hi Amber,

Hi hope you want to check whether the code is reaching that particular enhancement point, if that is the case.

Then just put implicit breakpoint, just type the statement as below inside the enhancement.

break username.

where username is your username in the system

Hope this is helpful

Thanks and regards,

Satish

amber_garg
Active Participant
0 Kudos
389

Thanks guys ,

BTW this is almost a 2 yrs old post , so I have myself forgotten what i was trying to do that time .But neverthless thank you so much all of you.

0 Kudos
388

Hi Amber,

just in case you have to do something similar again: ABAP Code must always be between MODULE ... ENDMODULE or FORM ... ENDFORM. In the example in this post the statement

MESSAGE 'hi' TYPE 'I'.

is just after an ENDMODULE. statement and so this code can never be reached (or is not accessible ). The implicit enhancement option outside the existing modularization units is used to define completely new MODULEs or FORMs.

Hope this helps!

Regards

Oliver