<?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: Interface in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296237#M501371</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;Interfaces are independent structures that allow you to enhance the class-specific public points of contact by implementing them in classes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Interfaces can be defined globally in the R/3 repository or locally in ABAP program&lt;/P&gt;&lt;P&gt;-&amp;gt;Can define exactly same components in Interfaces as in Classes&lt;/P&gt;&lt;P&gt;-&amp;gt;Unlike classes, Interfaces do not have instances, instead they are implemented by classes&lt;/P&gt;&lt;P&gt;-&amp;gt;Implemented using INTERFACES statement in the declaration part of the class&lt;/P&gt;&lt;P&gt;-&amp;gt;INTERFACES statement must be included in the PUBLIC SECTION of the class&lt;/P&gt;&lt;P&gt;-&amp;gt;Different classes that implement the same interface can all be addressed in the same way.&lt;/P&gt;&lt;P&gt;-&amp;gt;Interfaces can also be nested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Interfaces are the basis for polymorphism in classes, because they allow a single interface method to behave differently in different classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azaz Ali.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2007 08:56:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-23T08:56:06Z</dc:date>
    <item>
      <title>Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296232#M501366</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;i am new to ABAP objects.&lt;/P&gt;&lt;P&gt;could anyone pls give me a simple explaination on Interface and a simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have referred books and materials, but it didnt sound so clear for me.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;so if anyone could give me an explaination in simple language (layman lang),&lt;/P&gt;&lt;P&gt;it would be really helpful for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;points awarded&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:40:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296232#M501366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T07:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296233#M501367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivasan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Interfaces differ from  regular inheritance in their areas of use. There are &lt;/P&gt;&lt;P&gt;  hardly any differences in terms of programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; From a technical perspective, interfaces are simply superclasses that &lt;/P&gt;&lt;P&gt;                           cannot be instantiated, &lt;/P&gt;&lt;P&gt;                           do not have an implementation part &amp;amp;&lt;/P&gt;&lt;P&gt;                           only have public components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Interfaces primarily serve to define uniform protocols for services. &lt;/P&gt;&lt;P&gt;  Various classes implement these services in different ways, keeping the &lt;/P&gt;&lt;P&gt;  semantics unaltered. Interfaces contain no implementations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use &amp;#150; If multiple classes have to implement a service in different ways, but  &lt;/P&gt;&lt;P&gt;             using the same method names and  a uniform signature, with regular &lt;/P&gt;&lt;P&gt;             inheritance such a method (service)  will be defined in the superclass.&lt;/P&gt;&lt;P&gt;             However if the superclass cannot be modeled suitably for inheritance,&lt;/P&gt;&lt;P&gt;             an interface should be defined and method should be defined in the &lt;/P&gt;&lt;P&gt;             interface &amp;#150; same as generalization relationship with a superclass. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Classes implement interfaces as follows &amp;#150;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The interface name is listed in the PUBLIC section of class definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The interface methods are implemented in the implementation part of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Interface components are addressed by prefixing the interface name   &lt;/P&gt;&lt;P&gt;  followed by the interface resolution operator &amp;#145;~&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;interface_name&amp;gt;~&amp;lt;component_name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Alias names can be used to simplify accessing the interface components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Interface components can only be accessed by using an object reference&lt;/P&gt;&lt;P&gt;  whose class implements the interface.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interfaces cannot be instantiated, hence an interface reference can only refer &lt;/P&gt;&lt;P&gt;  to the instance of classes that have implemented the interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To perform polymorphism with interfaces, narrowing cast must be used to &lt;/P&gt;&lt;P&gt;  copy an object reference of the class to a reference variable typed to the &lt;/P&gt;&lt;P&gt;  interface. The interface reference can then be used to access only the &lt;/P&gt;&lt;P&gt;  interface components in a class and not the specific class components. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Using the interface reference the interface components can be directly&lt;/P&gt;&lt;P&gt;  accessed. No prefixing is required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Interface references (obtained after narrowing cast) can be used to call &lt;/P&gt;&lt;P&gt;   methods with the same name, whereby the different implementations can be &lt;/P&gt;&lt;P&gt;   executed depending on the class whose object reference is assigned to the &lt;/P&gt;&lt;P&gt;   interface reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program&lt;/P&gt;&lt;P&gt;_______________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zooabap_interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;       Interface (Definiton)  zl_lif_vehicle&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;       Definition of Vehicle Interface.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       This interface will be used for car and bike class.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       Interfaces contain no 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;P&gt;INTERFACE zl_lif_vehicle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*No visibility levels in interface. All components are by default public&lt;/P&gt;&lt;P&gt;  METHODS: set_make  IMPORTING value(im_make)  TYPE string&lt;/P&gt;&lt;P&gt;                                     im_model  TYPE string,&lt;/P&gt;&lt;P&gt;           get_make  EXPORTING value(ex_make)  TYPE string&lt;/P&gt;&lt;P&gt;                                     ex_model  TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDINTERFACE.                    "zl_lif_vehicle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;       Class (Definiton)  zl_lcl_car&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;       Definition of Car class&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 zl_lcl_car DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To specify the interface name in the public section of the class as&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;interfaces can only be implemented publicly&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    INTERFACES zl_lif_vehicle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;    DATA: gv_make         TYPE string,   " Vehicle make&lt;/P&gt;&lt;P&gt;          gv_model        TYPE string.   " Type or model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "zl_lcl_car DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;       Class (Definiton)  zl_lcl_bike&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;       Definition of Bike class&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 zl_lcl_bike DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To specify the interface name in the public section of the class as&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;interfaces can only be implemented publicly&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    INTERFACES zl_lif_vehicle.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To simplify accessing interface components, aliases are used&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ALIASES: bike_set_make FOR zl_lif_vehicle~set_make,&lt;/P&gt;&lt;P&gt;             bike_get_make FOR zl_lif_vehicle~get_make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;    DATA: gv_make         TYPE string,   " Vehicle make&lt;/P&gt;&lt;P&gt;          gv_model        TYPE string.   " Type or model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                    "zl_lcl_bike DEFINITION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;       Class (Implementation)  zl_lcl_car&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;       Implementation of Car class&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 zl_lcl_car IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Implementing the interface components in the class. The interface&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*components are distinguished from other components in implementing&lt;/P&gt;&lt;P&gt;*class by prefixing interface name followed by a tilde ~&lt;/P&gt;&lt;P&gt;  METHOD zl_lif_vehicle~set_make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF im_make  IS NOT INITIAL&lt;/P&gt;&lt;P&gt;       AND im_model IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      gv_make  = im_make.&lt;/P&gt;&lt;P&gt;      gv_model = im_model.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "set_make&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD zl_lif_vehicle~get_make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ex_make  = gv_make.&lt;/P&gt;&lt;P&gt;    ex_model = gv_model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "get_make&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.               "zl_lcl_car   IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;       Class (Implementation)  zl_lcl_bike&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;       Implementation of Bike class&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 zl_lcl_bike IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD zl_lif_vehicle~set_make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF im_make  IS NOT INITIAL&lt;/P&gt;&lt;P&gt;       AND im_model IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      gv_make  = im_make.&lt;/P&gt;&lt;P&gt;      gv_model = im_model.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "set_make&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD zl_lif_vehicle~get_make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ex_make  = gv_make.&lt;/P&gt;&lt;P&gt;    ex_model = gv_model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "get_make&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.               "zl_lcl_bike   IMPLEMENTATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Declaring reference variables with reference to the car and bike class.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;These vareiable contain a reference to an object of the classes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: z_car  TYPE REF TO zl_lcl_car,&lt;/P&gt;&lt;P&gt;      z_bike TYPE REF TO zl_lcl_bike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : gv_make  TYPE string,&lt;/P&gt;&lt;P&gt;       gv_model TYPE string.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create instance of the car and bike class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CREATE OBJECT: z_car,&lt;/P&gt;&lt;P&gt;                 z_bike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accessing the interface components by using an object reference&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;whose class implements the interface.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;For car class&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method 1 - Access using the interface name followed by ~&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  z_car-&amp;gt;zl_lif_vehicle~set_make( EXPORTING im_make  = 'HYUNDAI'&lt;/P&gt;&lt;P&gt;                                            im_model = 'SANTRO' ).&lt;/P&gt;&lt;P&gt;  z_car-&amp;gt;zl_lif_vehicle~get_make( IMPORTING ex_make  = gv_make&lt;/P&gt;&lt;P&gt;                                            ex_model = gv_model ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / 'Make  :', gv_make,&lt;/P&gt;&lt;P&gt;         / 'Model :', gv_model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;For bike class&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method 2 - Access using ~&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Since aliases have been defined in bike class for interface&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;components, the same can be accessed using alais names&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  z_bike-&amp;gt;bike_set_make( EXPORTING im_make  = 'SUZUKI'&lt;/P&gt;&lt;P&gt;                                   im_model = 'HAYABUSA' ).&lt;/P&gt;&lt;P&gt;  z_bike-&amp;gt;bike_get_make( IMPORTING ex_make  = gv_make&lt;/P&gt;&lt;P&gt;                                   ex_model = gv_model ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / 'Make  :', gv_make,&lt;/P&gt;&lt;P&gt;         / 'Model :', gv_model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indrajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296233#M501367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296234#M501368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Interface, a program or group of programs that handle the passing of data from one system to another. These programs work together to export the data from one system and import into a target system, maybe these programs run once a day, maybe twice, may every hour throughout the day. It is a good way to keep the data in two or more systems in sync with each other. &lt;/P&gt;&lt;P&gt;Interface Programs - These program will be executed &lt;/P&gt;&lt;P&gt;periodically for Transaction data upload(may be &lt;/P&gt;&lt;P&gt;for some periodic report). So these programs are&lt;/P&gt;&lt;P&gt;scheduled.&lt;/P&gt;&lt;P&gt;Interfaces - Communication between two systems to transfer the data. It can be in a scheduled way also. Example SAP to external system and External system to SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296234#M501368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296235#M501369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sudha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have actually requested for object-oriented concept of interface.&lt;/P&gt;&lt;P&gt;sorry if you have misunderstood my question, and thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;srini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296235#M501369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296236#M501370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivasan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose u understand class and object.&lt;/P&gt;&lt;P&gt;In layman terms, car is a class and santro wing is an object.&lt;/P&gt;&lt;P&gt;So that means class is a blue print with some properties like 4 wheels, 1 stering, brake,accelerator, etc. Only the properties, no instance, no real &lt;/P&gt;&lt;P&gt;But Santro is a specific car which can be touched and seen and has real meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, interface is a blue print with some properties, but it &amp;lt;b&amp;gt;cannot have an instance&amp;lt;/b&amp;gt;. It can be implemented by any class and the properties of the instance can be used by any object of this class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose i have a class A with methods a1, a2.&lt;/P&gt;&lt;P&gt;I create an object ob- ob has methods a1 and a2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is one interface say Int1 with some methods i1 and i2.&lt;/P&gt;&lt;P&gt;suppose my class A implements interface Int1.&lt;/P&gt;&lt;P&gt;Then i create an object ob- ob will have a1, a2, i1 and i2 methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, we &amp;lt;b&amp;gt;cannot create an instance of interface&amp;lt;/b&amp;gt; Int1.&lt;/P&gt;&lt;P&gt;There is one specfic advantage of Interfaces. OOABAP does not support Multiple Inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class A         class B
                /
               /
       class C&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;one subclass cant inherit from 2 superclasses in ABAP. However multiple inheritance can be still be achieved by using interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296236#M501370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296237#M501371</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;Interfaces are independent structures that allow you to enhance the class-specific public points of contact by implementing them in classes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Interfaces can be defined globally in the R/3 repository or locally in ABAP program&lt;/P&gt;&lt;P&gt;-&amp;gt;Can define exactly same components in Interfaces as in Classes&lt;/P&gt;&lt;P&gt;-&amp;gt;Unlike classes, Interfaces do not have instances, instead they are implemented by classes&lt;/P&gt;&lt;P&gt;-&amp;gt;Implemented using INTERFACES statement in the declaration part of the class&lt;/P&gt;&lt;P&gt;-&amp;gt;INTERFACES statement must be included in the PUBLIC SECTION of the class&lt;/P&gt;&lt;P&gt;-&amp;gt;Different classes that implement the same interface can all be addressed in the same way.&lt;/P&gt;&lt;P&gt;-&amp;gt;Interfaces can also be nested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Interfaces are the basis for polymorphism in classes, because they allow a single interface method to behave differently in different classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azaz Ali.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 08:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296237#M501371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T08:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296238#M501372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivasan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABAP perspective, there is one more advantage of Interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP does not support Multiple Inheritance i.e one subclass cant inherit from 2 superclasses in ABAP. However multiple inheritance can be simulated using &lt;/P&gt;&lt;P&gt;interfaces in ABAP i.e one class can implement 2 or more interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indrajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 09:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296238#M501372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T09:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296239#M501373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for all your answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 10:01:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface/m-p/2296239#M501373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T10:01:22Z</dc:date>
    </item>
  </channel>
</rss>

