<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access via 'NULL' object reference not possible in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147442#M453126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In OOABAP you have to declare an object and then create the object. You can check the class name in the method that is importing spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : spreadsheet TYPE REF TO &amp;lt;class-name&amp;gt;  "declaration of object spread sheet which has the class type class-name&lt;/P&gt;&lt;P&gt;CREATE OBJECT spreadsheet. "creation of object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2007 04:29:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-23T04:29:15Z</dc:date>
    <item>
      <title>Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147437#M453121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SRM,i have a program to write sth to EXCEL, but when the program call the method as follow,there will happen a exception:&lt;/P&gt;&lt;P&gt;  CALL METHOD SPREADSHEET-&amp;gt;INSERT_RANGE_DIM&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NAME    = P_NAME&lt;/P&gt;&lt;P&gt;      LEFT    = P_COLUMN&lt;/P&gt;&lt;P&gt;      TOP     = P_ROW&lt;/P&gt;&lt;P&gt;      ROWS    = 1&lt;/P&gt;&lt;P&gt;      COLUMNS = 1&lt;/P&gt;&lt;P&gt;      NO_FLUSH = 'X'&lt;/P&gt;&lt;P&gt;      UPDATING =  UPDATING&lt;/P&gt;&lt;P&gt;      SHEETNAME = SHEETNAME&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ERROR   = ERROR&lt;/P&gt;&lt;P&gt;      RETCODE = RETCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error information as follows:&lt;/P&gt;&lt;P&gt;Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO&lt;/P&gt;&lt;P&gt;Exception              CX_SY_REF_IS_INITIAL&lt;/P&gt;&lt;P&gt;hort text&lt;/P&gt;&lt;P&gt;   Access via 'NULL' object reference not possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 05:19:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147437#M453121</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T05:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147438#M453122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me that you haven't created an instance of the class.&lt;/P&gt;&lt;P&gt;eg. CREATE OBJECT SPREADSHEET&lt;/P&gt;&lt;P&gt;It needs to be declared before the call to the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dirk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 14:24:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147438#M453122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147439#M453123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Follow is my original code:&lt;/P&gt;&lt;P&gt;***********&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DP_PUBLISH_WWW_URL'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            OBJID    = 'ZSRM_TMX_PRINT'&lt;/P&gt;&lt;P&gt;            LIFETIME = 'T'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            URL      = URL.&lt;/P&gt;&lt;P&gt;  CALL METHOD C_OI_CONTAINER_CONTROL_CREATOR=&amp;gt;GET_CONTAINER_CONTROL&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       CONTROL = CONTROL&lt;/P&gt;&lt;P&gt;       ERROR   = ERROR.&lt;/P&gt;&lt;P&gt;  CALL METHOD ERROR-&amp;gt;RAISE_MESSAGE&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      TYPE = 'E'.&lt;/P&gt;&lt;P&gt;  CREATE OBJECT CONTAINER&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      CONTAINER_NAME = 'VIEW'.&lt;/P&gt;&lt;P&gt;  CALL METHOD CONTAINER-&amp;gt;SET_VISIBLE&lt;/P&gt;&lt;P&gt;    EXPORTING VISIBLE = ' '.&lt;/P&gt;&lt;P&gt;  CALL METHOD CONTROL-&amp;gt;INIT_CONTROL&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      R3_APPLICATION_NAME      = 'SRM'&lt;/P&gt;&lt;P&gt;      INPLACE_ENABLED          = INPLACE&lt;/P&gt;&lt;P&gt;      INPLACE_SCROLL_DOCUMENTS = 'X'&lt;/P&gt;&lt;P&gt;      PARENT                   = CONTAINER&lt;/P&gt;&lt;P&gt;      REGISTER_ON_CLOSE_EVENT  = 'X'&lt;/P&gt;&lt;P&gt;      REGISTER_ON_CUSTOM_EVENT = 'X'&lt;/P&gt;&lt;P&gt;      NO_FLUSH                 = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ERROR = ERRORS.&lt;/P&gt;&lt;P&gt;  APPEND ERRORS.&lt;/P&gt;&lt;P&gt;  CALL METHOD CONTROL-&amp;gt;GET_DOCUMENT_PROXY&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      DOCUMENT_TYPE = 'Excel.Sheet'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      DOCUMENT_PROXY = DOCUMENT&lt;/P&gt;&lt;P&gt;      ERROR          = ERRORS.&lt;/P&gt;&lt;P&gt;  APPEND ERRORS.&lt;/P&gt;&lt;P&gt;  CALL METHOD DOCUMENT-&amp;gt;OPEN_DOCUMENT&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      OPEN_INPLACE = INPLACE&lt;/P&gt;&lt;P&gt;      DOCUMENT_URL = URL&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ERROR        = ERRORS.&lt;/P&gt;&lt;P&gt;  APPEND ERRORS.&lt;/P&gt;&lt;P&gt;  CREATE OBJECT SPREADSHEET.&lt;/P&gt;&lt;P&gt;  CALL METHOD DOCUMENT-&amp;gt;GET_SPREADSHEET_INTERFACE&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NO_FLUSH = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      SHEET_INTERFACE = SPREADSHEET&lt;/P&gt;&lt;P&gt;      ERROR           = ERRORS.&lt;/P&gt;&lt;P&gt;  APPEND ERRORS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ERRORS.&lt;/P&gt;&lt;P&gt;    CALL METHOD ERROR-&amp;gt;RAISE_MESSAGE&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        TYPE = 'E'.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  FREE ERRORS.&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;  CALL METHOD SPREADSHEET-&amp;gt;INSERT_RANGE_DIM&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NAME    = P_NAME&lt;/P&gt;&lt;P&gt;      LEFT    = P_COLUMN&lt;/P&gt;&lt;P&gt;      TOP     = P_ROW&lt;/P&gt;&lt;P&gt;      ROWS    = 1&lt;/P&gt;&lt;P&gt;      COLUMNS = 1&lt;/P&gt;&lt;P&gt;      NO_FLUSH = 'X'&lt;/P&gt;&lt;P&gt;      UPDATING =  UPDATING&lt;/P&gt;&lt;P&gt;      SHEETNAME = SHEETNAME&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ERROR   = ERROR&lt;/P&gt;&lt;P&gt;      RETCODE = RETCODE.&lt;/P&gt;&lt;P&gt;*******&lt;/P&gt;&lt;P&gt;when i add the code &lt;/P&gt;&lt;P&gt; CREATE OBJECT SPREADSHEET.&lt;/P&gt;&lt;P&gt;the system tell me:&lt;/P&gt;&lt;P&gt;"SPREADSHEET" is not an object reference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 01:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147439#M453123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T01:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147440#M453124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In your program did you inclue below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   include ole2incl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 03:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147440#M453124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T03:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147441#M453125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before the create object you please declare the spreadsheet as type ref to the class.&lt;/P&gt;&lt;P&gt;See the class type from FM 's parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spreadsheet type ref to &amp;lt;class name&amp;gt;.&lt;/P&gt;&lt;P&gt;create object spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points please if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147441#M453125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147442#M453126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In OOABAP you have to declare an object and then create the object. You can check the class name in the method that is importing spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : spreadsheet TYPE REF TO &amp;lt;class-name&amp;gt;  "declaration of object spread sheet which has the class type class-name&lt;/P&gt;&lt;P&gt;CREATE OBJECT spreadsheet. "creation of object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147442#M453126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147443#M453127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to Richa:&lt;/P&gt;&lt;P&gt;  i have declare the SPREADSHEET as follows&lt;/P&gt;&lt;P&gt;DATA: SPREADSHEET TYPE REF TO I_OI_SPREADSHEET.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:30:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147443#M453127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147444#M453128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like I_OI_SPREADSHEET is not a class, it is an interface. You cannot create instance of any interface. However, you can create your own local class and implement this interface in this class. Then you can create an object of your local class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147444#M453128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147445#M453129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems a little difficult for me, can you give me a example?&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147445#M453129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147446#M453130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the erro happens when call&lt;/P&gt;&lt;P&gt;  CALL METHOD SPREADSHEET-&amp;gt;INSERT_RANGE_DIM&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      NAME    = P_NAME&lt;/P&gt;&lt;P&gt;      TOP     = P_ROW&lt;/P&gt;&lt;P&gt;      LEFT    = P_COLUMN&lt;/P&gt;&lt;P&gt;      ROWS    = 1&lt;/P&gt;&lt;P&gt;      COLUMNS = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error detail:&lt;/P&gt;&lt;P&gt;Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO&lt;/P&gt;&lt;P&gt;Exception              CX_SY_REF_IS_INITIAL&lt;/P&gt;&lt;P&gt;You attempted to use a 'NULL' object reference (points to 'nothing')&lt;/P&gt;&lt;P&gt;access a component.&lt;/P&gt;&lt;P&gt;An object reference must point to an object (an instance of a class)&lt;/P&gt;&lt;P&gt;before it can be used to access components.&lt;/P&gt;&lt;P&gt;Either the reference was never set or it was set to 'NULL' using the&lt;/P&gt;&lt;P&gt;CLEAR statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 04:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147446#M453130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T04:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Access via 'NULL' object reference not possible</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147447#M453131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe following &amp;lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/21/b53144e1ba11d2bdbe080009b4534c/content.htm"&amp;gt;link&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;could help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 11:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-via-null-object-reference-not-possible/m-p/2147447#M453131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T11:56:39Z</dc:date>
    </item>
  </channel>
</rss>

