Business Addin

download Business Addin

of 16

Transcript of Business Addin

  • 8/3/2019 Business Addin

    1/16

    Business Add-Ins

    Business add-ins are enhancements to the standard version of the system. They can be

    inserted into the SAP System to accommodate user requirements too specific to beincluded in the standard delivery. Since specific industries often require special functions,

    SAP allows you to predefine these points in your software.

    As with customer exits, two different views are available:

    1. In the definition view, an application programmer defines exit points in a

    source that allow specific industry sectors, partners, and customers to attach

    additional coding to standard SAP source code, without having to modify theoriginal object.

    2. In the implementation view, the users of Business Add-Ins can customize the

    logic they need or use a standard solution, if one is available.

    In contrast to customer exits, Business Add-Ins no longer assume a two-levelinfrastructure (SAP and customer solutions), but instead allow for a multi-level system

    landscape (SAP, country-specific versions, industry solutions, partner, customer, and so

    on). You can create definitions and implementations of Business Add-Ins at any level ofthe system landscape.

    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release

    upgrades do not affect enhancement calls from within the standard software nor do they

    affect the validity of call interfaces. You do not have to register Business Add-Ins in

    SSCR.

    The Business Add-In enhancement technique differentiates between enhancements that

    can only be implemented once and enhancements that can be used actively by any

    number of customers at the same time. In addition, Business Add-Ins can be definedaccording to filter values. This allows you to differentiate between Add-In

    implementations using the filterCountry or other criteria.

    The enhancement technique is set up in such a way that it is possible to define interfaces

    for ABAP soure code, screens, GUI interfaces, and tables. These allow customers toinclude their own enhancements in the standard. A single Business Add-In contains all of

    the interfaces necessary to implement a specific task.

    The actual program code is enhanced using ABAP Objects. In order to better understand

    the enhancement technique behind the Business Add, we recommend reading the sectionABAP Objects.

    For more information, refer to the following sections:

    http://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
  • 8/3/2019 Business Addin

    2/16

    Architecture of the Enhancement Technique

    Compare with Existing Techniques

    Definition of a Business Add-In

    Calling a Business Add-In in the Application Program

    Implementing a Business Add-In

    Filter-Dependent Business Add-Ins

    Multiple Use Business Add-Ins

    Menu Enhancements

    Screen Enhancements

    Procedure for Importing Business Add-Ins

    Architecture of the Enhancement Technique

    In order to enhance a program, you must first define a Business Add-In. The application

    developer creates an interface for the add-in. From this, enhancement managementcreates an adapter class that implements the interface and thus provides the interface forimplementation by the customer, partner, and so on. The developer then creates an

    instance of the adapter class in the application program and calls the corresponding

    method at the appropriate time.

    http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ce8940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cee940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf1940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7d00940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ce8940e11d295df0000e82de14a/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ce8940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cee940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf1940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7d00940e11d295df0000e82de14a/content.htm
  • 8/3/2019 Business Addin

    3/16

    For each Business Add-In you have one interface and an adapter class that implementsthis. The interface is implemented by the user.

    The generated class (Add-In adapter) has the following tasks:

    Control

    The adapter class calls the active implementations.

    1. Filtering

    If a Business Add-In is to be executed only under certain conditions, the adapter classensures that only certain implementations will be executed.

    This concept ensures mutlple use. Any Business Add-In that has been implemented oncealready can be implemented again by those groups listed to the right of the software chain

    shown in the above graphic.

    Customers can find the enhancements in their system in the Implementation Guide (IMG)

    and in the component hierarchy. If a customer wishes to use a Business Add-In, he or shefirst creates an implementation. The customer must implement the methods and the

    enhancements, and afterwards activate the implementation of the enhancement. The

    enhancement's active components are then called at runtime.

    Normally, a Business Add-In contains an interface and other additional components suchas function codes for menu enhancements. In some cases, Business Add-Ins also include

    enhancements for screens. The enhancement, interface, and generated classes are all

  • 8/3/2019 Business Addin

    4/16

    located in the appropriate application development namespace. Business Add-In

    implementations are created in the respective implementation namespace.

    The following sections contain examples of program, menu, and screen enhancements.

    A Comparison of Different EnhancementTechniques

    Due to the necessity of adjusting R/3 to meet the specific needs of a variety of customers,

    several different enhancement techniques were developed in the past. A short description

    of each of the various enhancement techniques follows.

    Business Transaction Events (Open FI)

    The Open FI enhancement technique was developed in the Financial Accounting

    component. Open FI is based upon the following principles:

    Application developers must define their interface in a function module, an assignment

    table is read in the accompanying (generated) code, and the customer modules assignedare called dynamically.

    This technique differentiates between enhancements that are only allowed to have one

    implementation and enhancements that can call multiple implementations in anysequence desired. Both industry-specific and country-specific enhancements may bedefined.

    The concepts behind the Business Add-Ins enhancement technique and Open FI are

    basically the same. However, the two enhancement techniques do differ from each otherin the following points:

    1. Open FI can only be used to make program enhancements, that is, you can onlyenhance source code using Open FI. You cannot enhance user interface elements with OpenFI like you can with Business Add-Ins.

    1.

    Open FI assumes that enhancement will only take place on three levels (SAP - partners -customers), whereas with Business Add-Ins you can create and implement enhancements inas many software layers as you like.

    2. Open FI uses function modules for program enhancements. With Business Add-Ins,ABAP Objects is used to enhance programs.

    Enhancements in Transactions SMOD/CMOD

    http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/frameset.htm
  • 8/3/2019 Business Addin

    5/16

    Making enhancements using the transactions SMOD/CMODhas the following

    disadvantages:

    1. This enhancement technique assumes a two-tiered system infrastructure (SAP customers).

    2.

    The naming conventions in effect do not tolerate name extension.

    Conclusion:

    None of the techniques mentioned above can easily be extended to fulfill the

    requirements of a system infrastructure containing country versions, industry solutions,

    partners, and customers.

    Business Add-Ins should be considered generalized Business Transaction Events that canbe used to bundle program, menu and screen enhancements into a single add-in. Business

    Add-Ins can be created and employed in each of the various software levels.

    Defining a Business Add-In

    Use

    An application developer who wishes to have a Business Add-In in a particular program

    defines the interface for an enhancement in the Business Add-In Builder. In the followingstep, he or she programs the interface call in the application program at the appropriate

    place. Customers can then select the add-in and implement it according to their needs.

    Procedure

    1. ...

    1. 1. From the SAP menu, choose ToolsABAP WorkbenchUtilities

    Business Add-Ins (transaction SE18).

    We would like to explain the procedures using an application program as an example.There is a string conversion in the program. You want the add-in users to determinethemselves how their strings are to be converted. The application developer defines anenhancement. It consists of an interface with a method. A changing parameter is used topass on the string.

    2. 2. Enter a name with a maximum of 20 characters for the Business Add-In.

    http://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cee940e11d295df0000e82de14a/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
  • 8/3/2019 Business Addin

    6/16

    3. 3. Choose Create.

    4. 4. On the following screen, enter a short text as the description for the Business

    Add-In.

    In this example, we are dealing with a simple enhancement.

    Option: Meaning:

    Within SAP If the customer selects this option for an Add-In, he or she has no optionfor creating his or her own implementations for this Business Add-In or forusing them. In the input help, Business Add-Ins with this flag are notdisplayed. For more information on the checkbox Within SAP, refer to thesection Definition of a Business Add-In in the Enterprise Core.

    Multiple Use The Business Add-In can be set for multiple use.

    For more information, refer to the sectionMultiple-Use Business Add-Ins.

    Filter-Dependent The implementation of a Business Add-In is dependent on a particularfilter value.

    For more information, refer to the sectionMultiple-Use Business Add-Ins.

    None of the above options is selected.

    5. 5. Choose theInterface tab. The interface name is generated automatically and

    can be changed here.

    Under the FCodes tab, you can createMenu Enhancements, and under the Subscreenstab you can create Screen Enhancements.

    6. 6. Double-click the interface name field. The system branches to the Class

    Builder.

    7.

    7.

    Confirm that you want to save the entries you have made. Assign a packageto the Business Add-In.

    8. 8. Use the Class Builder to assign a method to the interface.

    http://help.sap.com/saphelp_47x200/helpdata/en/d3/63b6e8528f204c941fb067f7a0bb58/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/d3/63b6e8528f204c941fb067f7a0bb58/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfa940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/9d/12233a0edd7978e10000000a11402f/content.htm
  • 8/3/2019 Business Addin

    7/16

    9. 9. Now define a parameter with the following attributes:

    10. 10. Save and activate your entries. Use the pushbuttonBackto navigate

    back to the Business Add-In definition.

    You can now continue with the definition of the Business Add-In by executingactivation in the Class Builder.

    A table control now appears on the definition screen for the Business Add-In. It displays themethod you have created for the interface.

    When you maintain the interface methods, the corresponding executing class is generated.The generated code cannot be altered in the initial expansion phase.

    11. 11. Save your entries and use theDocumentation pushbutton to create a

    description for your new Business Add-In. Remember that this documentation isvery important for users to be able to understand the purpose behind the Add-In.

    For more information, read the section Documentation of a Business Add-In.

    Choose GotoDefault Coding/ Sample Codingif you wish to create default coding

    and/ or sample coding for the Business Add-In. The default implementation is executed

    only if no other active implementation is available. This applies also to filter-dependentBusiness Add-Ins.

    When you create default or sample coding, do not forget to save your entries. In this

    way, the connection between the class and the implementation is set up.

    2. ...

    See also:

    Changes to Business Add-In Definitions

    http://help.sap.com/saphelp_47x200/helpdata/en/4f/a9f496099ce148bd064b82af19bae7/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/4f/a9f496099ce148bd064b82af19bae7/content.htm
  • 8/3/2019 Business Addin

    8/16

    Changes to BadI Definitions

    You are allowed to change:

    The filter type

    1. The definition of multiple use

    2. The internal flag selection

    If implementations already exist for a BadI definition, these can be rendered syntacticallyincorrect by changes made to the interface.

    If changes to the interface are unavoidable and they pertain to deleting, renaming, or

    creating a method, clean up the method includes in the current development system for

    all classes that are used for the BAdI implementations. In the BAdi Builder, call uptransaction SE19 and choose the tabInterface. Afterwards, choose the fieldName of

    Implementing Class. Double click to navigate to the Class Builder. Choose Utilities

    Clean UpMethod Includes.

    Whenever methods are deleted, this will have the effect that the corresponding includesare also deleted in the implementing classes. Renaming is also the same as deleting.

    If an interface change of the type mentioned above reaches a system by means of system

    transport or delivery, this clean-up is automatically executed after the import phase.

    If interface changes refer to parameters, remember that creating parameters is possiblewithout any problem. Changing parameter types or deleting parameters can cause syntax

    errors or possibly also termination at runtime.

    http://help.sap.com/saphelp_47x200/helpdata/en/4f/a9f496099ce148bd064b82af19bae7/frameset.htm
  • 8/3/2019 Business Addin

    9/16

    Calling a Business Add-In in the ApplicationProgram

    When you define a Business Add-In, enhancement management generates a class that

    implements your interface. The application developer uses a factory method to create aninstance of this adapter class in the application program and calls the corresponding

    method, if necessary.

    The adapter class method generated by add-in management decides whether one or

    several active implementations should be called. If necessary, these implementations aresubsequently executed. The application program ensures only that the adapter class

    method is called. The application program does not know which implementations are

    called.

    Example:

    Having created a string conversion Business Add-In, you would program the call of the

    Business Add-In into your ABAP source code as follows:

    1 Report businessaddin.

    2 class cl_exithandler definition load. "Declaration3 data exit type ref to if_ex_businessaddin. "Interface reference

    4 data word(15) type c value 'Business Add-in'. "String to change

    5 start-of-selection.

    6 call method cl_exithandler=>get_instance "Factory method call

    7 exporting "Methodexit name =BUSINESSADDIN

    8 null instance accepted =X

    9 changing instance = exit.

    10 write:/'Please click here'.

    11 at line-selection.

    12 write:/ 'Original word: ',word.

    13 if not exit is initial.

    14 call method exit->method "Add-In call

    15 changing parameter = word.16 endif.

    17 write:/ 'Original word: ',word.

    In order to be able to call static methods, you must declare the corresponding class inABAP Objects. This is why the class definition loadstatement is necessary

    for the factory class.

    http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf1940e11d295df0000e82de14a/frameset.htm
  • 8/3/2019 Business Addin

    10/16

    A variable for object reference is also necessary when calling the method. Use data to

    create it and type it to the interface.

    During initialization (line 6), the application developer creates an adapter class instance

    using the factory method. The instance methods are then called at the time specified.

    To improve performance during creation of the instances, you should specify additionalparameters for the call in the method GET_INSTANCE of the class

    CL_EXITHANDLER.

    EXIT_NAME: The name of the BAdI definition is assigned to this parameter.

    NULL_INSTANCE_ACCEPTED: Whenever the value X is assigned to this parameter,

    no instance is created if there are no active implementations for this BAdI definition. Inthis case, the INSTANCE parameter has the value NULL. Using this parameter implies

    that the method calls of this BAdI may only be called under the condition that this

    instance is not NULL. The query if not is initial. is necessary in thiscase.

    Notes on Usage

    The instance generated through the factory method should be declared as globally as

    possible or generally be passed as a parameter to ensure that the initialization processmust be run as rarely as possible just once would be best. In no case should you discard

    the instance as soon as it is generated or repeatedly run the initialization process in a

    loop.

    Within the adapter class interface, required database accesses are buffered locally,so that each access is executed once only. However, repeated initialization makesthe buffer useless and dramatically reduces performance.

    Due to the local buffering, you can call Business-Add-In methods without having to

    expect considerable performance restrictions, even if no active implementations exist.

    Also, if the definition of the Business-Add-In is filter-dependent, a single instance issufficient.

    However, you should not do without initialization altogether. Even if you could call staticmethods of the implementing class of the Business-Add-In implementation without an

    instance, you would lose the benefit of performance improvement through the Business-Add-Ins and the possibility of multiple use. If you switch the method type in the interface

    from the static method to the instance method at any time in the future, many code

    adjustments are required. In addition, you can no longer use default code that is provided.

  • 8/3/2019 Business Addin

    11/16

    Implementing a Business Add-In

    A list of the Business Add-Ins available in your system can be found either in the SAPReference Implementation Guide (IMG) or in the component hierarchy. BAdI definitions

    are included in the IMG so that the customer/partner can create suitable, company-

    specific implementations.

    In the SAP Reference IMG, BAdI implementations - in addition to BAdI definitions -can be provided. This would be suitable in cases where you can see in advancewhich functions are required by the customer. Using a BAdI implementation, thecustomer/partner can simply switch the delivered implementations on or off, as

    required. In the SAP Reference IMG, choose Execute in front of the name of theBAdI implementation. The icon serves as a switch for activating and deactivating theimplementation.

    Starting from the name and the documentation of the enhancement, you can create an

    implementation. During the implementation, the system creates a class that implementsthe enhancements interface. The implementation is a separate transport object and lies

    within the namespace of the person or organization implementing it.

    For the example given here, you are to create an implementation for the stringconversion. You need to program the interface method in such a way that, when the add-

    in is called from the application program, the string is actually converted in the way the

    add-in user wants it.

    To create an implementation, proceed as follows:

    1. ...

    1. 1. In the SAP menu, chooseABAPWorkbenchUtilitiesBusiness Add-Ins

    (transaction SE19) or double-click the corresponding activity in the Implementation

    Guide (IMG).2. 2. Enter a name for the implementation and then click the Create pushbutton.

    3. 3. Enter the name of the add-in for which you want to create an implementation

    for in the dialog box that appears.

    http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/frameset.htm
  • 8/3/2019 Business Addin

    12/16

    4. 4. Enter a short text describing your implementation on the following screen.

    5. 5. Choose theInterface tab.6. 6. ChooseABAP Code as the implementation type.

    In addition toABAP Code, there is also the Formula option. If you choose Formula, thecontent of a method is determined using the Formula Builder. For more information on this,refer to the section Implementing Methods Using the Formula Builder.

    7. 7. Navigate to the Class Builderby double-clicking the method. You must firstenter a package before the Class Builderis displayed.

    8. 8. Insert the desired source code for the implementation between themethod

    if_ex_businessaddin~method. and endmethod. statements that already

    exist.

    In our particular example, you could enter the statement translate parametertoupper case.

    9. 9. Save your entries and return to the Change Implementation screen.

    10. 10. ChooseActivate. You may now use this implementation when the application

    program is executed.

    Several implementations may exist for a Business Add-In that is not used on amultiple basis. However, only one implementation can be active at any one time.

    What is also important is that you must declare the instance generation of theimplementing class (Attributes tab) as public and not as private, protected, or evenabstract. If you do this, the system will return short dumps at runtime.

    See also:

    Calling Implementations Through Filter Mechanisms

    http://help.sap.com/saphelp_47x200/helpdata/en/1f/365a3acbe6134fe10000000a114084/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/1f/365a3acbe6134fe10000000a114084/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/fc/dd82ee1ddea043aa9f3e7865310635/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/1f/365a3acbe6134fe10000000a114084/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/fc/dd82ee1ddea043aa9f3e7865310635/content.htm
  • 8/3/2019 Business Addin

    13/16

    Implementing Methods Using the Formula

    Builder

    Use

    You can use the Formula Builder to implement methods for Business Add-Ins without writing asingle line of ABAP code. The methods are implemented by means of socalled formulas.

    This type of implementation does not require you to have programming knowledge. However, thefunctions it offers are more restricted than if you implement a method by writing ABAP code. If therange of functions provided by the Formula Builder is not sufficient, you can change theimplementation type of the method at any time.

    Features

    A formula can consist of the following steps:

    Condition

    You define a Boolean formula expression whose result can be true or false. This formulaexpression is a logical condition based on the importingand changingparameters of themethod. Depending on whether the condition is true or false, the system triggers differentsteps. If you do not specify a dependent step for one of these two possibilities, thesystem continues with the next superior step.

    Substitution

    The system replaces the value of a specific parameter with another value which youdefine as a constant value or by means of a mathematic formula. Substitution is onlypossible if the method contains changing, exportingorreturningparameters.

    Message

    The system issues a message. All messages issued are collected in a log table. Youdefine the message variables as constant values or by means of mathematic formulas.The system can only issue a message if you created a log table during method definition.

    Exception

    The system exits the method. No further steps are executed, and the application programcontinues in accordance with the exception defined. You can additionally display amessage whose variables you define as constant values or by means of mathematicformulas. An exception can only be triggered if the method contains exceptions.

    http://help.sap.com/saphelp_47x200/helpdata/en/1f/365a3acbe6134fe10000000a114084/frameset.htm
  • 8/3/2019 Business Addin

    14/16

    A formula editoris available which you can use to enter formula expressions. After starting the

    formula editor, you can display information on how to use it by choosing the pushbutton next tothe status display (traffic light).

    Activities

    You implement the method using the BAdIBuilder. For information on this topic, seeImplementing Business Add-Ins. To implement a method as a formula, choose the Formulaimplementation type on the Interface tab. Double-clicking the method name takes to to theFormula Builder: BadI Implementation screen.

    You can change the implementation type of the method on the Interface tab. Youcan implement a method both using a formula and using ABAP code. At theruntime of the application program, the system executes the implementation typecurrently chosen.

    You create the necessary steps in the left section of the screen. To do this, choose and thenselect the appropriate step type from the dropdown list. Using the other icons available or thecontext menu (which you can call by clicking the right mouse button), you then determine thearrangement and the descriptions of the steps. You can also copy steps to use them as templatesfor other steps, or you can delete individual steps.

    To specify the parameters for the individual steps, double-click the corresponding entry in the leftsection of the screen. You then enter the data required in the right section of the screen.

    Formulas are transported automatically.

    Menu Enhancements

    Menu enhancements with function codes are provided for in the user interfaces. These

    function codes must adhere to the form /namensraum/+, just like in the enhancementtechnique SMOD/CMOD. These function codes are assigned to an enhancement. Only

    when there is an active implementation of the assignment do they appear in the menu.

    The application developer reserves specific function codes for customers when defining a

    Business Add-In and assigns them in the Menu Painterin the appropriate menu lists. Theapplication developer must also ensure that these menu options are queried in the

    application program and that the corresponding add-in method is also called. Customers

    can take advantage of menu enhancements by creating a new implementation, choosing atext for the menu option, and then programming the method used to determine what

    action is performed when the menu enhancement is called.

    http://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/content.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cfd940e11d295df0000e82de14a/frameset.htmhttp://help.sap.com/saphelp_47x200/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/content.htm
  • 8/3/2019 Business Addin

    15/16

    Menu enhancements can only be used for single-use add-ins (not multiple-use add-ins) that are not filter-dependent. Currently, menu enhancements can only becreated in conjunction with program enhancements (interfaces).

    To create a menu enhancement, proceed as follows:

    2. ...

    11. 1. Create the definition of an add-in and define its interface.

    12. 2. Choose theFCodes tab.

    13. 3. Enter the name of your program, the function code, and a description.

    14. 4. Call the Menu Painter or double-click on the program name or function code to

    navigate to user interface maintenance in the Menu Painter. Enter the function code in

    the appropriate menu list. If you have accessed the Menu Painter directly during add-

    in definition, you can call the menu lists by choosing GotoObject ListsMenu

    Lists.

    Calling a Menu Enhancement from the Application Program

    The application program should look like this:

    ()case fcode.when 'SAP'.()

    when '+CUS'call method

    Implementing a Menu Enhancement

    To create the implementation of a menu enhancement, proceed as follows:

    3. eine Implementierung an und whlen Sie den RegisterindexFcodes

    15. 1. Create an implementation and choose theFCodes tab. All data adopted fromyour Business Add-In's definition is displayed here. You can make entries for the

    implementation on the right. You can also double-click the first input field. Thefollowing dialog box appears:

  • 8/3/2019 Business Addin

    16/16

    Here you may enter a text for your function code, the name of an icon, a text for the icon,and a short description.

    The actions that you want the system to perform after the pushbutton is chosen must beprogrammed in the appropriate method, either manually or using a default source code that

    has been provided for this purpose.Menu enhancements only become visible after the implementation has been activated andthe application program that calls the Business Add-In has been executed.