<?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: Class Definition within a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559551#M253147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Max and also thanks to others for the valuable info. Points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2006 04:20:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-18T04:20:59Z</dc:date>
    <item>
      <title>Class Definition within a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559547#M253143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is such that I need to create a class within a program. My class has 3 methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In the first method, meth1, I need to import a select-option values(s_emp), that is entered on the selection screen.&lt;/P&gt;&lt;P&gt;2. In the second method, meth2, I need to import a table(t_emp) into the method.&lt;/P&gt;&lt;P&gt;3. In the third method, meth3, I need to export a table(t_emp2) from the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone pls let me know the correct syntax that I can use to define these methods(i.e., the class definition) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 08:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559547#M253143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T08:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Class Definition within a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559548#M253144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can check these simple ABAP OBJECTs programs.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ABAP_OBJECTS_ENJOY_0           Template for Solutions of ABAP Object Enjoy Course
ABAP_OBJECTS_ENJOY_1           Model Solution 1: ABAP Objects Enjoy Course       
ABAP_OBJECTS_ENJOY_2           Model Solution 2: ABAP Objects Enjoy Course       
ABAP_OBJECTS_ENJOY_3           Model Solution 3: ABAP Objects Enjoy Course       
ABAP_OBJECTS_ENJOY_4           Model Solution 4: ABAP Objects Enjoy Course       
ABAP_OBJECTS_ENJOY_5           Model Solution 5: ABAP Objects Enjoy Course       
DEMO_ABAP_OBJECTS              Complete Demonstration for ABAP Objects           
DEMO_ABAP_OBJECTS_CONTROLS     GUI Controls on Screen                            
DEMO_ABAP_OBJECTS_EVENTS       Demonstration of Events in ABAP Objects           
DEMO_ABAP_OBJECTS_GENERAL      ABAP Objects Demonstration                        
DEMO_ABAP_OBJECTS_INTERFACES   Demonstration of Interfaces in ABAP Objects       
DEMO_ABAP_OBJECTS_METHODS      Demonstration of Methods in ABAP Objects          
DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen                        
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 08:52:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559548#M253144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T08:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Class Definition within a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559549#M253145</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;CLASS counter DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS: method1 IMPORTING value(s_emp) TYPE give_type,&lt;/P&gt;&lt;P&gt;         method2 IMPORTING table(t_emp) LIKE ITAB_NAME,&lt;/P&gt;&lt;P&gt;         method3 EXPORTING table(t_emp2)LIKE ITAB_NAME2.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helped mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 08:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559549#M253145</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-16T08:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Class Definition within a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559550#M253146</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;this is a a little sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZCLASS .&lt;/P&gt;&lt;P&gt;TABLES MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS MY_CLASS DEFINITION DEFERRED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: MY_OBJECT TYPE REF TO MY_CLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF TY_ITAB,&lt;/P&gt;&lt;P&gt;         FIELD1,&lt;/P&gt;&lt;P&gt;         FIELD2,&lt;/P&gt;&lt;P&gt;         FIELD3,&lt;/P&gt;&lt;P&gt;      END   OF TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: EXPORT_ITAB TYPE STANDARD TABLE OF TY_ITAB,&lt;/P&gt;&lt;P&gt;      IMPORT_ITAB TYPE STANDARD TABLE OF TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS MY_CLASS DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ........                                                      *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS MY_CLASS DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS: GET_SELECTION_SCREEN,&lt;/P&gt;&lt;P&gt;             GET_INTERNAL_TABLE IMPORTING P_ITAB TYPE TABLE,&lt;/P&gt;&lt;P&gt;             SET_INTERNAL_TABLE EXPORTING P_ITAB TYPE TABLE.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS MY_CLASS IMPLEMENTATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ........                                                      *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS MY_CLASS IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD GET_SELECTION_SCREEN.&lt;/P&gt;&lt;P&gt;    IF SO_MATNR[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD GET_INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD SET_INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT MY_OBJECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD MY_OBJECT-&amp;gt;GET_SELECTION_SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD MY_OBJECT-&amp;gt;GET_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;                  EXPORTING P_ITAB = EXPORT_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD MY_OBJECT-&amp;gt;SET_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;                  IMPORTING P_ITAB = IMPORT_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway you should consider all global data defined in a program are seen by local class, so perhaps you don't need to create methods to import global data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 09:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559550#M253146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T09:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Class Definition within a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559551#M253147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Max and also thanks to others for the valuable info. Points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 04:20:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-definition-within-a-program/m-p/1559551#M253147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T04:20:59Z</dc:date>
    </item>
  </channel>
</rss>

