1 Introduction
The Materials Management functionality in SAP ERP, which in this book we’ll refer to as Materials Management, or MM, is certainly among the largest of its type. The settings in Customizing are therefore especially comprehensive. The customer processes are also extremely complex and multivariant in this area so that the limits of customizing are reached sooner or later.
1.1 Objectives
To cope with the required processes, SAP provides a large number of user exits and BAdIs in MM that allow you to implement highly individual requirements and processes. This book shows you the options available and describes the exact procedure for selecting enhancements so that you can use this technology to optimize your processes.
First of all, you will learn how to generally deal with enhancements, BAdIs, and enhancement spots so that you can easily understand the examples given in this book. The use and programming of selected enhancements in ABAP are described using step-by-step instructions. All ABAP listings are fully displayed with detailed comments so that you can easily apply them in your own custom applications.
1.2 Structure and Content
If you don’t program enhancements very often, you can familiarize yourself with the concepts of user exits, BAdIs, and enhancement spots in Chapter 2. The use and activation of these enhancement options are described based on brief examples.
Chapters follow for each of the major areas in MM: Purchasing (Chapter 3), External Services Management (Chapter 4), Inventory Management (Chapter 5), Evaluation and Account Assignment Area (Chapter 6), and Logistics Invoice Verification (Chapter 7). The most important and most comprehensive enhancement options are described using simple examples to avoid any unnecessary confusion. Because problems are rarely identical, examples are used that convey fundamental functions and options. With this knowledge, you can transfer your individual requirement to the enhancement.
The book concludes with a brief look at the validation and substitution of accounting documents in Chapter 8. With regard to posting goods movements and incoming invoices in MM, accounting documents are also automatically generated as follow-on documents in SAP ERP Financials Financial Accounting, which we’ll refer to as Financial Accounting, or FI. Users frequently want to add additional data from MM to this FI document or use additional checks from the accounting point of view. This technology can also be used as a replacement for possible available custom checks in user units or BAdIs because you can build up a central set of rules in one place, regardless of whether a document comes from the Inventory Management, the Logistics Invoice Verification, or the FI system itself.
Appendix A provides an overview of the user exits and BAdIs in in MM. The Appendix is divided into the same areas as the chapters of this book. Areas that have many enhancements are further structured so that you can quickly find all available enhancements on a specific transaction or on a specific procedure.
1.3 Target Audience
This book is mainly aimed at MM consultants who only have a basic knowledge of ABAP, but it’s also for experienced ABAP programmers who may have little knowledge of MM. However, even if you are an experienced MM consultant and programmer, you can use this book as a reference guide and perhaps even learn one or two tricks.
Whichever group you belong to, rest assured that this book offers the necessary coverage of ABAP and logistics without straying far from the fundamentals.
1.4 Prerequisites
Although this book is primarily aimed at consultants with little experience in programming, you should have the fundamental ABAP knowledge at the SAP BC400 training level. The use of ABAP objects, unless absolutely necessary, has been omitted. Nevertheless, there are individual BAdIs that have an object-oriented approach, which must be kept in the programming.
However, you don’t need any deep knowledge in object-oriented programming. Knowledge of the essential basic concepts of object orientation is enough in these cases. Some special features of object orientation in this book, such as interfaces or upcast implementations, are only described briefly.
The examples can in principle be understood in each R/3 system from Release 4.6C, or in an SAP ERP Central Component system from Release 5.0. Some enhancements have only been introduced in a later release and are therefore only available in more recent SAP systems. Appendix A provides the prerequisites for specific enhancements.
2 General Information on User Exits and BAdIs
You’ve possibly purchased this book because you already have a good understanding of SAP components for Materials Management (MM), but you only have a fundamental knowledge of ABAP programming. Perhaps you program more frequently but have little contact with the latest technologies, such as the enhancement spots that will gradually replace the classic BAdIs.
User exits, BAdIs, and enhancement spots fulfill the same purpose. When SAP applications and programs run according to a predefined schema that doesn’t always precisely fit in with your enterprise requirements, a navigation option is provided with enhancements in positions selected by SAP, which you can use to exit the standard coding. You can activate these navigation options, if necessary, and assign your own ABAP code, which means you can change data provided in a defined interface or completely integrate your custom functions here.
In this chapter, the various enhancement options are introduced and explained using a step-by-step example. If you’ve already implemented numerous enhancements in SAP systems, and you’re only searching for specific information on MM, feel free to skip this chapter.
2.1 Using User Exits
User exits constitute the oldest SAP enhancement technology still in use today. In this section, the main focus is on dealing fundamentally with user exits. To better illustrate the technology, the following example shows how you can use and activate user exits: If a purchase requisition is converted into an order, this is logged in the change documents of the purchase requisition using enhancement MM06E007.
Concepts from the World of User Exits
Numerous concepts are important for understanding user exits:
-
Enhancement
Enhancements are provided by SAP and include one or several components that, as a whole, allow for a defined functionality.
-
Components
Components are the elements of an enhancement that are ultimately used to customize the standard. Components can be exit modules or dynpros for custom-specific fields.
...