Book Image

Mastering SAP ABAP

By : Paweł Grześkowiak, Wojciech Ciesielski, Wojciech Ćwik
Book Image

Mastering SAP ABAP

By: Paweł Grześkowiak, Wojciech Ciesielski, Wojciech Ćwik

Overview of this book

Advanced Business Application Programming (ABAP) is an established and complex programming language in the IT industry. This book is designed to help you use the latest ABAP techniques and apply legacy constructions using practical examples. You'll start with a quick refresher on language and database concepts, followed by agile techniques for adding custom code to a modern ABAP system. After this, you will get up to speed with the complete ABAP toolset for importing data to and from different environments. Next, you'll learn how to print forms and work with the different ABAP tools for Extensible Markup Language (XML) manipulation. While covering further chapters, you'll gain insights into building stunning UI5 interfaces, in addition to learning how to develop simple apps using the Business Object Processing Framework (BOPF). You will also pick up the technique of handling exceptions and performing testing in ABAP. In the concluding chapters, you can look forward to grasping various techniques for optimizing the performance of programs using a variety of performance analysis tools. By the end of this book, you will have the expertise you need to confidently build maintainable programs in Systems, Applications, and Products (SAP).
Table of Contents (25 chapters)
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Preface
Index

Designing the business logic


The business logic layer is meant to handle business objects and the interaction between them. Decouple it from the service and database layers—it should know as little about the database access or user interaction as possible, yet exchange information with them as needed using a level of abstraction, such as interfaces or base classes. The business logic should focus on transforming and calculating data, leaving other tasks to other layers.

Minimize the complexity of the business logic itself by separating concerns into different areas. Keep the processing, workflow, and business entities separated and loosely coupled. The separation will make the implementation easier to follow, whereas loose coupling will allow modification with a relatively low cost. Then, make sure you avoid the duplication of functionalities in different areas by reusing common parts of business logic.

Identify the consumers of the business layer so that the data can be exposed in the desired way. This will prevent the additional effort of converting data from one format to another. Having consumers in mind, make sure you have prepared not only the functional logic, but also various auxiliary aspects, such as security requirements, validations, exception management, and concurrency—keep them consistent and manage them centrally if possible.

Do not forget about unexpected situations and audits—use logs to store the history of critical changes or errors, yet without business-sensitive data. Ensure that errors in the logging process itself do not affect the normal functionality of the system—keep it as a separate logical unit. Make sure that the logged information is sufficient to track the root causes of any problems.