changes to std sap

Upload: gverbrug

Post on 06-Apr-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Changes to Std SAP

    1/22

    Changes to SAP standard

    - Customizing (fine tune/set up std SAP)

    - PersonalizationMinor changes (cosmetic (look-and-feel))(eg adapt user menu, create variants, enhance data elements (change field/help texts) (CMOD))

    - ModificationsChanges directly to the std SAP code (at unassigned points)Via Modification Assistant ( Delete, Undo, Replace, New button) all changes are logged.Supported in system upgrades. Object key is needed.(are not switchable by the switch framework and more upgrade effort than Enhancement Framework)(try to avoid)

    - Customer DevelopmentsDevelop additional reports, programs, transactionsEnhancing Tables/Structures (using Append Structure & Customizing Includes)

    - EnhancementsChanges to SAP (at predefined points)

    Enhancements:< SAP 4.6: customer exits (function module exits (user exits), menu exits and screen exits)

    (SMOD, CMOD)>= SAP 4.6: customer exits were migrated to Classic BAdIs (through SMOD) and

    Business Transaction Events (enhancement technique developed for FI/CO)>= SAP 7.0: Enhancement Framework (new enhancement concept) -> New BAdIs

    (much faster (40 600 times) than classic BAdIs)

    BAdI is a method of a class or interface

    Enhancement implementations:- Begin/end of forms and function modules -> implicit enhancements

    (source code plug-in)- Enhancement point (add functionality) and sections (change) -> explicit enhancements

    (are also types of enhancement spots)- Enhancement spots (New BAdI); used to change std. SAP methods -> explicit enhancements

    (copy ES to new enhancement and badi implementation (also create new class (impl.) / interface(def.)))(object plug-in)

    Find all calls of the classic BAdI by GET_INSTANCE and reprogram the BAdI call using the new commandsGET BADIand CALL BADI.

    http://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htm

    http://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htm
  • 8/2/2019 Changes to Std SAP

    2/22

    Enhancement Framework:(via Enhancement Builder)

    The Enhancement Framework offers new possibilities to extend the SAP Standard instead of modifying it: Source Code PlugIns Function Group Enhancements Class Enhancements

    New BAdIs (object PugIns)

    Code contains enhancement options . These are predefined points were you can enhance the std functionality.(developed in ABAP Objects (Definition and Implementation part))- Implicit enhancements (need only Implementation part)

    * Source code enhancements- Predefined points in code (eg start/end of forms and functions)* Parameter interface enhancements- Parameter interfaces of function modules- Attributes and parameter interfaces of global classes

    - Explicit enhancements (define Definition and Implementation part)

    - New BAdIs (= kernel based BAdIs)- Explicit source code points (add code) or sections (replace codes)In ABAP programs, you can select either a position or a program section as an explicit enhancementoption. Source code plug-ins for an enhancement are either entered at such a position or they replacethe selected section.An explicit enhancement option of an ABAP program is part of the program. It is thus assigned to the

    package of the program and not necessarily to the package of the enhancement spot to which it belongs.To mark a position/section in a program as an explicit enhancement option, use:ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ...or ENHANCEMENT-SECTION enh_id SPOTS spot1 spot2 ...

    ...END-ENHANCEMENT-SECTION.

    BAdI (new and classic) have a pre-defined interface (SE18?)(implicit enhancement point has no pre-defined interface)

    Implicit enhancements are already known in the system (they are already defined)Explicit enhancements should be defined (thru enhancement spots ).The implementation of enhancements goes via enhancement implementations .Enhancement options are enhanced by:- Implicit enhancements

    - Predefined points in code -> source code plug-ins- Parameter interfaces of function modules -> parameters- Attributes and parameter interfaces of global classes -> attributes and/or parameters

    - Explicit enhancements- New BAdIs -> object plug-ins- Explicit source code points or sections -> source code plug-ins

    SE18 Enhancement DefinitionOnly for explicit enhancements (New BAdIs) and Classic BAdIs.

    Not possible to insert new classic BAdI definitions (only change existing ones)

    http://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htm
  • 8/2/2019 Changes to Std SAP

    3/22

    Note: To see examples: double-click on Example Implementation Clasee ( Interface tab) then double-click onthe required method.

    SE19 Enhancement ImplementationFor implicit/explicit enhancements and Classic BAdIs.(creates implementation of an existing defined BAdI)It is possible to create a new implementation of an existing classic BAdI.

    (See for an example document REDUCE (under SAP/IDocs/Change Pointers)).

    On delete an implementation, the coding will be deleted and deactivation will be executed, automatically.???

    BADISAP Business Add-Ins (BAdIs) are one of the most important technologies used to adapt SAP software tospecific requirements. BAdIs were introduced with Release 4.6 and replace function module exits. Thistechnology is not limited to SAP applications. BAdI calls can be integrated in customer applications. Thesecan then be enhanced by other customer applications. In the various SAP applications, BAdI calls areimplemented at places where enhancements are appropriate. In the SAP ERP system, there were already

    approximately 5,000 BAdIs before Release 7.0.Based on ABAP Objects.- In the definition, you create an enhancement that is called from the application code

    (SE18)Contains BAdIs interface

    - In the implementation, you save the code for the functions for the enhancement(SE19)

    SE18:(Defines interface (for explicit enhancement implementation (New BAdI) and Classic BAdI))In the application code the instance variable is typed according to the defined interface. You can create

    several implementations for each add-in definition. There are two main types of BADI definitions:- Multiple use - that is, there can be several active implementations- 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 bythe filter type.

    NEW BADIEnter Enhancement Spot or New BAdI Name (= enhancement spot element definition)(-> starts Enhancement Spot Editor)

    Classic BADI

    Enter Classic BAdI Name(-> starts Classic BAdI Builder (with option BAdI migration))Creation of a classic BAdI is no longer supported ( New button will always create a new BAdI).

    SE19:(Defines implementation (for enhancement implementations and Classic BAdI))

    NEW BADIChange/Display: enter Enhancement Implementation (of new BAdI or implicit enhancement).

  • 8/2/2019 Changes to Std SAP

    4/22

    Create: enter Enhancement Spot (only for explicit enhancements). Enhancement spots manage explicitenhancement implementations.You can create several implementations for each business add-in definition.

    Note: You can not create (only change) an implicit enhancement here; you should do that (create) in the code(See document 'Create Enhancement Implementation').

    Classic BADI

    Change/Display: enter Implementation of classic BAdI.Create: enter BAdI Name (definition). An implementation is created with reference to a business add-indefinition.You can create several implementations for each business add-in definition.

    SE20:((combines SE18 and) SE19??)Since Enhancement Framework (Not suited for Classic BAdI)

    SE84

    ABAP Repository Information System.(includes Enhancement Builder)

    BAdI (one definition) ->One or more Enhancement Implementations ->One or more Enhancement Implementation Elements (expl enh)(EIE can also be an impl enh, enh point/section)

    New BAdIInterface with defined methods

    How to find enhancements?(SE84)* Implicit enhancements, Enhancement Points/Sections1) Since a source code plug-in (= enhancement implementation) is stored in an include starting with a Z:Via SE38Start program: RPR_ABAP_SOURCE_SCAN- Program Name: Z*- Find String: ENHANCEMENT(if source code starts with Z -> implicit enhancement)

    Source code plug-ins (includes) are possible (at predefined places):1) Implicit enhancement implementations

    In ABAP programs, implicit enhancement options are predefined at the following places:- At the end of an include. There are some restrictions, for example, not at the end of a method include.- At the end of a PUBLIC-, PROTECTED-, PRIVATE-SECTION of a class.- At the end of the implementation part of a class (before the ENDCLASS, which belongs to CLASS

    IMPLEMENTATION).- At the end of an interface definition (before the ENDINTERFACE).- At the end of a structure definition (before TYPES END OF, DATA END OF, CONSTANTS END OF,

    and STATICS END OF).- At the beginning and at the end of a procedure (FORM, FUNCTION, METHOD). That is, after

  • 8/2/2019 Changes to Std SAP

    5/22

    commands FORM, FUNCTION, and METHOD, and before statements ENDFORM, ENDFUNCTION,and ENDMETHOD.

    - At the end of the CHANGING-, IMPORTING-, EXPORTING-parameter list of a method. Theseenhancement options are located in the middle of a statement.

    2) Explicit enhancement implementationsAre defined by ENHANCEMENT-POINT or ENHANCEMENT-SECTION statement.

    Object plug-ins (methods of an interface) (at predefined places):1) New BAdI

    Naming convention (always global (GV)?):Enhancement option Z(xx)EO_ Enhancement spot Z(xx)ES_ Enhancement implementation Z(xx)EI_

    Composite enhancement spotComposite enhancement implementation

  • 8/2/2019 Changes to Std SAP

    6/22

    Enhancement Option Types are available in a source code:- ENHANCEMENT-POINT can either be static (for example, additional data declaration) or dynamic (for example, additional coding).- ENHANCEMENT-SECTION can either be static (for example, replace an existing data declaration) or dynamic (for example, replace existing coding).- Overlay enhancement overwrite an existing enhancement instead of modifying it.Enhancement points and sections are hooks to which you can assign an enhancement. That is, you can

    enhance an option by an enhancement.

    Enhancement Implementation Type:- Static Enhancement Point/Section

    Additional/Replace data declaration- Dynamic Enhancement Point/Section

    Additional/Replace source code

    SE18

  • 8/2/2019 Changes to Std SAP

    7/22

    SE19(Implicit enhancement point)

  • 8/2/2019 Changes to Std SAP

    8/22

  • 8/2/2019 Changes to Std SAP

    9/22

    See code of BADI(SE18)(eg BADI_NUMBER_GET_NEXT)Where Used List button you go to see the code of the BADI call:

    Via interface (when double click on method of BADI) + Where Used List button you go to see the code (call +implementation(s)):

    Under ProgramShows the call of the BAdI

    Under Classes / InterfacesShows the implementations

    Debugging:Breakpoints -> Breakpoints At -> Breakpoint for Method

  • 8/2/2019 Changes to Std SAP

    10/22

    Class Name : (eg BADI_MATMAS_ALE_CR)Method Name : (eg change_matmas)Or Class Name : (eg CL_EX_BADI_MATMAS_ALE_CR)Method Name : ~ (eg if_ex_badi_matmas_ale_cr~change_matmas)

    The BAdI name is normally part of the interface name:Interface : IF_EX_ BADI_MATMAS_ALE_CR BAdI : BADI_MATMAS_ALE_CR

    Interface : IF_ BADI_NUMBER_GET_NEXTBAdI : BADI_NUMBER_GET_NEXT

    Enhancement Framework

    Enhancement Options BAdI Explicit Enh.Point/Section Impl.Enh.

    BAdI name X

    Enhancement Spot Name X X

    Enhancement Implementation Name X X X

  • 8/2/2019 Changes to Std SAP

    11/22

    Enhancing Parameter Interfaces

    UseYou can enhance the parameter interface of a function module with new, optional formal parameters asenhancement implementation elements. Enhancing by adding new exceptions is not possible.

    In the context of the enhancement concept, the parameter interface of a function module providescorresponding enhancement options .

    ProcedureTo implement an enhancement of the interface, use the Function Builder to call the Enhancement Builder:

    1. Choose the tab of the parameter type for which you want to insert a formal parameter. 2. Choose Edit Enhancement Operations Enhance Interface for a function module.

    A dialog box appears.

    3. Select an existing enhancement implementation or create a new one (see Creating an EnhancementImplementation ).

    This takes you to the enhancement mode of the Function Builder in which the original components of the functionmodule are displayed and cannot be changed.

    4. Insert the new formal parameter in the same way as when you create a function module. 5. Save and activate the function module.

    The new parameter can now be used at implicit and explicit enhancement options in enhancements to the sourcecode of the function module. This can be done using ABAP source code enhancements .

    http://help.sap.com/saphelp_nw04s/helpdata/en/fb/e3d8403e37762ae10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/56/b73142680d5c33e10000000a155106/frameset.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/fb/e3d8403e37762ae10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htm
  • 8/2/2019 Changes to Std SAP

    12/22

    Enhancements

    Customer Exits(user exit (function module exit), menu exit, screen exit)Tools -> ABAP Workbench -> Utilities -> Enhancements- Definition (SMOD)

    - Project Management (CMOD)Shows exits available in standard applications.

    Classic BADITools -> ABAP Workbench -> Utilities -> Business Add-Ins- Definition (SE18)- Implementation (SE19)SE84SE24SMOD (to migrate customer exit -> Classic BAdi)

    Enhancement PointsSE20 (and SE18 / SE19)SE84Implicit enhancement points (eenhancement implementation)Explicit enhancement points (enhancement spot + enhancement implementation)

    Customer Exits (user exits)CMOD, SMODSE84

    These exits are function modules called by SAP, with fixed input and output parameters, and only containingan INCLUDE ZX... ABAP statement, that the client may create. The exit belongs to exactly one Enhancement(an 8 characters code), that SAP creates using SMOD transaction.

    All enhancementsSE84(= SE80 -> Repository Information System)

    New BADI

    Via SE18/SE19Or SE80 (SE84)Represent an explicit Enhancement point.

    Implementation of BAdIs in the Enhancement Builder UseThe BAdI implementations of the enhancement concept are not treated as standalone objects; instead, they areintegrated in the overall concept. Consequently, the tools for implementing BAdIs are part of theEnhancement Builder integrated in the ABAP Workbench.Transaction SE19, up to now the only entry point for implementing classic BAdIs, now administers classicand new BAdI implementations. When displaying/changing an existing BAdI implementation, it analyzes

    http://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/b2/873842134bad04e10000000a1550b0/frameset.htm
  • 8/2/2019 Changes to Std SAP

    13/22

    whether the BAdI is a classic or a new one and then switches to the respective tool, which is the enhancementimplementation editor for a new BAdI. Implementing classic BAdIs is still supported.Since the classic SE19 transaction represents only a side entry point into the Enhancement Builder, you canalso use the Object Navigator (SE80).

    BADI

    Based on ABAP Objects

    New BADI-performance was considerably enhanced.- more flexibility in the conversion of predefined enhancement options through new, orthogonal propertiessuch as contexts and filters.

    Classic BADI

    SE80 / SE84

    http://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/a0/47e94086087e7fe10000000a1550b0/content.htm
  • 8/2/2019 Changes to Std SAP

    14/22

    https://websmp230.sap-ag.de/sap(bD1ubCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=25276

    Note 25276 - SAP enhancement concept CMOD: Activation

    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects.To find a BADI:We can find a BADI Using CL_EXITHANDLER=>GET_INSTANCEGo to the Transaction, for which we want to find the BADI,Get the Program Name of Corresponding Transaction.(Click on System->Status. Double Click on Program Name)Once inside the program search for 'CL_EXITHANDLER=>GET_INSTANCE'.Make sure the radio button "In main program" is checked.

    A list of all the programs with call to the BADI's will be listed.The export parameter 'EXIT_NAME' for the method GET_INSTANCE of class CL_EXITHANDLER will give you theBADI name for the Transaction.

    Some BADI can have multiple independent implementations, which is much better for software deployment as severaldevelopers can implement the same BADI independently.

    TRANSACTIONS related to BADI:SE18 - Business Add-in builder SE19 Implementation of BADISE24 Class/Interface Builder

    CUSTOMER EXITS (enhancements) are FUNCTIONS so they are called using CALL FUNCTION (or more exactly CALLCUSTOMER FUNCTION.Customer-exit implemented in one project cannot be implemented in other.

    https://websmp230.sap-ag.de/sap(bD1ubCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=25276https://service.sap.com/sap/support/notes/25276https://websmp230.sap-ag.de/sap(bD1ubCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=25276https://service.sap.com/sap/support/notes/25276
  • 8/2/2019 Changes to Std SAP

    15/22

    What is the difference between user exit and customer exit? what is meant by customer exit? andwhat is the difference between user exit and badi?

    USER EXITS are FORMS and are called by SAP standard programs using PERFORM.

    CUSTOMER EXITS are FUNCTIONS so they are called using CALL FUNCTION (or more exactly CALLCUSTOMER FUNCTION).

    Inside the form (user exit) you can read and change almostany global data from host program .Inside a function (customer exit) you can only acces yourimport/export/changing/tables parameters.

    User exits are more flexible because you have moreinformation to use in your code but on the other hand , itis very easy to manipulate erroneously global data and leadthe standard program to a dump or even to make databaseinconsistent.Customer exits are more restrictive but you are sure anychange you can make to any parameters will never lead toinconsistency

    User-exit doesnt have any classification.In customer-exit we have function-module exit , screen exit, menu exit.

    User exits are Basically designed For SD module.Costomer exits Are available for MM,SD,FI,HR..Basicallydesigned for all modules.

    diff b/w user exit and badi

    In user exits we go by general method for enhancementswhile BADIs we use objects (oops concepts)methods for enhancement

    UserExits r used for adding additional functionality to theexisting SAP standard transactions.Using UserExits we canadd additional functionality standard SAP functionalitywithout making any changes to the original code.BADI is astandardized interface for ABAP sources that enablespartners and customers to enhance SAP-delivered programs intheir namespace.

  • 8/2/2019 Changes to Std SAP

    16/22

    EXAMPLES

    Implicit enhancement

    ENHANCEMENT ....

    END-ENHANCEMENT.

    Explicit source code point or section

    ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ... [STATIC] [INCLUDE BOUND].

    ENHANCEMENT ....

    END-ENHANCEMENT.

    -----

    ENHANCEMENT-SECTION enh_id SPOTS spot1 spot2 ... [STATIC] [INCLUDE BOUND].

    ... END-ENHANCEMENT-SECTION.

    New BADI

    : Calls a BAdI method . For badi , a BAdI reference variable must be specified. For meth , a BAdI method of thecorresponding BAdI must be entered directly. The additions assign actual parameters to the formal parameters of theBAdI method, or handle non-class-based exceptions as described in CALL METHOD.

    CALL BADI badi->meth [EXPORTING p1 = a1 p2 = a2 ...] { {[IMPORTING p1 = a1 p2 = a2 ...]

    [CHANGING p1 = a1 p2 = a2 ...]} | [RECEIVING r = a ] }

    [EXCEPTIONS [exc1 = n1 exc2 = n2 ...] [OTHERS = n_others]].

    Or (call method of BAdI)CALL METHOD LF_EXIT-> CHANGE_MATMAS

    Classic BADICALL METHOD lr_badi_sd_route-> route_determination

  • 8/2/2019 Changes to Std SAP

    17/22

    Enhance parameter interface

    You can enhance the parameter interface of a function module with new, optional formal parameters as enhancementimplementation elements. Enhancing by adding new exceptions is not possible.

    In the context of the enhancement concept, the parameter interface of a function module provides correspondingenhancement options.

    ProcedureTo implement an enhancement of the interface, use the Function Builder to call the Enhancement Builder:

    ...

    1. Choose the tab of the parameter type for which you want to insert a formal parameter.

    2. Choose Edit Enhancement Operations Enhance Interface for a function module.

    A dialog box appears.

    3. Select an existing enhancement implementation or create a new one (see Creating an EnhancementImplementation).

    This takes you to the enhancement mode of the Function Builder in which the original components of the functionmodule are displayed and cannot be changed.

    4. Insert the new formal parameter in the same way as when you create a function module.

    5. Save and activate the function module.

    The new parameter can now be used at implicit and explicit enhancement options in enhancements to the source codeof the function module. This can be done using ABAP source code enhancements.

  • 8/2/2019 Changes to Std SAP

    18/22

    Explicit Enhancement Options in ABAP Source Codes

    UseIn ABAP programs, you can select either a position or a program section as an explicit enhancement option.Source code plug-ins for an enhancement are either entered at such a position or they replace the selected

    section.

    An explicit enhancement option of an ABAP program is part of the program. It is thus assigned to thepackage of the program and not necessarily to the package of the enhancement spot to which it belongs.

    Activities To mark a position in an ABAP program as an explicit enhancement option, use the following ABAP statement:

    ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ... To mark a section in an ABAP program as an explicit enhancement option, use the following ABAP statement:

    ENHANCEMENT-SECTION enh_id SPOTS spot1 spot2 ......END-ENHANCEMENT-SECTION.

    Using enh_id , you define the name of the enhancement option or the source code enhancement. After SPOTS , the enhancement option must be assigned to at least one (simple) enhancement spot . For a detaileddescription of the statements, refer to the ABAP keyword documentation.An enhancement spot for source code enhancements is created using forward navigation from within theABAP Editor. The statements can either be entered directly or generated by selecting Enhancements Create

    Enhancement .After the program has been saved, the enhancement option is managed by the Enhancement Builder , and canonly be deleted using the function Enhancements Remove Enhancement .During program generation, the source code plug-ins that are in the current system for the assigned

    enhancement implementations and have the switch status stand-by or on, are included at this position or theyreplace the selected section.

    http://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/09/9bf240a5668d38e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/56/ee9441026aae5fe10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/13/ca944160b8ac5fe10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/91/f1e540f8648431e10000000a1550b0/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/09/9bf240a5668d38e10000000a155106/content.htm
  • 8/2/2019 Changes to Std SAP

    19/22

    Ways of Adjusting SAP StandardBY SAPTRAININGHOUSE, ON DECEMBER 24TH, 2010

    The Big Question: Why adjust SAP Standard?

    Hey, First tell me why should I change SAP standard in the first place? Isnt it fit to use the way we

    got it?. Surely, this question would be ringing in your mind since you would have started this tutorial.Unlike other softwares which you would have come across, SAP is not a ready to use software. SAPcaters to a variety of businesses and each business though having common business processes on a

    broad level, have lots of differences from each other. Not even two companies in the same business orindustry segment do business in exactly same way. SAP does research on its end to collect the mostgeneric needs of all the industries and puts them in its cross-industry flavor of business solutions. Iteven dives into specific industry segments to find whats different there and puts the solutions in its

    industry-specific flavors of business solutions. But still, when SAP continues to put its effort to increasethe ease of implementing SAP for customers, there is still a need remaining for customers to dosomething on their end. This need arises not only due to deficiencies in the delivery from SAP,

    sometimes also because of various choices given to customers by SAP.

    Okay I got it. What are the different levels of changes / adjustments?Having known why customers need to adjust SAP to fine tune it for themselves, we need to know what

    are the options or levels of adjustments available? The entire list of available options are broadlyclassified into following change levels:

    Personalization: It deals with tweaking of user interface of different SAP applications either ona user group level or on globally to meet the business needs of company on the whole or

    specific user group or specific user at the lowest level. Some personalization possibilities are forexample, setting up defaults for specific screen fields, transaction variants,

    language/date/time/decimal/printer settings, role based menus, shortcuts, favorites etc. Customizing: You need to setup the SAP applications as per your specific business process e.g.

    which company codes do you need, what are the different GL accounts in your companys chartof accounts. Basically, its setting up the SAP application with your companys process

    information. SAP already knows the need of such flexibilities in business process and providesoptions to set them up without making any code changes . Such kind of adjustment or

    adaptation of SAP application is known as customizing. All the customizing options of all SAPbusiness applications can be accessed via transaction SPRO.

    Enhancement: Apart from the providing customizing options which do not need code changes,SAP anticipates certain areas in the SAP standard programs where customer may wish to plugin

    his code. These situations may arise mainly in two circumstances. First, SAP may not be inposition to decide any specific logic for such areas as they are highly dependent on customersneeds. Second, SAP may decide a specific logic backed by needs of majority of its customers,but still SAP knows that there would be few customers who would like a different logic. In all

    such situations, SAP provides options for enhancements using various techniques.

    Enhancements made by customer are in form of customer developed repository objects(e.g. programs, classes etc. ) which are referred by SAP standard repository objects (e.g.

    programs, classes etc. ). So, enhancements get plugged into SAP standard repository objects. Customer Development: These are customer developed repository objects which act

    independently along with SAP standard delivery. These may refer to SAP delivered repositoryobjects. Such customer developments are needed either to fill a gap in the SAP standard

    delivery or SAP standard delivery follows a different logic than customers needs and at thesame time leaves no option for customizing or enhancing the logic.

    Modification: You may across some situations, where SAP follows a completely different logicin its standard programs in comparison to what your customer needs. On top of this, you see

    that theres no possibility provided by SAP to adjust the logic also. In these situations, you havetwo options. First, you can perform a customer development with SAP standard program as

    template and incorporate your changes. Second, if the first option is not possible or effort is too

  • 8/2/2019 Changes to Std SAP

    20/22

    high, you resort to the last option of performing a modification of the SAP standard program . This is never a preferred option, since the maintenance of such modifications during

    SAP version upgrades is quite painful.

    Hmm. When do we adopt which level of change?

    Follow the following decision making flow chart to analyze your situation and adopt the advised level of change.

    http://www.saptraininghouse.com/wp-content/uploads/2010/12/Procedure-for-changing-the-SAP-Standard.png
  • 8/2/2019 Changes to Std SAP

    21/22

    http://www.saptraininghouse.com/2010/sap-enhancements/

    Concept of Enhancement

    Underlying concept behind enhancements in SAP is very simple. In a nutshell, the concept is as

    follows: SAP delivers a standard version of software comprised of several repository objects. SAPanticipates that this standard version of its software may not be fit for use right away. So, it leavesprovision in its repository objects for customers to plugin their developed repository objects. The

    provisions made by SAP keep looking for the repository objects plugged-in by customers. With theseplugged-in objects, the enhanced version of SAP software becomes fit for customers business process.

    This concept can be visualized as depicted below:

    Enhancement Techniques

    Depending on the type of repository objects which need to be enhanced and also the influences of thetechnological advancements, there are various techniques using which enhancement provisions are

    made in SAP software. Since, SAP ensures downward compatibility during software upgrades, SAP hasto keep supporting the enhancement provisions made in past using deprecated enhancement

    techniques. As a technical consultant, we should be aware of all enhancement techniques.

    The major enhancement techniques used in various SAP applications are listed below:

    Enhancing Tables/Structures using Append Structure & Customizing Includes Enhancing Data Elements using Transaction CMOD

    Customer Exits Function Module Exits, Menu Exits and Screen Exits Business Transaction Events

    Business Add-Ins (BAdI) Enhancement Framework

    http://www.saptraininghouse.com/2010/sap-enhancements/http://www.saptraininghouse.com/wp-content/uploads/2010/12/Concept-Of-Enhancements.pnghttp://www.saptraininghouse.com/2010/sap-enhancements/
  • 8/2/2019 Changes to Std SAP

    22/22

    Source Code Plug-In

    - Create an enhancement implementation for an implicit or explicit enhancement option. For moreinformation, see Creating an Enhancement Implementation .An empty source code plug-in is automatically created. It has a unique ID and is displayed in the ABAP Editor

    below the enhancement option as follows:ENHANCEMENT id.

    ...ENDENHANCEMENT.- Implement the enhancement between the ENHANCEMENT and ENDENHANCEMENT lines.

    Implement Explicit Enhancement Spot that is an Interface (new style BAdI)

    Keep in mind that implementing the new style BAdIs (GET/CALL) is Ok but implementing an explicitEnhancement-Point/Section supplied by SAP is not recommended:

    https://forums.sdn.sap.com/thread.jspa?threadID=872651&messageID=5453372

    http://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttp://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttps://forums.sdn.sap.com/thread.jspa?threadID=872651&messageID=5453372http://help.sap.com/saphelp_nw04s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htmhttps://forums.sdn.sap.com/thread.jspa?threadID=872651&messageID=5453372