<?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: ABAP Objects - Instance of a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843983#M44814</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the functionality of this method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method is used to determine if the ALV Grid Control runs without frontend handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ALV Grid Control runs without frontend handling in batch mode ( sy-batch has the value ' X '), in print mode, in combination with CATT and during Web Reporting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In these cases, you should not create frontend (GUI)  objects (e.g. custom containers, etc...) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this method has a 'RETURNING' type parameter, you can call and directly assign its output to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lv_offline TYPE i .
lv_offline = cl_gui_alv_grid=&amp;gt;offline( ) .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also call this method in usual way as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lv_offline TYPE i .

CALL METHOD CL_GUI_ALV_GRID=&amp;gt;offline
   RECEIVING
      E_OFFLINE  = lv_offline .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, you can assign points to posts you find helpful using the scala on the left of each post. By assigning a 10-point or checkin "Solved my own" at left of your original post, you can close your thread.&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;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2005 08:37:18 GMT</pubDate>
    <dc:creator>ssimsekler</dc:creator>
    <dc:date>2005-06-02T08:37:18Z</dc:date>
    <item>
      <title>ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843975#M44806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning to you all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain the process in :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF cl_gui_alv_grid=&amp;gt;offline( ) IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method OFFLINE has a returning parameter E_OFFLINE.&lt;/P&gt;&lt;P&gt;Questions :&lt;/P&gt;&lt;P&gt;- how does the system recognise this parameter.&lt;/P&gt;&lt;P&gt;- can i check this variable in the debugger.&lt;/P&gt;&lt;P&gt;- general explanation of the working of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Rob Makelaar&lt;/P&gt;&lt;P&gt;The Netherlands&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 06:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843975#M44806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T06:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843976#M44807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the method has the only RETURNING parameter and only IMPORTING parameters (or none), than the method could be called in a functional manner, that is it can be used in expressions like in your code snippet. If a method has more than one RETURNING parameter (or has no RETURINING parameter), or has not only IMPORTING but also EXPORTING or CHANGING parameters than trying to use it in expressions would cause a syntax error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 06:27:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843976#M44807</guid>
      <dc:creator>sergey_korolev</dc:creator>
      <dc:date>2005-06-02T06:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843977#M44808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At runtime the function call cl_gui_alv_grid=&amp;gt;offline( )&lt;/P&gt;&lt;P&gt;is replaced by the valueOf E_OFFLINE(int4), surely you&lt;/P&gt;&lt;P&gt;can check it in debugger. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Narinder Hartala&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Narinder Hartala&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 06:28:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843977#M44808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T06:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843978#M44809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For creating a container we will use this method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO,&lt;/P&gt;&lt;P&gt;FORM f9000_objects_create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF cl_gui_alv_grid=&amp;gt;offline( ) IS INITIAL.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT o_dockingcontainer&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        ratio                       = '95'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        cntl_error                  = 1&lt;/P&gt;&lt;P&gt;        cntl_system_error           = 2&lt;/P&gt;&lt;P&gt;        create_error                = 3&lt;/P&gt;&lt;P&gt;        lifetime_error              = 4&lt;/P&gt;&lt;P&gt;        lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;        others                      = 6.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      MESSAGE i001 WITH text-e01."Error in creating Docking container&lt;/P&gt;&lt;P&gt;      LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_alvgrid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent = o_dockingcontainer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f9000_objects_create&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 06:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843978#M44809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T06:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843979#M44810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narinder,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sure, you can see the variable IN the method 'Offline'. But when he's returning in the calling section, the variable 'e_offline' is not known anymore. &lt;/P&gt;&lt;P&gt;So, how does the condition work in the calling section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rob Makelaar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 07:19:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843979#M44810</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T07:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843980#M44811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only integar value(INT4) is returned and we are checking&lt;/P&gt;&lt;P&gt;wether it is initial or not.&lt;/P&gt;&lt;P&gt;you can consider it like that a temporary variable of&lt;/P&gt;&lt;P&gt;type INT4 is created automatically to take value of&lt;/P&gt;&lt;P&gt;E_OFFLINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Narinder Hartala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 07:29:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843980#M44811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T07:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843981#M44812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Narinder, can you please explain the following to me :&lt;/P&gt;&lt;P&gt;You can call a method via a reference variable, just like  :&lt;/P&gt;&lt;P&gt;data: grid type ref to cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;call method grid-&amp;gt;offline( ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;But you also do it like this :&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_alv_grid=&amp;gt;offline( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What&amp;#146;s the difference between the two, and when do I use the first or second one (when you creating an instance what can I do with it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks !&lt;/P&gt;&lt;P&gt;Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 07:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843981#M44812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-02T07:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843982#M44813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look here: (quotation from Sap-library)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Outside the class, the visibility of the method depends on whether you can call it at all. Visible instance methods can be called from outside the class using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD &amp;lt;ref&amp;gt;-&amp;gt;&amp;lt;meth&amp;gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;ref&amp;gt; is a reference variable whose value points to an instance of the class. Visible instance methods can be called from outside the class using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD &amp;lt;class&amp;gt;=&amp;gt;&amp;lt;meth&amp;gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;class&amp;gt; is the name of the relevant class.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 08:20:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843982#M44813</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-06-02T08:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Objects - Instance of a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843983#M44814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the functionality of this method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method is used to determine if the ALV Grid Control runs without frontend handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ALV Grid Control runs without frontend handling in batch mode ( sy-batch has the value ' X '), in print mode, in combination with CATT and during Web Reporting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In these cases, you should not create frontend (GUI)  objects (e.g. custom containers, etc...) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this method has a 'RETURNING' type parameter, you can call and directly assign its output to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lv_offline TYPE i .
lv_offline = cl_gui_alv_grid=&amp;gt;offline( ) .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also call this method in usual way as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA lv_offline TYPE i .

CALL METHOD CL_GUI_ALV_GRID=&amp;gt;offline
   RECEIVING
      E_OFFLINE  = lv_offline .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, you can assign points to posts you find helpful using the scala on the left of each post. By assigning a 10-point or checkin "Solved my own" at left of your original post, you can close your thread.&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;*--Serdar &amp;lt;a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d"&amp;gt;[ BC ]&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2005 08:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-instance-of-a-method/m-p/843983#M44814</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2005-06-02T08:37:18Z</dc:date>
    </item>
  </channel>
</rss>

