Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

ALV


In this section, I will present an example of how to create ALVs in two ways. In the same example, I will show you the possibilities of ALVs, also using the selection screen created before.

ALV is an integrated element of the ABAP objects environment. This makes it possible to implement the display of structured datasets. We can display simple and two-dimensional tables, hierarchical-sequential lists, and tree structures.

The possibilities of these two methods are similar, so I will present all examples based on the CL_GUI_ALV_GRIDclass and then I will present code where I created a basic ALV by using SALV classes.

Basics

If we want to create an ALV first, we need to declare a local variable of type references to the cl_gui_alv_grid class, a variable of type references to the cl_gui_custom_container class, and a local constant with the name of the container and the table where we store data that will be shown on screen:

DATA: lt_spfli      TYPE TABLE OF spfli,
      lr_alv        TYPE REF...
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