




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Students of Communication, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Class Inheritance, Specific Hierarchy, General Representation, Attributes, Child Class, Parent, Redefined Attributes, Superclass, Parent Class, Singular Inheritance
Typology: Slides
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Enterprise Programming
Inheritance allows grouping of similar classes in a general-to-specific hierarchy. The parent class is a general representation and contains those attributes and methods common to the 'family.' The child class(es) is/are a more specific instance of the parent with added or redefined attributes and/or methods. Often described as a "is a" relationship.
Parent class = superclass
Child class = subclass
Parent Class
Child Classes
document
po_document
sales_document
Common attributes and methods are defined in the superclass.
Items defined in the superclass are inherited in the subclass(es) and considered to be a part of their definition. Avoids redundant definition. Promotes "programming by difference"—subclass only defines those things that are different.
ABAP supports only singular inheritance, so a subclass can have only one parent superclass.
In comparing the superclass and the subclass, which is the more specific class?
A private component (attribute or method) of a superclass cannot be referenced by the subclass. These elements can only be accessed if made available by the superclass through public methods. This is done to ensure security of data.
Attributes and methods can be designated as PROTECTED.
PROTECTED resources are defined in the PROTECTED SECTION of a class definition. Protected resources are visible within the class and its children. Similar to saying something is public to a class and its descendants, but private to everyone else.
In the definition of an Object, the sections must appear in the order: PUBLIC SECTION, PROTECTED SECTION, and PRIVATE SECTION.
A class shares static attributes with its children in the same fashion as other attributes.
A class shares static methods with its children, but those methods cannot be redefined.
Document Reference
P.O. Document Reference
Document Object
P.O. Document Object
Document Reference
P.O. Document Object
P.O. Document Reference
Document
When Document Reference is used to refer to this object, can only use methods and attributes defined for Documents. I lose some abilities. (Have narrower ability.)
When P.O. Document Reference is used to refer to this object, I can use methods and attributes defined for P.O. Documents. (Have wider ability.) However, this is only valid if the object I'm assigned is actually a P.O Document formerly cast using a Narrowing Cast.
Just as TYPES creates local data types, so too does CLASS define local classes. We must use the ABAP Dictionary to define classes that are reusable across programs.
The Class Builder (SE24) is a special maintenance tool that allows the creation of global classes within the ABAP Dictionary. Start the Class Builder and supply the name of the class to be created (respecting the namespace). Specify "Usual ABAP Class". Remove "Final" as it means the Class will not be able to be extended to subclasses. Use Attributes tab to specify Attributes. Use Methods tab to specify Methods. Button for constructor and parameters Double click to define method behavior.