Page tree
Skip to end of metadata
Go to start of metadata

Factory Method design pattern could be most used design pattern in the modern world application. Factory method design pattern hides all the complexity of the instantiating an object from the consumer. This DP provides an unique interface for object instantiation. This interface creates an object but let subclasses decide which class
to instantiate.

Design time consideration:

  1. Create a Super Class with Factory method
  2. Create importing parameters: This would be used as conditions to define the subclass name
  3. Inherit the Subclasses from the Super class
  4. Define an object reference type to Super Class

Follow this ABAP Objects Design Patterns – Factory Method for more information (NOTE: outside SDN link).