Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Access via 'NULL' object reference not possible.

Former Member
0 Kudos

My error is this and program code is attached:

OBJECTS_OBJREF_NOTASSIGNED

CL_GUI_PDFVIEWER==============CP

BC-FES-CTL

Access via 'NULL' object reference not possible.

You attempted to use a 'NULL' object reference (points to 'nothing')

access a component (variable: " ").

An object reference must point to an object (an instance of a class)

before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the

CLEAR statement.

Program                                        CL_GUI_PDFVIEWER==============CP

Include                                          CL_GUI_PDFVIEWER==============CM003

Line                                               18

Module Tp.                                    (METHOD)

Module name                                CREATE_TOOLBAR

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Than You Andreas Schaller for your support.  I appreciate it.  I found a solution to see the PDF:

6 REPLIES 6

AndyS
Explorer
0 Kudos

Hi Ricardo,

you used subclass from CL_GUI_CONTROL isn't released.

I have checked the internal coding and it seems this class is buggy.

If you run the demo report of this class you will get a dump, too.

You can you CL_GUI_HTML_VIEWER instead.

I changed your code like shown below.

That is the result.

You can find some further informations about official gui controls at

http://help.sap.com/saphelp_nwpi711/helpdata/en/d2/147a36c70d2354e10000009b38f839/content.htm?curren...

Greetings

Andreas

Former Member
0 Kudos

Thank you Andreas for your fast response.  I appreciate that.  Your recommendation works perfect to see my PDF outer the container when I set frame parameter to space and the in_place parameter to '  ' in the CALL Method go_html_viewer->show_url.  But, if I set in_place parameter to 'X' my abap dynpro 100 doesn't show the pdf.  No errors ocurrs.  I'm newbie in methods and parameters and may be a problem in my dynpro design or definition or the frame setting parameter.  Can you please recommend a solution.  How can I set a frame parameter?

The Results screen is:

Thank you again.

0 Kudos

Hi Ricardo,

the parameter "in_place" indicates where the page should be displayed. Possible values:

  • 'X': (default) Page is displayed in the SAPGUI window.
  • ' ' : A separate browser window is opened to display the page

The other parameter "frame" is in my opinion only usefull in case of real html documents. If you have a html-frameset you can set the frame showing the content.

Here you can find more about CL_GUI_HTML_VIEWER and other CL_GUI classes.

In your usecase the default values of both parameters are good.

Wishes

Andreas

Former Member
0 Kudos

Hi again Andreas Schaller:

I omit the frame parameter and set parameter in_place = 'X'.  The problem now is that nothing happen.  The container remain in a blank screen.  Would you recommend a solution?

No idea of what is happening.

0 Kudos

Hi Ricardo,

Has your custom control drawn in screen-painter the same name as your custom-control-object in ABAP,  like 'CONTROL'?

Are you able to use a simple CL_GUI_TEXTEDIT instead of CL_GUI_HTML_VIEWER, only for testing in your GUI?

Grettings

Andreas

Former Member
0 Kudos

Than You Andreas Schaller for your support.  I appreciate it.  I found a solution to see the PDF: