💼 ABAP PACT DIFFICULTY: Adept Creational

Factory Method in ABAP

Enterprise pact magic using the Factory Method pattern.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Corporate // Enterprise Runes
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ABAP PATTERN //
CLASS lcl_enterprise_creator DEFINITION ABSTRACT.
  PUBLIC SECTION.
    METHODS factory_method ABSTRACT RETURNING VALUE(ro_product) TYPE REF TO object.
ENDCLASS.
CLASS lcl_concrete_enterprise_creator DEFINITION INHERITING FROM lcl_enterprise_creator.
  PUBLIC SECTION.
    METHODS factory_method REDEFINITION.
ENDCLASS.
CLASS lcl_concrete_enterprise_creator IMPLEMENTATION.
  METHOD factory_method.
    " Spawn entity
  ENDMETHOD.
ENDCLASS.

Factory Method

The Factory Method pattern binds the volatile entities of the ABAP runtime into a highly structured enterprise pact, ensuring safe transaction execution within the vast corporate core.

Runic Tags: #abap #factory-method #enterprise #magic