<?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 How to create a instance for the method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750877#M325593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is showing me dump error for the call method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_tab type /SCMB/DM_ORDER_TAB,&lt;/P&gt;&lt;P&gt;      grid1  TYPE REF TO /SCA/CL_SVORDER .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD grid1-&amp;gt;READ_BY_IDS&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_CTRL      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IV_ORTYPE    = gt_po_detl-ortype&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_LOCKFLG   = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_NOADDRESS = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_MAPID     = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_DUEQUAN   = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IT_ORDERID   = itab_orderid&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    ET_ORDERS    = i_tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ET_PROT      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;u r attempting to use a null object reference access a component (variable 'GRID!")&lt;/P&gt;&lt;P&gt;an object reference must point to an object (an instance of  a class ) before it can be used to acess a component either the reference was never set or it was set to null using the clear statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Dec 2006 09:40:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-02T09:40:47Z</dc:date>
    <item>
      <title>How to create a instance for the method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750877#M325593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is showing me dump error for the call method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_tab type /SCMB/DM_ORDER_TAB,&lt;/P&gt;&lt;P&gt;      grid1  TYPE REF TO /SCA/CL_SVORDER .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD grid1-&amp;gt;READ_BY_IDS&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IS_CTRL      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IV_ORTYPE    = gt_po_detl-ortype&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_LOCKFLG   = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_NOADDRESS = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_MAPID     = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IV_DUEQUAN   = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IT_ORDERID   = itab_orderid&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    ET_ORDERS    = i_tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ET_PROT      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;u r attempting to use a null object reference access a component (variable 'GRID!")&lt;/P&gt;&lt;P&gt;an object reference must point to an object (an instance of  a class ) before it can be used to acess a component either the reference was never set or it was set to null using the clear statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 09:40:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750877#M325593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a instance for the method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750878#M325594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to access a method without creating a instance of the class....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paste this code before you call  &amp;lt;b&amp;gt;READ_BY_IDS&amp;lt;/b&amp;gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_tab type /SCMB/DM_ORDER_TAB,&lt;/P&gt;&lt;P&gt;grid1 TYPE REF TO /SCA/CL_SVORDER .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;create object grid1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD grid1-&amp;gt;READ_BY_IDS&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IS_CTRL =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IV_ORTYPE = gt_po_detl-ortype&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IV_LOCKFLG = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IV_NOADDRESS = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IV_MAPID = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IV_DUEQUAN = /SCMB/CL_C_ORDER=&amp;gt;GC_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IT_ORDERID = itab_orderid&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;ET_ORDERS = i_tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ET_PROT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramki.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 10:12:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750878#M325594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T10:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a instance for the method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750879#M325595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to get more into ABAP Objects,&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find some information about working with ABAP Class &amp;amp; instances. This will be very helpful and solve most of your problems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 10:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750879#M325595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-02T10:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a instance for the method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750880#M325596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sridhar loganathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A ABAP Class is just a definition of fields/variables called attributes and routines (like in standard ABAP forms and functions) called methods. Also you can have events, don't care about before necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The definition itself is just a blueprint. Nothing exists, nothing can be used before you create an instance for this definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: grid1 TYPE REF TO /SCA/CL_SVORDER creates a 'handler' for ( to be created) instances of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement CREATE OBJECT grid1 creates an instance of the class as defined in the 'blueprint' and assigns the reference to this instance (with all methods, attributes and events) to reference field grid1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 999 of 1000 cases SAP creates just one object of a class. In those cases the definition of classes and uses of object oriented programming is more or less obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway: Just keep in mind that you can not uses attributes and methods of the class directly (blueprint!) but only of the instance created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An Exception to be noted are so-called Static attributes and methods where an instance is not required. Example ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB gives the character for horizontal tab regardless of platform and char encoding (unicode!). Class ABAP_CHAR_UTILITIES defines static attribute HORIZONTAL_TAB - no instances necessary because this will never change in a given system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this sheds some light on it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 12:58:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-instance-for-the-method/m-p/1750880#M325596</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-12-02T12:58:02Z</dc:date>
    </item>
  </channel>
</rss>

