Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Mastering SAP ABAP: A complete guide to developing fast, durable, and maintainable ABAP programs in SAP
Mastering SAP ABAP: A complete guide to developing fast, durable, and maintainable ABAP programs in SAP
Mastering SAP ABAP: A complete guide to developing fast, durable, and maintainable ABAP programs in SAP
Ebook839 pages4 hours

Mastering SAP ABAP: A complete guide to developing fast, durable, and maintainable ABAP programs in SAP

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Take your SAP ABAP skills to the next level by mastering ABAP programming techniques with the help of real-world examples




Key Features



  • Become adept at building interfaces and explore ABAP tools and techniques


  • Discover the modern functionalities available in the latest version of ABAP


  • Learn the process of creating stunning HTML5 applications using SAPUI5



Book Description



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).




What you will learn



  • Create stable and error-free ABAP programs


  • Leverage new ABAP concepts including object-oriented programming(OOP) and Model-View-Controller (MVC)


  • Learn to add custom code to your existing SAP program


  • Speed up your ABAP programs by spotting bottlenecks


  • Understand techniques such as performance tuning and optimization


  • Develop modern and beautiful user interfaces (UIs) in an ABAP environment


  • Build multiple classes with any nesting level



Who this book is for



This book is for developers who want to learn and use ABAP skills to become an industry expert. Familiarity with object-oriented programming concepts is expected.

LanguageEnglish
Release dateMay 31, 2019
ISBN9781787129498
Mastering SAP ABAP: A complete guide to developing fast, durable, and maintainable ABAP programs in SAP

Related to Mastering SAP ABAP

Related ebooks

Enterprise Applications For You

View More

Related articles

Reviews for Mastering SAP ABAP

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Mastering SAP ABAP - Pawel Grzeskowiak

    Mastering SAP ABAP

    Mastering SAP ABAP

    A complete guide to developing fast, durable, and maintainable ABAP programs in SAP

    Paweł Grześkowiak

    Wojciech Ciesielski

    Wojciech Ćwik

    BIRMINGHAM - MUMBAI

    Mastering SAP ABAP

    Copyright © 2019 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    Commissioning Editor: Aaron Lazar

    Acquisition Editor: Shahnish Khan

    Content Development Editor: Akshita Billava

    Technical Editor: Ashi Singh, Neha Pande

    Copy Editor: Safis Editing

    Language Support Editor: Storm Mann

    Project Coordinator: Vaidehi Sawant

    Proofreader: Safis Editing

    Indexer: Pratik Shirodkar

    Graphics: Jisha Chirayil

    Production Coordinator: Aparna Bhagat

    First published: May 2019

    Production reference: 1280519

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham

    B3 2PB, UK.

    ISBN 978-1-78728-894-2

    www.packtpub.com

    I would like to dedicate this book to my fiancée, Natalia, for her support

    and unlimited level of patience.

    – Paweł Grześkowiak

    To my wife, Anna, for being my loving partner throughout our joint life journey.

    To my mother, Danuta, and to the memory of my father, Bogumił, for their sacrifices and

    for exemplifying the power of determination, love, support, and inspiration;

    and to my sister, Ewelina, for her smile and for not giving up.

    – Wojciech Ciesielski

    I dedicate this book to my wife, Jagoda, for her love, faith, support, and for being

    an invaluable life companion.

    – Wojciech Ćwik

    mapt.io

    Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

    Why subscribe?

    Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals

    Improve your learning with Skill Plans built especially for you

    Get a free eBook or video every month

    Mapt is fully searchable

    Copy and paste, print, and bookmark content

    Packt.com

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

    At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. 

    Contributors

    About the authors

    Paweł Grześkowiak has been passionate about programming from his early years, and since 2012 he has been a SAP technical consultant—mainly in the ABAP area. He has expertise in boosting implementations in the rail transport industry, the chemical industry, media, government administration, the wood industry, and banking. Currently, he designs extensions to SAP S4/HANA systems in ABAP and Java. He is an active member of the SAP community and a three-time SAP Inside Track conference organizer.

    I would like to thank all my colleagues from Capgemini who helped make this book better: Krzysztof Bulanowski, Daniel Iwanowski, Bogdan Brzozowski, Mateusz Skadorwa, Marcin Maciejewski, Piotr Roszak, and Marcin Bielecki. Special thanks to Anna Wilk for checking all the examples carefully and for her brilliant review. Last but not least, many thanks to my Capgemini mentor, Paweł Gaura, for his support in my career and development.

    Wojciech Ciesielski graduated from the Wroclaw University of Technology with an Engineering degree in Automation and  Robotics, and he has a master's degree in Management in WSB Universities. Since then, he has been tightly connected with the SAP environment, working as an ABAP consultant. He has several years of business background in ABAP development and the use of modern technologies in business. He is experienced in working with ERP and CRM systems and integrating them with third-party solutions—from single companies to multinational corporations. He is a co-creator of innovative solutions delivered to the wide international audience of SAP events. He is currently focused on new technologies and solutions in the SAP portfolio: SAP Cloud Platform, Internet of Things, and artificial intelligence; but he is also increasing his expertise in development with other languages.

    Wojciech Ćwik has been a certified ABAP consultant for several years, with a specialty in mobile solutions, especially in creating interfaces between SAP and frontend solutions from Fiori and third-party platforms; he also enjoys creating architectures in SAP ERP ecosystems. He is a co-originator of an unconventional system linking new solutions from the SAP portfolio such as IoT, SAP Cloud, and SAP blockchain services.

    About the reviewer

    Dariusz Pacynko graduated from Wroclaw University of Technology with an MSc degree in Optical Engineering. Since then, he has been tightly connected with the SAP environment, working as an ABAP consultant. He has multiple certifications, such as ABAP with SAP Netweaver 7.40 Development Associate, and several years of business background including experience with ABAP development, OData services, and SAPUI5 applications. He is experienced in working with ERP and CRM systems, integrating them with third-party solutions, and opening them to the mobile philosophy. He is a co-creator of innovative solutions delivered to the wide international audience of SAP events. He is currently focused on the new technologies and solutions in the SAP portfolio, such as SAP Cloud and IoT, but he is also increasing his expertise in Fiori development.

    Packt is searching for authors like you

    If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.

    Table of Contents

    Title Page

    Copyright and Credits

    Mastering SAP ABAP

    Dedication

    About Packt

    Why subscribe?

    Packt.com

    Contributors

    About the authors

    About the reviewer

    Packt is searching for authors like you

    Preface

    Who this book is for

    What this book covers

    To get the most out of this book

    Download the example code files

    Download the color images

    Code in action

    Conventions used

    Get in touch

    Reviews

    Creating Custom Code

    Technical requirements

    Making changes

    Design thinking

    BDUF/LDUF

    Designing for quality and use

    Designing the UI

    Designing services

    Designing the business logic

    Designing the database

    Agile principles

    DevOps

    Continuous delivery

    Summary

    Questions

    The Basic Structure of ABAP

    Technical requirements

    The Data Dictionary

    Domains

    Data elements

    Structures

    Search helps

    Table types

    Databases

    Data declaration

    Field symbol

    Summary

    Questions 

    Database Access in ABAP

    Technical requirements

    Starting with OpenSQL

    Basics

    Possibilities with SELECT - the first part of the SQL statement

    Possibilities with INTO - the third part of the SQL statement

    The WHERE condition

    How to see data selected from a database

    More advanced possibilities in OpenSQL

    WHERE conditions

    Dynamic SELECT in WHERE

    SINGLE FOR UPDATE

    GROUP BY

    ORDER BY

    UP TO and ROWS

    SELECT and ENDSELECT

    FOR ALL ENTRIES

    Subqueries

    Reading data from several tables

    Identifying and saving the changes

    Creating datasets

    Updating datasets

    Deleting datasets

    The optimization of reading big datasets

    The new SQL syntax

    Inline declaration

    SQL expression

    Using the SQL Trace tool for performance analysis

    Summary

    Questions

    Import and Export to Document Formats

    Technical requirements

    Client-side file processing

    Reading files from the local PC using gui_upload

    Writing files to the local PC using gui_download

    Server-side file processing

    Basic transactions related to server-side files

    Writing files to the application server

    Reading files from the application server

    Working with Microsoft Office files

    Reading data from Microsoft Excel

    Saving a table to a Microsoft Excel file

    Working with Microsoft Word

    Using DOI to integrate Microsoft Office applications into ABAP reports

    Summary

    Questions

    Further reading

    Exposing Data to Print Forms

    Technical requirements

    Introduction to printouts in SAP

    SAPScript - the great-grandfather of all printouts

    Creating our first SmartForm

    Adobe Forms

    Creating our first Adobe Form

    Summary

    Questions

    Further reading

    ABAP and XML

    Technical requirements

    Using the CL_XML_DOCUMENT class for XML

    Reading and parsing XML files to ABAP

    Changing XML data

    Simple transformations in ABAP

    Serialization using ST

    Deserialization using ST

    sXML library for XML and JSON

    Converting XML to JSON

    Summary

    Questions

    Further reading

    Building User Interfaces

    Technical requirements

    Classic DynPro

    Screen painter

    Selection screens

    More advanced options of the selection screen

    Checkbox

    Radiobutton

    Blocks in selection screens

    Selection screen event model

    ALV

    Basics

    Advanced capabilities of ALV sand screens

    Zebra

    Coloring

    Event of an ALV, exemplified by a button click 

    Icons in the ALV

    Text fields and translations

    Input/output field

    Radiobuttons and checkbox

    Button

    Dynamic display possibilities for individual elements and groups

    Summary

    Questions

    Creating Stunning UI5 Interfaces

    Technical requirements

    Development tools

    Layouts and floorplans

    SAP Fiori elements

    The analytical list page

    The list report

    The object page

    The overview page

    The worklist

    Layouts

    Floorplans

    The initial page floorplan

    The multi-instance floorplan

    The wizard floorplan

    Basic templates

    The SAPUI5 library

    Control documentation page and inheritance

    Contextual info

    Overview

    Constructor

    Properties

    Associations

    Aggregations

    Events

    Methods

    Inheritance

    Main controls

    Custom controls

    Creating our first mobile app

    Application and project structure

    index.html

    The standard variant

    The content delivery network

    The miscellaneous variants

    Component.js

    manifest.json

    Views and controllers

    MainView.view.xml

    SearchView.view.xml

    SearchView.controller.js

    i18n.properties

    Testing SAPUI5 apps

    Mock Server

    Unit tests

    Integration tests

    Summary

    Questions

    Further reading

    Business Object Processing Framework

    Technical requirements

    An introduction to BOPF

    Transaction

    Nodes and entities

    First BOPF example 

    Creating the object

    Displaying an object

    Summary

    Questions

    Further reading

    Modification and Customization Techniques

    Technical requirements

    Legacy ways of changing the standard

    Customer Exits

    Using BTE to extend FI functionality

    Modifications

    FQEVENTS

    Appends

    Classical BAdl

    Enhancement framework and its components

    Enhancement sections and Enhancement points

    Implicit enhancements

    Summary

    Questions

    Further reading

    Handling Exceptions in ABAP

    Technical requirements

    Classic exception handling

    Handling

    Raising

    Class-based exceptions

    Handling

    Raising

    Assertions

    Building a checkpoint group

    Defining assertions

    Using assertions

    Runtime errors

    ABAP dump analysis tool

    Error log

    System environment

    User View

    ABAP developer View

    BASIS developer View

    Summary

    Questions

    Testing ABAP programs

    Technical requirements

    Testing the quality of code

    Static testing with Code Inspector and ABAP Test Cockpit

    Testing and troubleshooting

    ABAP Memory Inspector

    Advanced ABAP debugger techniques

    Testing with eCATT

    Summary

    Questions

    Further reading

    Advanced Techniques in ABAP Objects

    Technical requirements

    Global versus local classes

    Creating a local class

    Creating a global class

    The static method versus the instance method

    Nested classes

    A class as an attribute of the class

    Inheritance

    Interfaces

    The event concept

    ABAP Objects design patterns

    Prototype - creation pattern

    Singleton - creation pattern

    Facade - structural pattern

    Decorator - structural pattern

    Observer - behavioral pattern

    Strategy - behavioral pattern

    Summary

    Questions

    Integrating SAP with Third-Party Systems

    Technical requirements

    IDoc 

    IDoc overview

    The construction of IDoc

    The EDI system

    ALE

    Differentiating ALE from EDI

    BAPI

    Implementing BAPI

    SAP Gateway

    Deployment variants

    Embedded

    Hub

    Hub (with development)

    Main tools

    Gateway Service Maintenance

    Gateway Client

    Error Log

    Gateway Service Builder

    The OData protocol

    Characteristics

    The service definition

    Developing our first OData application

    Design time

    Providing data

    Summary

    Questions

    The Background Processing of ABAP Programs

    Technical requirements

    Background processing in SAP

    Background remote function call

    Scheduling background jobs

    Creating a background job

    Recording batch input sessions

    Summary

    Questions

    Performance and Optimization of ABAP Code

    Technical requirements

    Ways of measuring ABAP programs performance

    ABAP runtime analysis

    ABAP trace analysis

    ABAP SAT transactions

    Best practice techniques

    Summary

    Questions

    Assessments

    Answers

    Chapter 1 - Creating Custom Code

    Chapter 2 - The Basic Structures of ABAP

    Chapter 3 - Database Access in ABAP

    Chapter 4 - Import and Export to Document Formats

    Chapter 5 - Exposing Data to Print Forms

    Chapter 6 - ABAP and XML

    Chapter 7 - Building User Interfaces

    Chapter 8 - Creating Stunning UI5 Interfaces

    Chapter 9 - Business Object Processing Framework

    Chapter 10 - Modification and Customization Techniques

    Chapter 11 - Handling Exceptions in ABAP

    Chapter 12 - Testing ABAP Programs

    Chapter 13 - Advanced Techniques in ABAP Objects

    Chapter 14 - Integrating SAP with Third-Party Systems

    Chapter 15 - Background Processing of ABAP Programs

    Chapter 16 - Performance and Optimization of ABAP Code

    Additional tutorials

    Creating a report from the template

    Uploading graphics to SE78

    Another Book You May Enjoy

    Leave a review - let other readers know what you think

    Preface

    Advanced Business Application Programming (ABAP) is an established and complex programming language in the IT industry. This book will be your guide to becoming an industry expert in Systems, Applications, Products (SAP) ABAP. You will learn how to write custom code that is suited for the latest version of SAP ABAP as well as the older versions of SAP. By exploring practical examples, you will learn how to make user-friendly interfaces and will uncover various ways to optimize your ABAP code.

    Who this book is for

    This book is for developers who want to learn and use ABAP skills in order to become an industry expert. Familiarity with object-oriented programming concepts is expected.

    What this book covers

    Chapter 1, Creating Custom Code, focuses on available actions for changing SAP systems within the modern and ever-changing SAP wold.

    Chapter 2, The Basic Structure of ABAP, focuses on the distinction between ABAP and modern programming languages.

    Chapter 3, Database Access in ABAP, describes how to extract data from a database in ABAP.

    Chapter 4, Import and Export to Document Formats, focuses on the toolset the ABAP developer has for importing and exporting data to/from different environments.

    Chapter 5, Exposing Data to Print Forms, explains how to represent extracted data in a user-friendly print form, how to make it clearly readable, and how to make its maintenance less time-consuming.

    Chapter 6, ABAP and XML, deals with the different tools ABAP has for XML manipulation, their performance features, and what real-life scenarios they are intended for.

    Chapter 7, Building User Interfaces, focuses on how to build classical Dynpro with the help of ABAP tools. It explains what screen types exist and how they are interconnected with each other, what GUI controls ABAP developers have in their toolset, and which of them are recommended and which are not. It also describes ABAP List Viewer (ALV) controls and the ALV component model.

    Chapter 8, Creating Stunning UI5 Interfaces, places UI5 in the family of SAP interfaces and explains how to use it in the most efficient way.

    Chapter 9, Business Object Processing Framework, gives an overview of Business Object Processing Framework (BOPF) and explains why it is important in SAP environments for the acceleration of development, easier maintenance, and supportability.

    Chapter 10, Modification and Customization Techniques, describes the customization techniques across SAP modules, explaining which techniques are recommended to use and which are outdated.

    Chapter 11, Handling Exceptions in ABAP, covers testing exceptions in ABAP, the types of exception that have existed from the beginning, and the types we have now. It also recommends the proper way of handling exceptions, explaining in which situations it is strongly required, and those in which it is not recommended.

    Chapter 12, Testing ABAP Programs, explains how to test ABAP programs for performance without sacrificing the clarity of ABAP code and how to use the ABAP Debugger correctly to find bottlenecks and speed up ABAP programs.

    Chapter 13, Advanced Techniques in ABAP Objects, deals with the advantages ABAP objects bring to the development process. 

    Chapter 14, Integrating SAP with Third-Party Systems, focuses on how to build a stable and error-prone connection of a SAP system with non-SAP software.

    Chapter 15, Background Processing of ABAP Programs, reveals all the ins and outs of background data processing in SAP that you may face, and the approaches that are used to handle with them.

    Chapter 16, Performance and Optimization of ABAP, provides a thorough review of the available ABAP toolset for testing the performance of ABAP apps and tuning their execution. It also gives some best practice tips and tricks of internal ABAP statements and focuses on tracing and tuning OpenSQL selections.

    To get the most out of this book

    The reader should know the basics of programming, as well as the basics of SQL and operations on databases. Basic knowledge of business processes will also be helpful. This book also deals with the subject of UI5; therefore, it is worth the reader knowing the basics of JavaScript. 

    To create code in ABAP, the readers also need access to SAP systems with the developer key. 

    To create applications in UI5, the readers should create a trial account in the SAP Cloud Platform. The SAP Web IDE Full-Stack developer environment is available there. The programming environment allows you to create and extend SAP applications on a full stack for browsers and mobile devices.

    Download the example code files

    You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

    You can download the code files by following these steps:

    Log in or register at www.packt.com.

    Select the SUPPORT tab.

    Click on Code Downloads & Errata.

    Enter the name of the book in the Search box and follow the onscreen instructions.

    Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

    WinRAR/7-Zip for Windows

    Zipeg/iZip/UnRarX for Mac

    7-Zip/PeaZip for Linux

    The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-SAP-ABAP. In case there's an update to the code, it will be updated on the existing GitHub repository.

    We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

    Download the color images

    We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781787288942_ColorImages.pdf.

    Code in action

    Visit the following link to check out videos of the code being run: http://bit.ly/2M4ILyK.

    Conventions used

    There are a number of text conventions used throughout this book.

    CodeInText: Indicates code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: In the Details window, create lines %C1 and %C2 with the values that are shown in the following screenshot.

    A block of code is set as follows:

        id=sap-ui-bootstrap

        src=resources/sap-ui-core.js

        data-sap-ui-libs=sap.m

        data-sap-ui-theme=sap_belize>

    When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    data-sap-ui-bindingSyntaxt=complex

    data-sap-ui-resourceroots='{ my.namespace:./ }'

    Any command-line input or output is written as follows:

    $ mkdir css

    $ cd css

    Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: Select System info from the Administration panel.

    Warnings or important notes appear like this.

    Tips and tricks appear like this.

    Get in touch

    Feedback from our readers is always welcome.

    General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

    Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

    Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

    If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

    Reviews

    Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

    For more information about Packt, please visit packt.com.

    Creating Custom Code

    The chapter is an introduction to the Systems, Applications, Products (SAP) system. You will learn how to organize their daily work, how to act within SAP systems, how to add custom code, and how to change software features of SAP systems. This chapter presents modern techniques of cooperation within a company. Basic knowledge of these issues is required to work with the SAP system. This chapter is an introduction to the more complex and difficult topics contained in this book.

    The following topics will be covered in this chapter: 

    Making changes

    Design thinking

    Big Design Up Front/Little Design Up Front (BDUF/LDUF)

    Designing for quality and use

    Designing the User Interface (UI)

    Designing the services

    Designing the business logic

    Designing the database

    Agile principles

    DevOps

    Continuous Delivery

    Technical requirements

    This chapter does not have complex technical requirements. To check the solutions and examples, it is worth having user access to the SAP system. Other information (for example, agile designing the UI) can be better understood by IT employees. However, it is worthwhile for everyone who's interested in working with SAP systems to read the information contained in this chapter.

    All the code used in this chapter can be downloaded from the following GitHub link: https://github.com/PacktPublishing/Mastering-SAP-ABAP/tree/master/Chapter01.

    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.

    Design thinking

    Design thinking is a method of creative problem-solving. This method is designed to deliver innovative solutions by using a specific work method. The motto of this method is doing, not talking, so going over every detail of the project is changed into a multi stage division of tasks in order to extend and refine subsequent tasks.

    The process of design thinking is divided into five steps:

    Empathy: All of the new solutions are created for people. Therefore, the needs of a given group of people should be known, and this is why empathy is the starting point of all projects created by design thinking. To find the optimal solution, we need to see how this solution will help the common user.

    Define the problem: In this stage, we need to define the exact problem to solve. We need to remember not to define problems in too narrow or too wide a range so that the solution will not be limited by rigid frames.

    Ideas: This stage consists of creating as many ideas as possible for solutions relating to the previously defined problem. In this step, a brainstorm is very useful. The important thing is not to stick to your own ideas, and not to judge others. These sessions should be ended by choosing a concrete solution, which will be picked from the previously selected ideas.

    Prototypes: Creating the prototypes is an indispensable step. Building prototypes should not be a very complicated process. The most important thing is to make a preliminary visualization of the idea, because only in that way can the idea be tested naturally. Every subsequent prototype should be created by thinking of the user and answering concrete questions.

    Tests: This step is extremely important. In this step, the product is tested in a real environment, so you can check that it functions correctly. Every prototype can be evaluated by the group (for example, the project group), and the best one will be chosen for further improvements. Testing should be repeated until a satisfactory result is obtained.

    Enjoying the preview?
    Page 1 of 1