<?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: Convert to OO in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494848#M563331</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 depends on what you wish to managa by OO:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS ERROR DEFINITION.
 PUBLIC-SECTION.

 CLASS-METHODS: UPDATE_ERROR
                                    IMPORTING PARAM1 TYPE ....

ENDCLASS.

CLASS ERROR IMPLEMANTATION.

  METHOD UPDATE_ERROR.
     .......................
  ENDMETHOD.

ENDCLASS.

  if not i_ymethdrt[] is initial.
    loop at i_ymethdrt into wa_ymethdrt.
      if wa_ymethdrt-docdes is initial.
        move c_y to v_dflag.
        CALL METHOD ERROR=&amp;gt;UPDATE_ERROR
                                    EXPORTING PARAM1 = c_ymet
                                                       ....................
      endif.
    endloop.
  else.
    move c_y to v_dflag.
    CALL METHOD ERROR=&amp;gt;UPDATE_ERROR
                                    EXPORTING PARAM1 = c_ymet
                                                       ....................
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2007 15:41:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-10T15:41:07Z</dc:date>
    <item>
      <title>Convert to OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494847#M563330</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;Anybody give a info how to convert this to OO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  if not i_ymethdrt[] is initial.
    loop at i_ymethdrt into wa_ymethdrt.
      if wa_ymethdrt-docdes is initial.
        move c_y to v_dflag.
        perform f_update_error_records using c_ymet c_e '261'
                                   text-023 text-125
                       wa_ymethdrt-docdes space space space.
      endif.
    endloop.
  else.
    move c_y to v_dflag.
    perform f_update_error_records using c_ymet c_e '261'
                              text-023 text-125
                    text-126 space space space.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sa_R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 15:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494847#M563330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert to OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494848#M563331</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 depends on what you wish to managa by OO:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS ERROR DEFINITION.
 PUBLIC-SECTION.

 CLASS-METHODS: UPDATE_ERROR
                                    IMPORTING PARAM1 TYPE ....

ENDCLASS.

CLASS ERROR IMPLEMANTATION.

  METHOD UPDATE_ERROR.
     .......................
  ENDMETHOD.

ENDCLASS.

  if not i_ymethdrt[] is initial.
    loop at i_ymethdrt into wa_ymethdrt.
      if wa_ymethdrt-docdes is initial.
        move c_y to v_dflag.
        CALL METHOD ERROR=&amp;gt;UPDATE_ERROR
                                    EXPORTING PARAM1 = c_ymet
                                                       ....................
      endif.
    endloop.
  else.
    move c_y to v_dflag.
    CALL METHOD ERROR=&amp;gt;UPDATE_ERROR
                                    EXPORTING PARAM1 = c_ymet
                                                       ....................
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 15:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494848#M563331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T15:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert to OO</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494849#M563332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the only part that you could make OO  or leverage a static class and method would be the PERFORM call.  In which case,  you can simply define a local class in your program with a method and its signature and simply call it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it would be something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

*---------------------------------------------------------------------*
*       CLASS lcl_app DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_app definition.

  public section.
    class-methods:  f_update_error_records
                           importing im_val1 type string
                                     im_val2 type string
                                     im_val3 type string
                                     im_val4 type string
                                     im_val5 type string
                                     im_val6 type string
                                     im_val7 type string
                                     im_val8 type string
                                     im_val9 type string.




endclass.

*---------------------------------------------------------------------*
*       CLASS lcl_app IMPLEMENTATION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_app implementation.

  method f_update_error_records.
* Do whatever you need to do.
  endmethod.

endclass.


start-of-selection.

*        perform f_update_error_records using c_ymet c_e '261'
*                                   text-023 text-125
*                       wa_ymethdrt-docdes space space space.

  call method lcl_app=&amp;gt;f_update_error_records
          exporting
             im_val1 = c_ymet
             im_val2 = c_e
             im_val3 = '261'
             im_val4 = text-023
             im_val5 = text-125
             im_val6 = wa_ymethdrt-docdes
             im_val7 = space
             im_val8 = space
             im_val9 = space.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, this isn't true OO concepts, but rather simply implementing your code using the modularization technigue of classes/methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 15:43:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-to-oo/m-p/2494849#M563332</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-10T15:43:39Z</dc:date>
    </item>
  </channel>
</rss>

