‎2006 Sep 07 10:01 AM
Hello experts,
I am trying to call a method inside a form but it is giving me an error. The error is:
Access not possible using 'NULL' object reference.
Anyway, below is my code guys:
START-OF-SELECTION.
DATA: main TYPE REF TO lcl_main,
old_and_new TYPE REF TO lcl_old_and_new,
check_changes TYPE REF TO lcl_check_changes,
messages TYPE REF TO lcl_messages.
CREATE OBJECT: main, old_and_new, check_changes, messages.
----
FORM get_orig_contents_of_zts0001 *
----
........ *
----
FORM get_orig_contents_of_zts0001.
CALL METHOD main->export_old_recs.
ENDFORM.
Help would be greatly appreciated. Thanks a lot and take care!
‎2006 Sep 07 10:11 AM
Before the "START-OF-SELECTION " just add this sentense :
<b>class lcl_main definition deferred.</b>
CLASS Definition.
ENDCLASS.
CLASS Implementation.
ENDCLASS.
START-OF-SELECTION.
*Do your coding here
<b>in this way we are deferring the class definition for later</b>
‎2006 Sep 07 10:06 AM
Hi Viray,
Loks like ur method is not avaliable for the subroutine u r calling.
Just check whether u have defined the method and all it's objects in ur program.
Cheers,
SImha.
‎2006 Sep 07 10:11 AM
hi,
While calling a method it should be available. You need to define the class and its methods in the program. You might have missed some method.
Regards,
Richa
‎2006 Sep 07 10:11 AM
Before the "START-OF-SELECTION " just add this sentense :
<b>class lcl_main definition deferred.</b>
CLASS Definition.
ENDCLASS.
CLASS Implementation.
ENDCLASS.
START-OF-SELECTION.
*Do your coding here
<b>in this way we are deferring the class definition for later</b>