Sunday, November 4, 2012

Abstract Class vs Interface – Which to use when?


Before jumping to the differences, lets check out the basics of both – Abstract Class and Interface.

What is an Abstract Class?

Abstract Class is a special kind of class which can’t be instantiated. We can only instantiate the subclasses of the Abstract class if they are not abstract. Abstract class should at least contain one abstract method. Abstract methods are methods without any implementation – only a declaration. We can certainly define the variables referencing to Abstract class and instantiate with specific subclass at runtime.

ABAP Syntax Highlighter

    METHODS: write_name.
    DATA: my_name TYPE STRING.
ENDCLASS.                    "zcl_base_functions DEFINITION
CLASS zcl_base_functions IMPLEMENTATION.
  METHOD write_name.
  ENDMETHOD.                    "write_name
ENDCLASS.                    "zcl_base_functions IMPLEMENTATION

What is an Interface?

An interface is not a class. It is an entity which can’t have implementation. An interface can only contain empty method declaration and components. Interface components are always public. We can later change the visibility of the components within the implementing class using the ALIASES.

ABAP Syntax Highlighter

INTERFACE zif_order.
  METHODS: set_order_data IMPORTING iv_order_Data TYPE STRING.
  METHODS: create_order.
CLASS zcl_sales_order DEFINITION.
    INTERFACES: zif_order.


Since both abstract class and interface are different entity, they have few differences:
  • Multiple Inheritance:We can achieve multiple inheritance using Interfaces. Since ABAP doesn’t support more than one Super class, we can have only one abstract class as Super class.
  • New Functionality:If we add a new method in the Interface, all the implementing classes have to implement this method. If we don’t implement the method, it would result into Run-time error. For Abstract class, if we add a non-abstract method, its not required to redefine that in each and every inherited class.
  • Default Behavior:We can have a default behavior of a non-abstract method in abstract class. We can’t have any implementation in Interface as it only contains the empty stub.
  • Visibility:All interface components are PUBLIC by default. For Abstract class, we can set the visibility of each component.


Based on the above mentioned differences, we can come to this recommendations:
  • If want to have multiple inheritance, you need to use Interface. As we can have more than one interface in the class definition, we can achieve multiple inheritance.
  • If wish to create multiple flavors of the object with some default operations, you should consider creating abstract class. As it provides you the flexibility to add the default operations directly to base class and all the subclass would get the new default operation.
  • If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members.
  • Interface should be used when working for a wide range of objects as interfaces only contain the stub, which enforces no default behavior. Abstract class should be used for classes which are closely related to each other.
  • We should use Interfaces for small functionalities which can be clubbed together to derived the concrete business object.
  • Interfaces, in contrary to abstract class, gain interface functionality no matter which hierachy tree they lie. So interface become common point to hierarchies which can’t normally seat one next to another. Futhermore if they require common implementation, a helper class can be utilized here. Thanks to Marcin.

FAQ's : SAP Server Access and Installation For Individuals

How SAP Server Access works? 
Q: How does the Remote SAP Access work?
Access to our SAP Online Training systems is via the internet - all you need is the SAP GUI version 7.1 or higher. If you don't have a GUI we will send you a download link from which you can download & install the SAP GUI. Our system offers you access to all user and configuration transactions for all modules (except for user maintenance and basis/system administration functions). You can play & practice as much as you want, including setting up your own entities, configuration, master data and transactions. Once you buy your SAP Server Access and Installation package it typically takes less than 1 business day to activate your account and you will receive an email with your user ID and password.
Q: How quickly do I get my user ID and password?
After you buy your SAP Access package it typically takes just a few hours to activate your account. We will send you an email with your user ID and password.

Q: What kind of internet connection do I need?
We recommend a high speed connection via DSL or Cable. If you have any Net Connector or dial-up connection you can still connect to the SAP systems but it will be very slow.

Q: Is the system available 24/7?
Yes, it is! However, we take the systems down on the first Saturday of each month for routine maintenance and back-ups. This downtime typically last for about 8 hours. Like everyone else we are not immune to technical glitches and have to work through issues which may take extended periods of downtime. In these rare cases we will offer either a refund (full or partial) or free access time.

Q: How fast are the systems? How many people are on it?
We have a dedicated T1 line and have users from all over the world! Connection speed has never been an issue for our students. Also, we keep the number of users per server to a minimum and typically have an average of only 20 users online!

Q: How often do you refresh the systems?
We typically refresh our systems every 6 months. That means your data will be available for a long time and you don't have to worry about re-doing all your work every 30 days as with the other providers that run illegal demo versions of SAP.

Q: Can I switch between systems?
Yes, you can. We can switch your subscription from one system to another free of charge once every month.

Q: Do I have access to all transactions & modules?
You have access to all user and configuration transactions for all functional modules, incl. FI/CO, MM, SD, HR, etc. However, we do restrict access to certain user maintenance and basis/system administration transactions to ensure a reliable environment for all SAP users.

Q: What about access to System Administration and other Basis functions?
Sorry, but in order to ensure a stable and reliable system for all users we restrict access to system administration and other Basis functions.

Q: Do you have IDES installed?
Yes, we do! The IDES (International Demo and Education System) provides a fully functional SAP Server Access and Installation system, including full configuration, master data and transactions. You can see how SAP configured the system and learn from their set-up. Also, the IDES data includes master records and transactions in all modules which means you don't have to do any set up yourself and can start learning right away!

Q: Do you offer multi-user or long-term discounts?
Yes, we do! If you have 5 or more users we will extend a 10% volume discount. Also, if you sign up for SAP access for 3 months or 1 year we will extend a discount ranging from 20-25%.

Q: Do you offer any support?
Absolutely! We offer email support 7 days a week via our online help desk system! Also, you can call us during regular business hours if you prefer to speak with us over the phone. We respond & resolve most issues within 1-3 business day. We support only technical server related issues such as system access , security ,user maintenance ,backup, patches, kernel update ,data restore, performance monitor and We do not, support pre-configuration, functional modules issue,functional additional knowledge,abap dump due to functional lack of knowledge.

Q: What if it just doesn't work for me after I buy access?
We want you to be 100% satisfied with your SAP Server Access and Installation! If you don't like our service tell us and we'll give complete support , at last we will give refund by reducing working days.

Q: Can you offer online training?
Yes, we provide SAP and other trainings online.
SAP HANA 1.X with BO 4.0
Product Description
System Name
Available Modules
FI, CO, HR, SD, MM, PM, PP, QM, CS, CM, Global Trade Managment, Supply Chain Managment, Strategic Enterprise Managment, Invesetment Managment, Project System, Incentive and Commission Managment, Real Estate Managment, Public Sector Managment, Bank Applications: BP, Bank Cusmer Accounts, Loans Managment, Collateral Managment, SEM Banking, Reserve for Bad Debts, etc.,
SAP BI7.01
SAP BI - Advanced Enterprise Data Warehousing & Reporting and SAP Net Weaver, SAP BI - Enterprise Data Warehousing, BI - Reporting & Query Design and Business Planning with SAP NetWeaver BI. BEx analyzer and Designer.
SAP BI 7.01 and ECC6
SAP BI 7.1 and All SAP ECC 6 Modules.
Web UI, Master Data, Marketing, Sales, Service, Interaction Center, E-Commerce, Partner Channel Managment, Industries: Entitlement Managment, Channel Sales, Leasing, Intellectual Property Managment Integration with ECC6.
SAP CRM 7.0 with ECC 6.0
SAP CRM 7.0 (Including Web UI) and SAP ECC 6.0.
SAP ECC 6.0 (All Modules) 
SAP Remote Access @ sapathome
To make outgoing SAP Online Training more available than ever, ERP Training and Consulting has supplemented its already world-classes training with availability of online SAP access. We've designed this to provide all levels of users with the hands-on access they need to better do their jobs. You can conveniently access the SAP environment from the comfort of your home at your own schedule, 24 hours a day and 365 days a year.
SAP IDES (Internet Demo and Educational System) are fully functional regular SAP Systems that come pre-configured by SAP to show how ideal implementations should look like. SAP has IDES developed for a lot of its products, e.g. APO IDES, CRM IDES, BW IDES, etc.

Above all, IDES shows you the possibilities of the integrated applications in the SAP System. IDES cover all aspects of a business enterprise, including Human Resources, Financial Accounting, Product Cost Planning, Overhead Management, Profitability Analysis, Planning, Sales and Distribution, Materials Management, Production, and much, much more. IDES have also integrated document administration and third-party CAD systems within the IDES system. This means that you can call up and display external documents, or access CAD drawings. SAP IDES is a normal SAP software but with lots of DEMO data. SAP IDES รข€“ the "Internet Demonstration and Educational System" in the SAP System, represents a model company. It consists of an international group with subsidiaries in several countries. IDES contains application data for various business scenarios that can be run in the SAP System.