SlideShare ist ein Scribd-Unternehmen logo
1 von 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.

Weitere ähnliche Inhalte

Was ist angesagt?

Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
Kranthi Kumar
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
Pradipta Mohanty
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
Kranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
Kranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
Kranthi Kumar
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
kssr99
 

Was ist angesagt? (20)

Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
How to add new Object Link in SAP DMS
How to add new Object Link in SAP DMSHow to add new Object Link in SAP DMS
How to add new Object Link in SAP DMS
 
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
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
Sap abap
Sap abapSap abap
Sap abap
 
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
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
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
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
Workbench and customising request
Workbench and customising requestWorkbench and customising request
Workbench and customising request
 
GST_Configuration Document_GANESH_SAPSD
GST_Configuration Document_GANESH_SAPSD GST_Configuration Document_GANESH_SAPSD
GST_Configuration Document_GANESH_SAPSD
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 

Andere mochten auch

1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
Kranthi Kumar
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answers
GarySpeed1234
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
Kranthi Kumar
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
Kranthi Kumar
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
Kranthi 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 abap
Kranthi Kumar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
Kranthi Kumar
 

Andere mochten auch (18)

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
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
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
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
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 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
 
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
 
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
 

Ähnlich wie Badi document

Customizing oro crm webinar
Customizing oro crm webinarCustomizing oro crm webinar
Customizing oro crm webinar
Oro 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 Jiang
mfrancis
 
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
JAX London
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOC
Carl Lu
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
uzzal basak
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Kalkey
 

Ähnlich wie Badi document (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
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
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
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Kürzlich hochgeladen (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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
 

Badi document

  • 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.