<?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 please help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515115#M568949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;i need document for how to create class , method  step by step .&lt;/P&gt;&lt;P&gt;and how to use that class and method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2007 06:54:16 GMT</pubDate>
    <dc:creator>laxman_sankhla3</dc:creator>
    <dc:date>2007-07-12T06:54:16Z</dc:date>
    <item>
      <title>please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515115#M568949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;i need document for how to create class , method  step by step .&lt;/P&gt;&lt;P&gt;and how to use that class and method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515115#M568949</guid>
      <dc:creator>laxman_sankhla3</dc:creator>
      <dc:date>2007-07-12T06:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515116#M568950</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;Check this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/88885f720911d1b44d0000e8a52bed/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/88885f720911d1b44d0000e8a52bed/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515116#M568950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T06:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515117#M568951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dump of the program:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  YSUBDEL LINE-SIZE 120.

 CLASS parentclass DEFINITION .
 PUBLIC SECTION.
  DATA : commondata(30) type c value 'Accessible to all'.
  METHODS : SHOWVAL.
 PROTECTED SECTION.
  DATA : protectdata(40) type c value 'Protected data'.
 private section.
 data : privatedata(30) type c value 'Private data'.
 ENDCLASS.

 CLASS parentclass IMPLEMENTATION.
 METHOD : SHOWVAL.
  write:/5 'All data from parentclass shown:-'.
  write:/ sy-uline.
  WRITE:/5 COMMONDATA,
        /5 PROTECTDATA,
        /5 PRIVATEDATA.
 endmethod.
endclass.

CLASS childclass DEFINITION INHERITING FROM parentclass.
 PUBLIC SECTION .
 METHODS : subval.
 ENDCLASS.

 CLASS childclass IMPLEMENTATION.
 method : subval.
  skip 1.
  write:/5 'Data of parent shown from child-'.
  write:/5 sy-uline.
  WRITE:/5 COMMONDATA,
        /5 PROTECTDATA.
  Commondata = 'Public data changed in subclass'.
  Protectdata = 'Protected data changed in subclass'.
  write:/5 sy-uline.
  WRITE:/5 COMMONDATA,
        /5 PROTECTDATA.
 endmethod.
endclass.

START-OF-SELECTION.
   DATA : parent type ref to parentclass ,
          child  type ref to childclass  .
   create object : parent ,
                   child  .
   call method : parent-&amp;gt;showval ,
                 child-&amp;gt;subval.
      skip 2.
  parent-&amp;gt;commondata = &amp;#145;User changing public data&amp;#146;.
  write:/5 parent-&amp;gt;commondata.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 06:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515117#M568951</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-07-12T06:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515118#M568952</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;We can create class by using these simple steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class has declaration step, in this we can define call componets like&lt;/P&gt;&lt;P&gt;methods, attributes,evnts..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*local class creation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS &amp;lt;class&amp;gt; DEFINITION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD &amp;lt;meth&amp;gt;. "for defining methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&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;...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class has implementation section, in this section we can provide implementations to all the definitions which are declared in class declaration section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS &amp;lt;class&amp;gt; IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simple example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS C_COUNTER DEFINITION.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.  " here declare public components&lt;/P&gt;&lt;P&gt;    METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,&lt;/P&gt;&lt;P&gt;             INCREMENT_COUNTER,&lt;/P&gt;&lt;P&gt;             GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.         "here declare local components&lt;/P&gt;&lt;P&gt;    DATA COUNT TYPE I.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLASS C_COUNTER IMPLEMENTATION.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  METHOD SET_COUNTER.                " method implemetation&lt;/P&gt;&lt;P&gt;    COUNT = SET_VALUE.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  METHOD INCREMENT_COUNTER.&lt;/P&gt;&lt;P&gt;    ADD 1 TO COUNT.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  METHOD GET_COUNTER.&lt;/P&gt;&lt;P&gt;    GET_VALUE = COUNT.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow these steps to declare object to class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: obj type ref to &amp;lt;name of the class&amp;gt;. "here refarence variable is created&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT obj. "here object is created&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*global class creation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can create global class in CLASS BUILDER, for that one we work with SE24.&lt;/P&gt;&lt;P&gt;follow this link for class builder.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/e440a670a111d1b44c0000e8a52bed/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/e440a670a111d1b44c0000e8a52bed/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow this link for knowing types of classes and types of class components.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/OO/syntax.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/OO/syntax.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/b3/f4b1406fecef0fe10000000a1550b0/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 07:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515118#M568952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T07:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: please help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515119#M568953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example 1&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The class circle contains two functional static methods, circumference and area, which work with the constant pi. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS circle DEFINITION. &lt;/P&gt;&lt;P&gt;  PUBLIC SECTION. &lt;/P&gt;&lt;P&gt;    CONSTANTS pi TYPE f &lt;/P&gt;&lt;P&gt;                 VALUE '3.14159265358979324'. &lt;/P&gt;&lt;P&gt;    CLASS-METHODS: circumference IMPORTING r TYPE f &lt;/P&gt;&lt;P&gt;                                 RETURNING value(c) TYPE f, &lt;/P&gt;&lt;P&gt;                   area          IMPORTING r TYPE f &lt;/P&gt;&lt;P&gt;                                 RETURNING value(a) TYPE f. &lt;/P&gt;&lt;P&gt;ENDCLASS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS circle IMPLEMENTATION. &lt;/P&gt;&lt;P&gt;  METHOD circumference. &lt;/P&gt;&lt;P&gt;    c = 2 * pi * r. &lt;/P&gt;&lt;P&gt;  ENDMETHOD. &lt;/P&gt;&lt;P&gt;  METHOD area. &lt;/P&gt;&lt;P&gt;    a = pi * r ** 2. &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;DATA: circ TYPE f, &lt;/P&gt;&lt;P&gt;      area TYPE f, &lt;/P&gt;&lt;P&gt;      radius TYPE f. &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;radius = '1.00'. &lt;/P&gt;&lt;P&gt;circ = circle=&amp;gt;circumference( radius ). &lt;/P&gt;&lt;P&gt;area = circle=&amp;gt;area( radius ). &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;&amp;lt;b&amp;gt;Example 2&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;When a class is first accessed, the static constructor of this class uses the system field sy-repid to set the static attribute access_program&amp;lt;&amp;gt; for the name of the program of an internal session that uses the class first. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS some_class DEFINITION. &lt;/P&gt;&lt;P&gt;  PUBLIC SECTION. &lt;/P&gt;&lt;P&gt;    CLASS-METHODS class_constructor. &lt;/P&gt;&lt;P&gt;  PRIVATE SECTION. &lt;/P&gt;&lt;P&gt;    CLASS-DATA access_program TYPE sy-repid. &lt;/P&gt;&lt;P&gt;ENDCLASS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS some_class IMPLEMENTATION. &lt;/P&gt;&lt;P&gt;  METHOD class_constructor. &lt;/P&gt;&lt;P&gt;    access_program = sy-repid. &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;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example 3&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;In the class dialog_box, a static event handler close_box id defined for the event, which is triggered when the user chooses to close a dialog box of the Control Framework (CFW). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS dialog_box DEFINITION. &lt;/P&gt;&lt;P&gt;  PUBLIC SECTION. &lt;/P&gt;&lt;P&gt;    METHODS constructor. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;  PRIVATE SECTION. &lt;/P&gt;&lt;P&gt;    CLASS-DATA open_boxes TYPE i. &lt;/P&gt;&lt;P&gt;    CLASS-METHODS close_box &lt;/P&gt;&lt;P&gt;      FOR EVENT close OF cl_gui_dialogbox_container &lt;/P&gt;&lt;P&gt;      IMPORTING sender. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;ENDCLASS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS dialog_box IMPLEMENTATION. &lt;/P&gt;&lt;P&gt;  METHOD constructor. &lt;/P&gt;&lt;P&gt;    ... " create a dialogbox &lt;/P&gt;&lt;P&gt;    open_boxes = open_boxes + 1. &lt;/P&gt;&lt;P&gt;  ENDMETHOD. &lt;/P&gt;&lt;P&gt;  METHOD close_box &lt;/P&gt;&lt;P&gt;    ... " close the dialogbox referred by sender &lt;/P&gt;&lt;P&gt;    open_boxes = open_boxes - 1. &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;Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 07:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help/m-p/2515119#M568953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T07:01:14Z</dc:date>
    </item>
  </channel>
</rss>

