Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering SAP ABAP

You're reading from   Mastering SAP ABAP A complete guide to developing fast, durable, and maintainable ABAP programs in SAP

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781787288942
Length 548 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
Wojciech Ciesielski Wojciech Ciesielski
Author Profile Icon Wojciech Ciesielski
Wojciech Ciesielski
Philipp Deth Philipp Deth
Author Profile Icon Philipp Deth
Philipp Deth
Paweł Grześkowiak Paweł Grześkowiak
Author Profile Icon Paweł Grześkowiak
Paweł Grześkowiak
Wojciech Ćwik Wojciech Ćwik
Author Profile Icon Wojciech Ćwik
Wojciech Ćwik
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Creating Custom Code 2. The Basic Structure of ABAP FREE CHAPTER 3. Database Access in ABAP 4. Import and Export to Document Formats 5. Exposing Data to Print Forms 6. ABAP and XML 7. Building User Interfaces 8. Creating Stunning UI5 Interfaces 9. Business Object Processing Framework 10. Modification and Customization Techniques 11. Handling Exceptions in ABAP 12. Testing ABAP programs 13. Advanced Techniques in ABAP Objects 14. Integrating SAP with Third-Party Systems 15. The Background Processing of ABAP Programs 16. Performance and Optimization of ABAP Code 17. Assessments 18. Another Book You May Enjoy

First BOPF example 


In this section, we will try to play around with one of standard BOs to get a better understanding of how individual elements interact with each other. This example uses a standard object called /BOBF/DEMO_PRODUCT, which represents the product. 

Creating the object

Create a new report called ZMSA_R_CHAPTER9_1 in the ABAP Workbench and pass the report template from the Appendix. We will start by adding class attributes, that is, the three main BOPF API classes I mentioned previously. Put the following code into a private section of the lcl_demo class definition:

DATA: mo_transaction_mgr TYPE REF TO /bobf/if_tra_transaction_mgr.
DATA: mo_service_manager TYPE REF TO /bobf/if_tra_service_manager.
DATA: mo_configuration TYPE REF TO /bobf/if_frw_configuration.

We also need a specific constructor definition:

METHODS:
constructor RAISING /bobf/cx_frw. 

The custom constructor initializes all of the variables. For this, we will use factory classes and their corresponding factory methods...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image