Search icon CANCEL
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 FREE CHAPTER 2. The Basic Structure of ABAP 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

Making changes

There are several ways in SAP to make changes. Some of them are configuration changes, and some are purely programmatical changes.

SAP systems can be enhanced in five ways:

  • Customizing: Specific business and functional process configuration according to the implementation guide. The need to make these changes is predicted by SAP and the procedure of implementation has been developed.
  • Personalization: Setting up global attributes to display certain fields (such as default values or switching off the display of a field).
  • Modification: These are changes SAP Repository objects make at the client side. SAP also can deliver a new version of those objects, and customers need to reflect these changes in the system. Before version 4.0B, customers needed to make this adjustment manually using upgrade utilities. From 4.5A, customers can use the Modification Assistant to automate this procedure.
  • Enhancement: Creating a repository object inside a standard SAP program. More details about enhancement will be in Chapter 10, Modification and Customization Techniques.
  • Custom development: This means creating objects that are unique to the client repository, which is created in the specified namespace, such as Y* or Z*, for all new objects.

In your daily work as an ABAP programmer, your most common work is creating custom developments and enhancements. Since we have a chapter on enhancements, we will focus here on custom development.

In custom development, we can create a custom program and dictionary elements. There will be more about creating dictionary elements in Chapter 2, The Basic Structure of ABAP.

As an example, we will show you how to create one of the most basic programs: Hello World.

In the first step, we need to open one of the most commonly used transactions in our daily work—SE80. This transaction is called Object Navigator, and is a transaction where we can create, change, and delete most ABAP objects.

The main window for the SE80 transaction looks like this:

First, to open the SE80 transaction, we need to put the name of the transaction in the search box, as shown in the following screenshot:

 Press enter, or click on .

After opening a transaction, we need to choose the Program option in the drop-down list on the left and enter the name Z_HELLO_WORLD in the window, as shown in the following example, and press Enter:

In the next window, choose Yes:

Confirm the name of a new program in the next window. Click on  or press Enter:

In the next window, define the attributes of the program, and now press Enter or click on :

After this, choose a package. We need to create a program as a local object, so click on :

After this, we get a window like this:

Now change the mode to Change by clicking on the   icon or pressing Ctrl + F1. The background color of the window with the code will change to white. Now we put the code there.

To print Hello world on the screen, we just need to add this:

WRITE 'Hello World'.
Remember! All ABAP custom programs needs REPORT NAME_OF_PROGRAM at the beginning.

The program looks similar to the following screenshot:

The program now needs to be activated. To activate it, click on  or press Ctrl F3. When an object has been activated, a message will be shown: .

To execute the program, click on  or press F8:

The result of the program is shown in the preceding screenshot.

You have been reading a chapter from
Mastering SAP ABAP
Published in: May 2019
Publisher: Packt
ISBN-13: 9781787288942
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 €18.99/month. Cancel anytime