Vous êtes sur la page 1sur 11

sapunive rsit y.e u http://sapuniversity.

eu/ho w-to -extend-vendo r-o r-custo mer-master-data-with-sap-enhancement-spo ts/

How to extend vendor or customer master data with SAP enhancement spots
Home SAP ABAP How to extend vendor or customer master data with SAP enhancement spots 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. For this purpose, SAP provides dedicated enhancement spots that enable enhancing customer or vendor master data, without making any modification in SAP standard. T he solution provided by SAP consists in enhancing standard programs used to manage partners data with your own subscreens. T he new subscreens are accessible in standard transactions via automatically integrated buttons and contain additional f ields needed in your special context. SAP development guide f or 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. T hen continue f ollowing the path Master data -> Preparations f or creating customer master data -> Adoption of customers own master data f ields.

Please take the time to read the documentation provided in SPRO. It is a very good and detailed documentation that helps to understand the dif f erent development steps.

Next, I will concentrate on vendor master data enhancement. However, the same method could be applied f or customer master data enhancement. Step 1 : Screen Group Creation T he f irst step consists in creating a screen group. It is a kind of ref erence 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 T he 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 conf ortable to you since a BADI with the same name exists.)

Display enhancement spot details and click on button Implement enhancement spot to create a new enhancement implementation.

or F6

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.

T he enhancement is now active f or screen group Z 1 but I still have to specif y the subscreen location. T his 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).

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. T his is the program in which I created the subscreen that will be integrated into master data transactions. T his will be explained in the third and last development step. You notice also that I passed the value B to parameter E_HEADERSCREEN_LAYOUT. T his means that the additional f ield 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 T he last step consists in creating a customer Z -program that will contain the new subscreen and add the additional f ield to it. T he additional f ield should be created at company code level. T hat 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.

T he additional f ield 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.

T he new f ield 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 f ields must be disabled, including the customer f ields. 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 Z 1 created in the f irst step.

Click on button Test. A tab Testappears (that corresponds to the tab def ined in the f irst step) containing the new subscreen. T he additional f ield is disabled.

Change now vendor data using transaction FK02 and make sure that the additional f ield is editable.

0 inShare

Vous aimerez peut-être aussi