2009 Mar 07 7:09 PM
Hi experts,
I have a piece of code like this:
DATA: object_ref TYPE REF TO application.
START-OF-SELECTION.
CREATE OBJECT object_ref.
I have created a local class "application".
The program is giving a syntax error: "OBJECT_REF" is not an object reference.
What could be the problem and how to solve it?
Regards,
Ajay.
2009 Mar 07 7:53 PM
Have you declare both definition and implementation for your local class? Make sure that your class definition and implementation both are in place.
Kuntal
Have you declare both definition and implementation for your local class? Make sure that your class definition and implementation both are in place.
Kuntal
2009 Mar 07 7:53 PM
Have you declare both definition and implementation for your local class? Make sure that your class definition and implementation both are in place.
Kuntal
2009 Mar 07 7:55 PM
Hello Kuntal,
Yes, both definition and implementation have been declared.
Regards,
Ajay.
2009 Mar 07 8:14 PM
You can take a look into the below code:
CLASS lcl_user_comm DEFINITION.
* Defination for the local class method
PUBLIC SECTION.
METHODS:
** Method for handling Double Click
double_click FOR EVENT double_click
OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no,
ENDCLASS.
* Class to define and handle own functions
CLASS lcl_user_comm IMPLEMENTATION.
*---------------------------------------------------------------------*
* METHOD double_click *
*---------------------------------------------------------------------*
* Define the method for double click
METHOD double_click.
PERFORM sub_event_double_click
USING e_row
e_column.
ENDMETHOD. "double_click
ENDCLASS.
* Now in the PBO if you declear like this, then it should work.
DATA: lv_event_receiver1 TYPE REF TO lcl_user_comm.
If it doen't work please give your code
2009 Mar 07 7:59 PM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |