‎2007 Feb 07 8:29 PM
Hi All,
I am calling a method in at selection-screen on help-request event. But it is giving me dump ie "Access not possible using 'NULL' object reference"
data : disp_help type ref to l_display_help.
create object disp_help.
at selection-screen on help-request for p_awerk.
call method disp_help->m_display_help( ).
*&---------------------------------------------------------------------*
* Class l_display_help Implementation *
*&---------------------------------------------------------------------*
* To display the documentation for the button clicked *
*----------------------------------------------------------------------*
class l_display_help implementation.
method m_display_help.
clear wa_help.
refresh i_help.
wa_help-tdline = text-069.
wa_help-tdformat = '1'.
append wa_help to i_help.
clear wa_help.
wa_help-tdline = text-070.
wa_help-tdformat = '2'.
append wa_help to i_help.
clear wa_help.
wa_help-tdline = text-071.
wa_help-tdformat = '3'.
append wa_help to i_help.
clear wa_help.
v_title = text-072.
call function 'COPO_POPUP_TO_DISPLAY_TEXTLIST'
exporting
task = c_display
titel = v_title
tables
text_table = i_help.
endmethod. " M_display_help
endclass. " L_display_help IMPLEMENTATION
class l_display_help definition.
public section.
data : v_title type n.
data : t_help type tline.
data : i_help type standard table of t_help.
data : wa_help type t_help.
methods : m_display_help.
endclass. " L_display_help
Thanks
aRs
‎2007 Feb 07 8:34 PM
You must first create the object, but since it is not put in an event, it is not triggering the CREATE OBJECT. Modify like so.
data : disp_help type ref to l_display_help.
intialization.
create object disp_help.
at selection-screen on help-request for p_awerk.
call method disp_help->m_display_help( ).
or.........
data : disp_help type ref to l_display_help.
at selection-screen on help-request for p_awerk.
if disp_help is initial
create object disp_help.
endif..
call method disp_help->m_display_help( ).
Regards,
RIch Heilman
‎2007 Feb 07 8:34 PM
You must first create the object, but since it is not put in an event, it is not triggering the CREATE OBJECT. Modify like so.
data : disp_help type ref to l_display_help.
intialization.
create object disp_help.
at selection-screen on help-request for p_awerk.
call method disp_help->m_display_help( ).
or.........
data : disp_help type ref to l_display_help.
at selection-screen on help-request for p_awerk.
if disp_help is initial
create object disp_help.
endif..
call method disp_help->m_display_help( ).
Regards,
RIch Heilman
‎2007 Feb 07 8:37 PM