Table of Contents

Open all
Close all
Preface
11
1 Introduction
13
1.1 Objectives
13
1.2 Structure and Content
13
1.3 Target Audience
14
1.4 Prerequisites
14
2 General Information on User Exits and BAdIs
17
2.1 Using User Exits
17
2.1.1 Finding and Viewing Enhancements
18
2.1.2 Creating a Project and Assigning Enhancements
18
2.1.3 Using Components of the Project
19
2.1.4 Activating and Deactivating Projects
21
2.2 Use of Classic BAdIs
22
2.2.1 Finding and Viewing Enhancements
22
2.2.2 Creating a BAdI Implementation
24
2.2.3 Working with Methods
25
2.2.4 Activating and Deactivating BAdIs
27
2.2.5 Enhanced Editing Options
28
2.3 Use of New BAdIs (Enhancement Spots)
29
2.3.1 SAP Enhancement Framework
29
2.3.2 Finding and Viewing Enhancement Spots
30
2.3.3 Creating Enhancement Implementations
31
2.3.4 Working with Methods
33
2.3.5 Activating and Deactivating BAdIs
34
3 User Exits and BAdIs in Purchasing
37
3.1 Customized Fields in Purchase Orders
37
3.1.1 Overview of the Implementation
38
3.1.2 Implementation of Custom Purchase Order Data and Function Group
42
3.1.3 Integration of Custom Fields into the BAdIs
54
3.1.4 Integration of Customer Fields into the Business Logic
61
3.1.5 Initializing, Reading, and Updating Data
68
3.1.6 Display of Error Messages
69
3.2 Customizing the Document Overview in Purchase Requisitions or Purchase Orders
72
3.2.1 Removal of a Standard Selection Variant
72
3.2.2 Inserting Custom Selection Variants
75
4 User Exits and BAdIs in External Services Management
83
4.1 Prepopulating Account Assignment for Service Lines
83
4.2 Input Check of the Service Lines
86
4.2.1 Prepopulating Fields in EXIT_SAPLMLSP_030
87
4.2.2 Input Check in EXIT_SAPLMLSP_031
88
4.3 Prepopulation of the Header Data in the Data Entry Sheet
89
5 User Exits and BAdIs in Inventory Management
93
5.1 Custom Fields in Transaction MIGO
93
5.1.1 Custom Fields: An Overview
94
5.1.2 Preparations in the ABAP Dictionary
97
5.1.3 Preparation of the Function Group
98
5.1.4 Preparation and Status Management in MB_MIGO_BADI
104
5.1.5 Activation of Custom Header Data
109
5.1.6 Activation of Custom Item Data
112
5.1.7 Updating the Data
117
5.2 Other Functions of the BAdI MB_MIGO_BADI
118
5.2.1 Noting Custom Data
119
5.2.2 Input Checks in Transaction MIGO
123
5.3 Checking and Prepopulating Standard Fields
125
5.3.1 Prepopulation of Storage Location and Text
125
5.3.2 Checking the Standard Fields
126
5.4 Check of the Earliest Delivery Date
127
5.5 Tolerance Limits for Scheduling Agreements
129
5.5.1 Overwriting Overdelivery Quantity
129
5.5.2 Overwriting Default Quantity
132
5.6 Enhancement of Reservations
134
5.6.1 Prepopulating Fields
135
5.6.2 Checking Entries
137
6 User Exits and BAdIs in the Valuation and Account Assignment Area
139
6.1 GR/IR Clearing Account
139
6.2 Overriding the Account Determination in the User Exit
141
7 User Exits and BAdIs in Logistics Invoice Verification
145
7.1 Custom Fields in Transaction MIRO
145
7.1.1 Overview of the Solution via BAdI
146
7.1.2 BAdI in Detail — Customizations in the ABAP Dictionary
148
7.1.3 Creating a Custom Dynpro with Table Control
151
7.1.4 Preparation of the Data in the BAdI
154
7.1.5 Back to the Dynpro
158
7.2 Overriding Tolerance Checks
164
7.2.1 Tolerance Limits in Customizing
165
7.2.2 Use of the Enhancement
166
8 Validation and Substitution of Accounting Documents
171
8.1 Validation of Accounting Documents
172
8.1.1 Callup Points
172
8.1.2 Steps
173
8.1.3 Example without Exit Routine
174
8.1.4 Example with Exit Routine
177
8.2 Substitution of Accounting Documents
182
8.2.1 Substitution without Exit Routine
183
8.2.2 Substitution with Exit Routine
185
8.2.3 Read Access to Data of the Source Document
188
Appendices
193
A User Exits and BAdIs in SAP Materials Management
193
A.1 Purchasing
194
A.2 External Services Management
221
A.3 Inventory Management
227
A.4 Valuation and Account Assignment
238
A.5 Logistics Invoice Verification
240
B The Author
257
Index
259