‎2014 Sep 25 4:34 PM
Due to my sloppy coding I found some discrepancy between ABAP SyntaxCheck and ObjectCode Compiler.
Here is snippet of code with no sysntax error that produces ObjectCode generation error for locall class and ShortDump during generatio for Global class on SAPKB70211 on NW 702. ShortDump is identified as OBJECTS_NOT_FLAT.
REPORT /FWW/RP_CLASS_ERROR.
class lcl_test definition
final
create public .
public section.
methods SET_wert
importing
value(I_wert) type i .
methods GET_wert
returning
value(R_wert) type i .
methods GET_me
returning
value(R_me) type ref to lcl_test .
private section.
data m_wert type i .
ENDCLASS.
CLASS lcl_test IMPLEMENTATION.
method SET_wert.
me->m_wert = i_wert .
endmethod.
method gET_wert.
r_wert = me->m_wert .
endmethod.
method GET_me .
r_me = me .
endmethod.
ENDCLASS.
START-OF-selection .
data:
lo_object type ref to lcl_test .
lo_object->set_wert( 1 ) .
lo_object->set_wert( 1 + 1 ) .
lo_object->set_wert( 1 + lo_object->get_me( ) ) .
Cheers
Raitis
‎2014 Sep 25 5:54 PM
Hi,
The above code is not correct, since lo_object->get_me( ) returns a reference and not a number.
Of course, there must be a syntax error. And in fact at least in the latest support packages of Release 7.31 and 7.40 there is a syntax error.
But you are right there is no syntax error in 7.02, not even in our latest support package system.
This means, the error is known and corrected in Releases higher than 7.02. But since the program can't be activated in 7.02, this shouldn't be a too big problem.
Kind regards
Horst