ABAP OO Design part 3: Step 1 Determine actions from specification
The first OO design step is thinking of what actions are needed to create the software.
This step is not different from procedural designing. That makes sense, because no matter you use OO or procedural programming, the software must result in the same outcome. The difference between procedural and object oriented programming is in how it is programmed.
The specifications in the example are only intended as an example for these ABAP OO Design blog posts. Well-described specifications are the most important aspect for creating software. In the examples below, the specifications are described too briefly for real life specifications. The specifications lack detail such as field definitions, validations, form layout design, detailed logic, error handling and so on, but are detailed enough for OO design.
In the paragraphs below the example specifications are written to actions.
Example: Send Sales Order document by Email to Customer.
When the Sales Order is created and saved, automatically an Output message (NAST) is created and executed. This Output message will trigger the creation of the Sales Order document. The Sales Order will be added to an new email and will be sent to the customer.
- Creating an output message (NAST) during creation of the Sales Order.
This is customizing, therefor no custom ABAP needed for this action.
- Create Print program which is needed for the Classic Output Message Framework (TNAPR/NAST).
- Read Sales Order Document Data.
- Create Sales Order Form (T:SFP – Adobe Forms)
- Create Sales Order Document, based on
- Sales Order Form (T:SFP – Adobe Forms)
- Sales Order Document Data
- Create and Send Email
- Add Sales Order Document as attachment
In the design step you might forget steps and that is not a problem. During optimization of the class diagram all classes will be looked at again.
In this case I forgot some sub steps for “Create and Send Email”
- Get Email content.
This content is Sales order number, Customer name and Customer email address.)
- Get Email content.
Example: Create Starter Pack Sales Order by Incoming interface
A Fiori app is created to execute a Fast Sales Order Entry screen for ordering a free Starter pack product.
The Sales employee enters the customer name, address, email address. A Contract PDF file is generated and is signed by the customer.
The starting point is that the Starter Pack Sales Order app will be created in Fiori. The back end has to be developed in SAP S/4HANA.
- Receive Starter Pack Sales Order data from Fiori.
- Determine Starter Pack Material.
- Create Customer.
- Create Starter Pack Sales Order.
- Add Contract PDF file to the Sales Order.
Example: Add a Christmas Present material to Sales Orders by Batch program
There is a batch program needed to add a Christmas Present material to open Sales Orders which have a net value more than 50 euro. After adding it, a notification email will be sent to the customer.
- Batch program with selection screen with test run parameter.
- Select Sales Orders
- Which are open.
- Which have a net value more than 50 euro.
- If Sales Order has already Christmas Present material, then skip the Sales Order.
- Add Christmas Bonus material to Sales Order.
- Send notification email to customer.
- Write log to ABAP list.
- Write errors to Application log.
Up next will be the blog post about the Class Categories.