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: 

ABAP OO Error - Need help to understand error message

Former Member
0 Kudos

When I try to create the following code, I get the error 'Statement is not accessible' on the create object command. I tried this on a 6.2 and 6.4 system and I got the same error. Any hints as to what I am doing wrong. Thanks! Bill

INCLUDE Soapincl.

DATA: osoap TYPE REF TO CSoapDocument.

CREATE OBJECT osoap.

CALL METHOD osoap->set_tag_name_format

EXPORTING format = CSoapConstants=>ic_tagfmt_default.

6 REPLIES 6

Former Member
0 Kudos

There is some problem in the place where you have kept the include statement.

Somehow the statements is not accessible.

Is this a Report ...or a Function Module ..

e.g in a function module , you should call the include in the top include of the main program ....

did you try commenting the include and then check !!

Cheers,

Ram

0 Kudos

Sure you don't need to put the name of the include in capitals?? or in brackets??

Include SOAPINCL.

Include <SOAPINCL>.

Enjoy

0 Kudos

You dont need it in uppercase or in brackets. the include is not in the right place as ram had mentioned.

Regards

Raja

0 Kudos

Hey,

Thanks for the feedback.

This code will only work if I put the include the global data section of the function module.

Cheers! Bill

former_member1287623
Participant
0 Kudos

I have the same Problem within a report...

no matter where I put in the class def and imp parts... no matter if I work with includes or without... any suggestions?

edit:

ok, solved now... just moved the parts of the class around and now it works... but I still don't understand why :-?

Message was edited by: Sebastian Enk

Former Member
0 Kudos

Hi bill,

1.

report abc.

INCLUDE Soapincl.

DATA: osoap TYPE REF TO CSoapDocument.

<b>START-OF-SELECTION. <----


IMPORTANT.</b>

CREATE OBJECT osoap.

CALL METHOD osoap->set_tag_name_format

EXPORTING format = CSoapConstants=>ic_tagfmt_default.

2. Give any event name.

eg. INITIALIZATION ETC.

regards,

amit m.