SlideShare a Scribd company logo
1 of 8
I. Kernel-BAdI enhancement

    A BAdI
           • is an anticipated point of extension – these points act like sockets and exist
             in the original source code.
           • is a predefined anchor for an Object PlugIn.
           • has a well-defined interface in contrast to source code plugIns and is
             therefore more stable to changes in the original source code.


    Kernel BAdIs - New Features
           •   Are integrated directly in the ABAP Language/Runtime
           •   Improved filter support allows non-character filter types (packed, numeric,
               string) and complex filter conditions.
           •   Enable reusable implementation instances.
           •   Allow for inheritance of implementations.
           •   Can be switched by the Switch Framework. You have additional control
               over which BAdI implementations are processed at runtime.
           •   The new BAdIs are faster than the classic ones.

Special optimizations for BAdIs with
    •   No active implementations:
           o ‘GET BADI’ is ignored while compiling
           o ‘CALL BADI’ just takes the time for a simple if-statement.
    •   One active implementation
           o Direct call of that implementation
    •   Only implementations, that are switched on are considered.
    •   Active Flag
           o Only active implementations are considered




                     40-600 times faster than Classic BAdIs
    The old classic-BADI used to mix both implementation selection and method call in
    the same CALL METHOD statement. The implementations could only be chosen at
    run-time because of the above reason and due to the fact that the BADI handle could
    only be gotten from another method call by passing the BADI name.
    Whereas in the new Kernel-BADI, the active BADI implementations are included
    into the load of BADI handle at compile time and the filter criterion are expanded as
    IF statements. This is the reason the new Kernel-BADI’s are much faster than classic-
    BADI’s.
Comparison: Usage of Old BAdIs vs. New BAdIs

With Classic BAdI               With New BAdI

DATA: bd TYPE REF TO if_intf.   DATA bd TYPE REF TO
DATA: flt TYPE flt.             badi_name.

CALL METHOD
cl_exithandler=>get_instance    GET BADI bd
   EXPORTING                      FILTERS
     exit_name = `BADI_NAME`         lang = `D`.
   CHANGING
     instance = bd.
     flt-lang = `D`.            CALL BADI bd->method
                                      exporting x = 10.
CALL METHOD bd->method
  EXPORTING
   x =10
   flt_val = flt.
   Obviously getting a new BAdI and calling its methods is much simpler
                and needs less code.
               The old classic-BADI used to mix both implementation selection and
                method call in the same CALL METHOD statement. The implementations
                could only be chosen at run-time because of the above reason and due to
                the fact that the BADI handle could only be gotten from another method
                call by passing the BADI name.
                Whereas in the new Kernel-BADI, the active BADI implementations are
                included into the load of BADI handle at compile time and the filter
                criterion are expanded as IF statements. This is the reason the new Kernel-
                BADI’s are much faster than classic-BADI’s.




   Steps in Creating a kernel-BAdI.
         1. Create a composite enhancement spot SE80 (Right-click on the package
            name Create->Enhancement->Composite Enhancement Spot).
         2. Similar to the Step 1, create a simple enhancement spot. Enhancement
            technique should be Object Plug-in (BAdI). Put Superordinate Composite
            Enhancement Spot as the one created in Step 1.
         3. Create all other components of the BAdI like Interface, methods and filters.


   Once the BAdI has been created, it can be used inside the program using the
commands
   GET BADI and CALL BADI.


   Steps in implementing the BAdI.
       1.       Create a composite enhancement implementation just like the composite
          enhancement was created previously.
       2.       Create a BAdI implementation. (Right click on the BAdI definition name
          in the enhancement spot and say Create BAdI Implementation)
3. Use the composite enhancement implementation name as created in Step 1 above.
      This will guide you through the process of creation of the BAdI implementation.
   4. Create the filter values for the implementation.




Programming Concepts using New BAdI

Since Kernel-BADI is yet another enhancement technology under Enhancement
Framework, we need to create Enhancement Spot in order to hold the BADI definitions.
Similarly, the BADI implementations must also be assigned to Enhancement
Implementations.

Please refer to the package YOTOCN_DEV in BH1 for the examples and screenshots
presented here.
Global Logic




                                                      This BAdI can be implemented later
                                                      to include country-specific logic

These enhancement implementations should be part of the local country specific package.
All these enhancement implementations can be switched “ON” or “OFF” together using
the switch framework.
Advantages of using the Switch framework:
    • Evaluate the source of a bug at a high level.
    • Faster country-specific testing by switching on/off enhancements of other
        countries.
    • Support for parallel developments, since they will not be working on the parent
        object but on separate BAdI implementations for the BAdI definition available on
        the parent object.

Please note that Packages are assigned to Switches. Hence, ALL the “switchable” objects
in a package can be activated/deactivated by having the switch on/off.


SWITCH FRAMEWORK

The Switch Framework can be used to
   • Switch on industry solutions / Enterprise Add-ons
   • Develop new functions without affecting existing ones
•    Enhance delivered systems at partner and customer site in the context of the
        enhancement framework with own functions

Create at least one switch and one Business Function.
Assign the switch to your packages containing Enhancement Implementations. Use
transaction sfw5 to activate and deactivate the Enhancement Implementations.

       CREATING A SWITCH AND SWITCHING IT ON/OFF
          1. Create a Switch through SFW1. Press on “Append Row”. Enter the Name
             of the Switch, description etc.
          2. Double click on the newly entered switch name.
          3. Enter the Name of the Package under the “Packgs” tab. Activate the
             Switch. A background job SFW_ACTIVATE_SWITCH is scheduled in
             the background to activate it.




Switch ZOTOCN_SWITCH created with the package YOTOCN_DEV assigned to it.


           4. Create a business function through SFW2 and enter the name of the
              Switch under the “Switches” tab. Activate it. A background job
              SFW_ACTIVATE_BFUNC is scheduled in the background to activate it.
Business Function ZOTOCN_BUSFN created and the switch ZOTOCN_SWITCH
assigned to it. Note the “reversible” flag ticked.
           5. Once the Switch and the business function are activated, the business
                function can be sitched on/off using SFW5. After switching on the
                business function and then activating it, the switchable objects under the
                package(linked to the switch) are activated. Similarly they can also be
                deactivated by switching off the business function.
                     Please note, it takes 30-120 minutes to switch on/off the business
                        function. There is background job, which gets scheduled.




           Business Function Switched on




Do not deactivate a reversible Business Function in
a production system to keep data integrity.
Business Function ZOTOCN_BUSFN created and the switch ZOTOCN_SWITCH
assigned to it. Note the “reversible” flag ticked.
           5. Once the Switch and the business function are activated, the business
                function can be sitched on/off using SFW5. After switching on the
                business function and then activating it, the switchable objects under the
                package(linked to the switch) are activated. Similarly they can also be
                deactivated by switching off the business function.
                     Please note, it takes 30-120 minutes to switch on/off the business
                        function. There is background job, which gets scheduled.




           Business Function Switched on




Do not deactivate a reversible Business Function in
a production system to keep data integrity.

More Related Content

What's hot

ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Groupsapdocs. info
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programmingSatheesh Kanna
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONKranthi Kumar
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPNoman Mohamed Hanif
 
User exit training
User exit trainingUser exit training
User exit trainingJen Ringel
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questionsKranthi Kumar
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorialraonivaz
 
Sap abap real time questions
Sap abap real time questionsSap abap real time questions
Sap abap real time questionstechie_gautam
 
How to extend an outbound i doc
How to extend an outbound i docHow to extend an outbound i doc
How to extend an outbound i docrupesh chouhan
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answersUttam Agrawal
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infosapdocs. info
 

What's hot (20)

ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
Badis
Badis Badis
Badis
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAP
 
User exit training
User exit trainingUser exit training
User exit training
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
Reports
ReportsReports
Reports
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorial
 
Field symbols
Field symbolsField symbols
Field symbols
 
Sap abap
Sap abapSap abap
Sap abap
 
Sap abap real time questions
Sap abap real time questionsSap abap real time questions
Sap abap real time questions
 
How to extend an outbound i doc
How to extend an outbound i docHow to extend an outbound i doc
How to extend an outbound i doc
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
SAP ALE Idoc
SAP ALE IdocSAP ALE Idoc
SAP ALE Idoc
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
 

Viewers also liked

SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsGaruda Trainings
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answersGarySpeed1234
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction eventsKranthi Kumar
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP PerformancePeterHBrown
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantAnkit Sharma
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easyKranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programsKranthi Kumar
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapKranthi Kumar
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed NotesAkash Bhavsar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESKranthi Kumar
 

Viewers also liked (17)

SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
 
SAP ABAP Material
SAP ABAP MaterialSAP ABAP Material
SAP ABAP Material
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answers
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
 
Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
 
Sp rao abap
Sp rao abapSp rao abap
Sp rao abap
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abap
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed Notes
 
Epic abap
Epic  abapEpic  abap
Epic abap
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 

Similar to Kernel-BAdI Enhancement Guide

Customizing oro crm webinar
Customizing oro crm webinarCustomizing oro crm webinar
Customizing oro crm webinarOro Inc.
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiangmfrancis
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJAX London
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOCCarl Lu
 
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-DurandSOAT
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based developmentgo_oh
 
Upgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsUpgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsMarna Walle
 
BADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfBADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfssuser08365f
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicKalkey
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farmRajkiran Swain
 
11 Enhancements & Modifications.pptx
11 Enhancements &     Modifications.pptx11 Enhancements &     Modifications.pptx
11 Enhancements & Modifications.pptxSaiRahulReddy4
 
Java EE 7 Recipes
Java EE 7 RecipesJava EE 7 Recipes
Java EE 7 RecipesJosh Juneau
 

Similar to Kernel-BAdI Enhancement Guide (20)

Customizing oro crm webinar
Customizing oro crm webinarCustomizing oro crm webinar
Customizing oro crm webinar
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiang
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily Jiang
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOC
 
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
 
CATS Approval.pdf
CATS Approval.pdfCATS Approval.pdf
CATS Approval.pdf
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Upgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actionsUpgrade to IBM z/OS V2.4 technical actions
Upgrade to IBM z/OS V2.4 technical actions
 
BDD UnderStandinging
BDD UnderStandingingBDD UnderStandinging
BDD UnderStandinging
 
BADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfBADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdf
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Diff sand box and farm
Diff sand box and farmDiff sand box and farm
Diff sand box and farm
 
Bdd and spec flow
Bdd and spec flowBdd and spec flow
Bdd and spec flow
 
Combined Project
Combined ProjectCombined Project
Combined Project
 
Apache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI ToolboxApache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI Toolbox
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
11 Enhancements & Modifications.pptx
11 Enhancements &     Modifications.pptx11 Enhancements &     Modifications.pptx
11 Enhancements & Modifications.pptx
 
Java EE 7 Recipes
Java EE 7 RecipesJava EE 7 Recipes
Java EE 7 Recipes
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 

Kernel-BAdI Enhancement Guide

  • 1. I. Kernel-BAdI enhancement A BAdI • is an anticipated point of extension – these points act like sockets and exist in the original source code. • is a predefined anchor for an Object PlugIn. • has a well-defined interface in contrast to source code plugIns and is therefore more stable to changes in the original source code. Kernel BAdIs - New Features • Are integrated directly in the ABAP Language/Runtime • Improved filter support allows non-character filter types (packed, numeric, string) and complex filter conditions. • Enable reusable implementation instances. • Allow for inheritance of implementations. • Can be switched by the Switch Framework. You have additional control over which BAdI implementations are processed at runtime. • The new BAdIs are faster than the classic ones. Special optimizations for BAdIs with • No active implementations: o ‘GET BADI’ is ignored while compiling o ‘CALL BADI’ just takes the time for a simple if-statement. • One active implementation o Direct call of that implementation • Only implementations, that are switched on are considered. • Active Flag o Only active implementations are considered  40-600 times faster than Classic BAdIs The old classic-BADI used to mix both implementation selection and method call in the same CALL METHOD statement. The implementations could only be chosen at run-time because of the above reason and due to the fact that the BADI handle could only be gotten from another method call by passing the BADI name. Whereas in the new Kernel-BADI, the active BADI implementations are included into the load of BADI handle at compile time and the filter criterion are expanded as IF statements. This is the reason the new Kernel-BADI’s are much faster than classic- BADI’s.
  • 2. Comparison: Usage of Old BAdIs vs. New BAdIs With Classic BAdI With New BAdI DATA: bd TYPE REF TO if_intf. DATA bd TYPE REF TO DATA: flt TYPE flt. badi_name. CALL METHOD cl_exithandler=>get_instance GET BADI bd EXPORTING FILTERS exit_name = `BADI_NAME` lang = `D`. CHANGING instance = bd. flt-lang = `D`. CALL BADI bd->method exporting x = 10. CALL METHOD bd->method EXPORTING x =10 flt_val = flt.
  • 3. Obviously getting a new BAdI and calling its methods is much simpler and needs less code.  The old classic-BADI used to mix both implementation selection and method call in the same CALL METHOD statement. The implementations could only be chosen at run-time because of the above reason and due to the fact that the BADI handle could only be gotten from another method call by passing the BADI name. Whereas in the new Kernel-BADI, the active BADI implementations are included into the load of BADI handle at compile time and the filter criterion are expanded as IF statements. This is the reason the new Kernel- BADI’s are much faster than classic-BADI’s. Steps in Creating a kernel-BAdI. 1. Create a composite enhancement spot SE80 (Right-click on the package name Create->Enhancement->Composite Enhancement Spot). 2. Similar to the Step 1, create a simple enhancement spot. Enhancement technique should be Object Plug-in (BAdI). Put Superordinate Composite Enhancement Spot as the one created in Step 1. 3. Create all other components of the BAdI like Interface, methods and filters. Once the BAdI has been created, it can be used inside the program using the commands GET BADI and CALL BADI. Steps in implementing the BAdI. 1. Create a composite enhancement implementation just like the composite enhancement was created previously. 2. Create a BAdI implementation. (Right click on the BAdI definition name in the enhancement spot and say Create BAdI Implementation)
  • 4. 3. Use the composite enhancement implementation name as created in Step 1 above. This will guide you through the process of creation of the BAdI implementation. 4. Create the filter values for the implementation. Programming Concepts using New BAdI Since Kernel-BADI is yet another enhancement technology under Enhancement Framework, we need to create Enhancement Spot in order to hold the BADI definitions. Similarly, the BADI implementations must also be assigned to Enhancement Implementations. Please refer to the package YOTOCN_DEV in BH1 for the examples and screenshots presented here.
  • 5. Global Logic This BAdI can be implemented later to include country-specific logic These enhancement implementations should be part of the local country specific package. All these enhancement implementations can be switched “ON” or “OFF” together using the switch framework. Advantages of using the Switch framework: • Evaluate the source of a bug at a high level. • Faster country-specific testing by switching on/off enhancements of other countries. • Support for parallel developments, since they will not be working on the parent object but on separate BAdI implementations for the BAdI definition available on the parent object. Please note that Packages are assigned to Switches. Hence, ALL the “switchable” objects in a package can be activated/deactivated by having the switch on/off. SWITCH FRAMEWORK The Switch Framework can be used to • Switch on industry solutions / Enterprise Add-ons • Develop new functions without affecting existing ones
  • 6. Enhance delivered systems at partner and customer site in the context of the enhancement framework with own functions Create at least one switch and one Business Function. Assign the switch to your packages containing Enhancement Implementations. Use transaction sfw5 to activate and deactivate the Enhancement Implementations. CREATING A SWITCH AND SWITCHING IT ON/OFF 1. Create a Switch through SFW1. Press on “Append Row”. Enter the Name of the Switch, description etc. 2. Double click on the newly entered switch name. 3. Enter the Name of the Package under the “Packgs” tab. Activate the Switch. A background job SFW_ACTIVATE_SWITCH is scheduled in the background to activate it. Switch ZOTOCN_SWITCH created with the package YOTOCN_DEV assigned to it. 4. Create a business function through SFW2 and enter the name of the Switch under the “Switches” tab. Activate it. A background job SFW_ACTIVATE_BFUNC is scheduled in the background to activate it.
  • 7. Business Function ZOTOCN_BUSFN created and the switch ZOTOCN_SWITCH assigned to it. Note the “reversible” flag ticked. 5. Once the Switch and the business function are activated, the business function can be sitched on/off using SFW5. After switching on the business function and then activating it, the switchable objects under the package(linked to the switch) are activated. Similarly they can also be deactivated by switching off the business function.  Please note, it takes 30-120 minutes to switch on/off the business function. There is background job, which gets scheduled. Business Function Switched on Do not deactivate a reversible Business Function in a production system to keep data integrity.
  • 8. Business Function ZOTOCN_BUSFN created and the switch ZOTOCN_SWITCH assigned to it. Note the “reversible” flag ticked. 5. Once the Switch and the business function are activated, the business function can be sitched on/off using SFW5. After switching on the business function and then activating it, the switchable objects under the package(linked to the switch) are activated. Similarly they can also be deactivated by switching off the business function.  Please note, it takes 30-120 minutes to switch on/off the business function. There is background job, which gets scheduled. Business Function Switched on Do not deactivate a reversible Business Function in a production system to keep data integrity.