Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

11
sapuniversity.eu http://sapuniversity.eu/how-to-extend-vendor-or-customer-master-data-with-sap-enhancement-spots/ 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. 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 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. Then continue f ollowing the path “Master data -> Preparations f or 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 dif f erent development steps.

Transcript of Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

Page 1: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

sapuniversit y.euhttp://sapuniversity.eu/how-to-extend-vendor-or-customer-master-data-with-sap-enhancement-spots/

How to extend vendor or customer master data with SAPenhancement 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 businesstransactions with customers and vendors. These data include information about business partners that arecategorized into three organizational levels: general data, company data and purchasing data.

Even though standard master data records contain most important and recurrent information required forconducting business transactions, they are in some special business processes insufficient to model allpartners’ information. In order to fulfill these special requirements, it is necessary to enhance standard masterdata with additional fields.

For this purpose, SAP provides dedicated enhancement spots that enable enhancing customer or vendormaster data, without making any modification in SAP standard.

The solution provided by SAP consists in enhancing standard programs used to manage partners’ data withyour own subscreens. The new subscreens are accessible in standard transactions via automaticallyintegrated 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 vendormaster data.

Then continue f ollowing the path “Master data -> Preparations f or creating customer master data ->Adoption of customer’s own master data f ields”.

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

Page 2: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

Next, I will concentrate on vendor master data enhancement. However, the same method could be appliedf or customer master data enhancement.

Step 1 : Screen Group Creation

The f irst step consists in creating a screen group. It is a kind of ref erence that regroups all screens used inthe 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 groupand 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 subsreensinto 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 thesame name exists.)

Page 3: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

Display enhancement spot details and click on button “Implement enhancement spot” or F6to 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.

Page 4: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

Double-click on “Implementing class” to display class details.

Then double-click on the class name to get the familiar SE24 class editor.

Page 5: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

Implement method CHECK_ADD_ON_ACTIVE as follows.

The enhancement is now active f or screen group ‘Z1’ but I still have to specif y 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 samename is also available).

Activate the enhancement implementation

Double-click on “Implementing class” then on the class name.

Page 6: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

You get again the SE24 class editor. Implement methodIF_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 theprogram in which I created the subscreen that will be integrated into master data transactions. This will beexplained in the third and last development step.

You notice also that I passed the value ‘B’ to parameter E_HEADERSCREEN_LAYOUT. This means that theadditional f ield is added on company data level. As mentioned in the parameter description, you should passthe value ‘E’ if you enhance purchasing data and let the parameter empty if you enhance vendor generaldata.

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 theadditional f ield to it.

The additional f ield 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…”.

Page 7: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

In the next popup click on “Create” button.

Then enter structure name.

Add the additional field to the structure.

Page 8: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

The 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. Changethe description of the field under “Text”.

Page 9: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

The 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 areused 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.

Page 10: Sapuniversity.eu-how to Extend Vendor or Customer Master Data With SAP Enhancement Spots

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 thescreen group ‘Z1’ created in the f irst step.

Click on button “Test”. A tab “Test”appears (that corresponds to the tab def ined in the f irst step)containing the new subscreen. The additional f ield is disabled.

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