Master data in accounts receivable and accounts payable modules are basic data for processing business transactions with customers and vendors. These data include information about business partners that are categorized into three organizational levels: general data, company data and purchasing data.
Even though standard master data records contain most important and recurrent information required for conducting business transactions, they are in some special business processes insufficient to model all partners’ information. In order to fulfill these special requirements, it is necessary to enhance standard master data with additional fields.
The solution provided by SAP consists in enhancing standard programs used to manage partners’ data with your own subscreens. The new subscreens are accessible in standard transactions via automatically integrated buttons and contain additional fields needed in your special context.
SAP development guide for vendor & customer master data enhancement is accessible in SPRO under “Financial Accounting -> Accounts receivable and Accounts payable”.
Choose “Customer Accounts “to enhance customer master data or “Vendor Accounts” to enhance vendor master data.
Then continue following the path “Master data -> Preparations for creating customer master data -> Adoption of customer’s own master data fields”.
Please take the time to read the documentation provided in SPRO. It is a very good and detailed documentation that helps to understand the different development steps.
Next, I will concentrate on vendor master data enhancement. However, the same method could be applied for customer master data enhancement.
Step 1 : Screen Group Creation
The first step consists in creating a screen group. It is a kind of reference that regroups all screens used in the enhancement.
- Execute the customizing point “Prepare Modification-Free Enhancement in Vendor Master Record”
- Enter a screen group name and description
- Each screen can contain several tab pages. In order to add a new tab, select the created screen group and double-click on “Label Tab Pages".
- Provide each tab page with a function code and a description.
Step 2: Subscreen Integration
The next step consists in implementing enhancement spots provided by SAP to integrate own subsreens into standard transactions.
Use enhancement sport VENDOR_ADD_DATA to activate the enhancement.
- Go to transaction SE18 and enter spot name “VENDOR_ADD_DATA”.
(You can use a BADI instead of the enhancement spot if it is more confortable to you since a BADI with the same name exists.)
- Display enhancement spot details and click on button “Implement enhancement spot” or F6 to create a new enhancement implementation.
- In the next popup, enter implementation name and description.
- Enter the implementation class name in the second popup.
- The enhancement implementation is created. The following tab appears.
- Double-click on “Implementing class” to display class details.
- Then double-click on the class name to get the familiar SE24 class editor.
- Implement method CHECK_ADD_ON_ACTIVE as follows.
The enhancement is now active for screen group ‘Z1’ but I still have to specify the subscreen location.
This is done using enhancement spot VENDOR_ADD_DATA_CS.
- Go to transaction SE18 and enter spot name VENDOR_ADD_DATA_CS (Again a BADI with the same name is also available).
- Create a new enhancement implementation using button “Implement enhancement spot” or F6 then create an implementing class.
- This enhancement is filter-dependent. Choose the screen group created previously as filter value.
- A combination is added. Double-click on it.
- Under “Value 1” choose the screen group you have created and “=” under “Comparator 1”.
- Activate the enhancement implementation
- Double-click on “Implementing class” then on the class name.
- You get again the SE24 class editor. Implement method IF_EX_VENDOR_ADD_DATA_CS~GET_TAXI_SCREEN as follows.
You notice that I provided a program name and screen number in the method implementation. This is the program in which I created the subscreen that will be integrated into master data transactions. This will be explained in the third and last development step.
You notice also that I passed the value ‘B’ to parameter E_HEADERSCREEN_LAYOUT. This means that the additional field is added on company data level. As mentioned in the parameter description, you should pass the value ‘E’ if you enhance purchasing data and let the parameter empty if you enhance vendor general data.
Step 3: Subscreen and Additional Fields Creation
The last step consists in creating a customer Z-program that will contain the new subscreen and add the additional field to it.
The additional field should be created at company code level. That means, it should be added to table LFB1.
- Go to SE11 and display table LFB1. Click on button “Append Structure…”.
- In the next popup click on “Create” button.
- Then enter structure name.
- Add the additional field to the structure.
The additional field is now available to be added to a subscreen.
- In SE38, create a module pool ZTEST_ENHANCEMENT with a subscreen 9000.
- Change the screen layout by adding a box then import the new field from dictionary table LFB1. Change the description of the field under “Text”.
The new field will be displayed in all transactions that manage vendor master data.
As you certainly know, some of these transactions are used to change or create master data; others are used just to display data. In display modus, all fields must be disabled, including the customer fields.
- Add following code to disable edition of the new field in display modus.
And that is it! Our enhancement is now ready to be tested!
Display vendor master data using transaction FK03.
A button “Test” appears. You have probably noticed that the button name corresponds to the name of the screen group ‘Z1’ created in the first step.
Click on button “Test”. A tab “Test”appears (that corresponds to the tab defined in the first step) containing the new subscreen. The additional field is disabled.
Change now vendor data using transaction FK02 and make sure that the additional field is editable.