Skip to Content
author's profile photo Former Member
Former Member

code working in ecc 6.0 but not on 4.6c

Hi all

I have written a small sample code in 4.6c and ecc 6.0

CLASS c1 DEFINITION.

PUBLIC SECTION.

METHODS: constructor IMPORTING num TYPE i

EXCEPTIONS e,

a.

CLASS-METHODS: b.

ENDCLASS.

CLASS c1 IMPLEMENTATION.

METHOD constructor.

WRITE :num.

RAISE e.

ENDMETHOD.

METHOD a.

WRITE:/ ' instance method :a '.

ENDMETHOD.

METHOD b.

WRITE:/ ' static method: b '.

ENDMETHOD.

ENDCLASS.

START-OF-SELECTION.

PARAMETERS: p_par TYPE i.

WRITE: / ' Hi '.

DATA: obj TYPE REF TO c1.

CREATE OBJECT obj EXPORTING num = p_par

EXCEPTIONS e = 5.

CALL METHOD obj->a.

this code is running fine in ecc 6.0 but not in 4.6c, in 4.6c it is giving a dump when the statement CALL METHOD obj->a. is executed, saying null reference.

could any one explain me this behaviour

Thanks & Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 04:27 AM

    hi

    see this diff

    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=ecc6.0and+4.7&adv=false&sortby=cm_rnd_rankvalue

    <b>Reward if usefull</b>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.