Business add-in (enhancement)

This tip provides the definition of a business add-in, SAP's new enhancement concept.

Business add-in definition
Name of the definition of a business add-in. Business add-ins are SAP's new enhancement concept. There are two different views:

1) In the definition, you create an enhancement that is called from the application code
2) In the implementation, you save the code for the functions for the enhancement

You create business add-in definitions using transaction SE18. They contain the business add-in interface. In the application code the instance variable is typed according to this interface. You can create several implementations for each add-in definition. There are two main types of add-in definitions:

1) Multiple use - that is there can be several active implementations
2) Filter-dependent - that is, you apply a filter value to each method called (for example, a country). A different (active) implementation is then called for each value. Possible filter values are characterized by filter type.

Business Add-In Implementation
Name of the implementation of a business add-in. You create these implementations in transaction SE19. They are created with reference to a business add-in definition. You can create several implementations for each business add-in definition.
You want to be able to convert strings in your application program. You also want users to determine how their strings are converted themselves. As the application developer, you define an enhancement consisting of an interface with a method. A changing parameter is used to transfer strings.

In order to create an add-in like this, proceed as follows:
1. Choose Tools „_ ABAP Workbench „_ Utilities „_ Business Add-Ins (transaction SE18) from the SAP menu.
2. Enter Definition Name : ZMYBUSINESSADDIN
3. Enter a name for your Business Add-In containing a maximum of 20 characters.
4. Choose Create.
5. Enter a short description for your Business Add-In on the following screen.
6. Enter „³ Text Conversion Add-in
7. Choose the Interface tab. The name of the interface is generated automatically and now appears along with the name of its corresponding class. At this time, you can change the name of the interface if you so desire.
8. Double-click on the interface's name field to assign a method to the interface.
9. The system branches to the Class Builder. A dialog box appears, asking you if you want to save the entries you have made. Save your entries. Assign your add-in to a development class.
10. Use the Class Builder to assign a method to the interface.
Select Method tab
a. Enter Method name as „³ Method
b. Then choose level „³Instance Method
c. Enter Description Of method
11. Now define a parameter with the following attributes:
Then Click Parameter Button in the same Screen
a. Enter Parameter Name „³ PARAMETER
b. Enter Type „³ Changing
c. Enter Reference type „³ C
d. Enter Description „³ Text Conversion
10. Save and activate your changes. Use the pushbutton Back to navigate back to Business Add-In definition.
Go To Transaction Code „³ SE19
11. Enter Implementation Name „³ ZTEST
12. Select Your Business Add-ins already you have created.
13. Give Class Name and Description of Class
14. Save and Activate
15. Select Interface Tab option and Double Click The Method or whatever Method name You have entered.
16. This will take you to abap editor of Method

method ZIF_EX_VENKBUSSADDIN~METHOD. ¡¥ Enter You Business logic here. For example:
translate parameter to upper case. ¡§Here write you coding
endmethod.
17.Save and activate

Table name : SXS_INTER
Here You can find out your Business add-in name and Corresponding Interface.

Sample Program using the Business Add-in convert text Into UPPER CASE.

REPORT ZVENKBUSADDIN .

class cl_exithandler definition load. "declaration
data exit type ref to ZIF_EX_VENKBUSSADDIN. "interface reference
data word(25) type c value 'Business Add-in By Venkat'. ¡¥ Text Want to Change start-of-selection.
call method cl_exithandler=>get_instance "factory method call changing instance = exit.
write:/'Please click here'.

at line-selection.
write:/ 'Original word: ',word.

call method exit->method "add-in call
changing parameter = word.

write:/ 'Changed word: ',word.

This was first published in June 2004
This Content Component encountered an error

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close