cancel
Showing results for 
Search instead for 
Did you mean: 

Inaccessible statement error in upgrade

Former Member
0 Kudos

A function module has a clear statement in the top include and works fine in 46c. It is now reporting as error "Statement inaccessible" in Ecc6. Has anyone faced a similar issue? What is the fix?

Andrew

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try to have default values for the data types or move the statements within the function module includes. there are various such issues that propup due to bad programming that was allowed earlier.

-Cheers

Answers (1)

Answers (1)

former_member589029
Active Contributor
0 Kudos

What is the long text for the error. Does it directly point to the clear statement?

Usually you get this kind of error if you have a statement that will never be reached in the flow.

e.g.

function module .....

return.

if some condition.

do something.

endif.

endfunction.

In this case the if staement can never be reached because the function module returns to the calling program. This is the type of scenario you are looking for. In the above case you either delete the if or - if you want the if to be executed - move the return after the if or delete it or warp it in an if itself.

Hope that helps,

Michael

By the way, I don't think that the 'Inaccessible statement' check is executed (or available) in 46, that might be the reason why you never got it there.

Edited by: Michael Wackerbauer on Dec 26, 2007 2:00 PM