Badis in abap-hr

please help me in knowing  ways and scenarios that how  to implement badis in abap-hr

Hi,
Maybe you should first ask what you require BADIs for?
Find BADIs using this : Re: Is there a way to find a BADI uding a TCODE?
Best regards,
Guillaume

Similar Messages

  • Why use filters in BADI (SAP-ABAP) when same can be achieved using paramete

    Hello Experts!
    I am a newbie in SAP and this might be a very basic question so, i am sorry for that!
    I was wondering, what is the use of "filters(flt_val)" in BADI (SAP-ABAP) ?
    I guess we can achieve the same using parameters ?
    I know that we can pass structure as flt_val, thus reducing the no. of parameters sent. I also read about sending country and things like that to our BADIs to behave differently based on that.
    (i.e. say tax rates differ from country to country so may be we can set tax rate of GB to 16 or something..)
    but still i am confused about the significance of Filters.
    I will be grateful, if anyone could answer this one...
    Thanks in advance!!!
    Rgds,
    Mayur

    Hello Mr. Venu,
    Thanks for your answer. It helped somewhat, but it's not solved the doubt to 100%... 
    Please let me ask you for some more information on this one and please correct if i am wrong: -
    Suppose, there are 10 company codes that we need to handle, so as you said, we have 10 implementations of the BADI.
    We decide to use company code as filter. We have 10 different implementations of BADI, which are deveoped
    by 10 different teams(or 10 members of the same team etc..). 
    This will have 10 different Active implementations of our BADI. and based on the filter, respective impls are called.
    Is this right or wrong?
    If right, then why not use parameters instead? They can do the same!
    If wrong, i am sorry, but could you elaborate about the mistake?
    Thanks again,
    Mayur.

  • BADI & OO ABAP Material

    hi
    can any one send me the material Regarding BADI & OO ABAP Concepts........
    Thanks in advance........
    my mail id is: <b>[email protected]</b>
    Regards,
    Ravi

    Hi,
    Check the following links:
    For BADI:
    http://www.allsaplinks.com
    For OO ABAP:
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
    Regards,
    Bhaskar

  • New BADI concept in ECC 6.0

    I am trying to gain an understanding of how I would implement one of the new BADIs in ECC 6.0 (badis implmented through and enhancement spot , get badi, call badi concept).
    I am  not looking for information on how to implement a classic badi through se18/se19.
    I have also ready through the SAP help on the new badis and it is still not clear to me. So, please do not provide links to the standard SAP help. I have that.
    I am wondering if anybody has a whitepaper, example, etc.  that explains the details of how to implement, use, trigger the  new badis linked to an enhancement spot.

    Hi  J.J,
    enhancement spot
    A repository object for the administration of explicitly created enhancement options. Enhancement spots are components of a tree structure hierarchy, of which the branches represent composite enhancement spots and the leaves are simple enhancement spots. Implicitly available enhancement options do not have any enhancement spots.
    composite enhancement spot
    Semantic combination of simple and other composite enhancement spots with the aim of providing structure.
    simple enhancement spot
    Reference to a set of enhancement spot element definitions. A simple enhancement spot can occur independently or as a component of a composite enhancement spot.
    ENHANCEMENT-POINT
    Defines a position in an ABAP program as an enhancement option,
    at which one or more source code plug-ins can be inserted.
    the syntax will be like
    ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ...
    STATIC
    INCLUDE BOUND.
    Enhancement Options
    Definition
    Enhancement options are positions in Repository objects where enhancements can be made. These options are either explicitly defined (by the developer) or exist implicitly. Explicit enhancement options are generally defined in a central initial system. Enhancements are made in follow-on systems.
    Use
    Explicit enhancement options can currently be defined by:
    1. Explicitly flagging source code points or sections in ABAP programs. For an enhancement, these can be enhanced or replaced by source code plug-ins.
    2. Including Business Add-Ins (BAdIs) in ABAP programs. These programs are then enhanced by object plug-ins with predefined interfaces.
    Explicit enhancement options are managed by enhancement spots and enhanced by enhancement implementations.
    Currently, implicit enhancement options are:
    1. Specific options in ABAP programs – such as the end of the program – which can be enhanced by source code plug-ins.
    2. Parameter interfaces of function modules, which can be enhanced with parameters.
    3. Attributes and parameter interfaces of global classes, which can be enhanced with attributes or parameters.
    Implicit enhancement options always exist and do not require enhancement spots. They are also enhanced by enhancement implementations.
    BAdIs Embedded in the Enhancement Concept
    Use
    The definition of BAdIs is managed by enhancement spots. A simple enhancement spot for BAdIs can contain several BAdI definitions as enhancement spot element definitions. BAdIs that would otherwise be spread out in the system can be grouped together semantically.
    This structuring is mirrored on the implementation side through the enhancement implementations. A BAdI can be implemented by several BAdI implementations that are managed by enhancement implementations. A simple enhancement implementation for object plug-ins can contain several BAdI implementations of an enhancement spot as enhancement implementation elements and can implement a BAdI multiple times. Therefore, several enhancement implementations can be assigned to one enhancement spot.
    A BAdI is always assigned to the same package, like the enhancement spot, to which it belongs.
    Example
    The structuring features of BAdIs in enhancement spots can be of a technical or a subject nature.
    If, in the definition of several BAdIs, you have the provision that they are to be used in the same context (this is a feature known only by the person who defines the BAdIs), they must be used by the same simple enhancement spot.
    From a subject point of view, all BAdIs must then be grouped together by affiliation to functional units – for example, payroll – in combined enhancement spots.
    Thanks and regards
    suma sailaja pvn

  • UE or BADI within MIGO Posting

    Hi all.
    I need to call Z transaction within the posting action of MIGO process. I had tried to use MB_MIGO_BADI and MB_DOCUMENT_BADI but when I tried to write set up a break point it didn't stop there.
    Does anyone has an idea about a specific user-exit or BADI ?
    Thanks,
    Rebeka

    Try these steps to search for a BADI->
    http://abap-explorer.blogspot.com/2008/07/how-to-search-for-badis-click-here.html
    http://abap-explorer.blogspot.com/

  • Loop statement in ABAP OO

    Hi,
    I am trying to change a BADI interface and since BADIs use ABAP OO, a simple loop statement fails to work.
    I need to loop through an internal table and for each record in the internal table I need to read another db table which has a field in common with the internal table.
    Ideally,
    Loop at lt_selections
    select logsys from /bic/mzcs_unit where /bic/zcs_unit = lt_selections-cs_unit
    endloop.
    But this piece of code fails to work in BADI because of OO concepts.
    Can anyone help me out here?
    THank you

    As Alejandro said, if you are getting a syntax error, it is probably because <b>header lines are not allow in OO</b>.
    data: wa_selections like line of lt_selections.
    Loop at lt_selections into wa_wa_selections.
    select logsys from /bic/mzcs_unit
         where /bic/zcs_unit = wa_selections-cs_unit.
    endloop.
    Regards,
    Rich Heilman
    Message was edited by: Rich Heilman

  • Adding TabPage to (FPM) Standard ABAP Webdynpro Application

    Hi
    i'm beginning with ABAP webdynpro so i have been investigating tutorials and documentation about this and i created some sample programs for show Z tables or things like that.
    But my requirement is modificate the Standard Application 'Course Registration' of Student Lifecycle Management module ; this application has 3 Standard TapPages , one of these TabPages shows the courses to be booked and i need to add another new TabPage in order to show the courses to be booked divided for some criteria in the original TabPage and the new TabPage , the new TabPage must have the same functionality of original Tabpage.  Something like enhance Standard program with Screen Exit and Badis in ABAP. 
    I was investigated and now i know we can enhance Standard WD Component like deleting UI elements, enhance methods or add view/windows ;  but the 'Course Registration' is a FPM application so i found a tutorial cookbook configuration for this application and it explains we can add  TabPages (MainViews) or SubTabPages (Subviews) like i need ; but the tutorial only mentions the 3 original standard TabPages because all is related with already existing configurations for each component ;   In FPM framework configuration for the component if i press the 'Add View' button it adds a TabPage like i want, but i really do not know if it works for add a new 'Z' TabPage.  
    Can somebody please help me about how can i add a TabPage to Standard Webdynpro Application for application wich uses FPM framework ?  Where can i investigate about this ? 
    Excuse me for long thread , any help will be appreciated.
    Best Regards
    Frank

    Thanks Madhu
    Please let me give detail ; I just go to desired Application  PIQ_MBSS_OIF , Configuration PIQAC_MBSS_OIF ;  the configuration shows its two component configurations for Header IDR  (FPM_IDR_COMPONENT)  and floor plan specific (FPM_OIF_COMPONENT).
    In WD Component FMP_OIF_COMPONENT  with standard configuration  PIQCC_MBSS_OIF i see the tree Satndard TabPages created , one of these Tabpage is wich i need to divide in two Tabpages ;  in this Standard TabPage i see its required UIBBs with each standard UIBB configuration (ie.  FPM_LIST_UIBB with configuration PIQCC_MBSS_BCART_LIST  for the table list).
    Here is where i really do not know if my requirement can be made by just using FPM framework configurations :  can i copy Standard Configuration for  FMP_OIF_COMPONENT  , add the new Tabpage , save it with new 'Z' configuration , and it will work ok in the Standard Application ?       For add the Tabpage i should then add configurations for the UIBBs wich compose the TabPage (FPM_LIST_UIBB , FPM_TABBED_UIBB and  PIQUIBB_POPUP_AGENT ) ,  is this right ?
    I hope the explanation is clear ; any orientation will be helpfull.
    Best  Regards
    Frank

  • Transporting data from abap to function

    Hi,
    i need to transport data (Set/Get or other technique) from method 1 to method 2.
    abap 1 call method1 of badi 1
    abap 1 calls function module 1 IN UPDATE TASK
    function module 1 calls function module 2 with destination 'NONE'.
    function module 2 calls method 2 of badi 2
    I've tried the Set/get parameter technique, but it didn't work.
    Are there other possibilities ?
    regards,
    Hans
    [email protected]

    Hi ,
    So you have given 4 scenarios in your first mail.
    Please try this
    In Method 1
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          WA_INDX TYPE INDX.
    Before export, fill the data fields
    before CLUSTR.
    WA_INDX-AEDAT = SY-DATUM.
    WA_INDX-USERA = SY-UNAME.
    Export der Daten.
    EXPORT IT     FROM IT
           TO SHARED BUFFER INDX(ST) FROM WA_INDX ID INDXKEY.
    In Method 2
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          WA_INDX TYPE INDX.
    IMPORT IT     TO IT
           FROM SHARED BUFFER INDX(ST) ID INDXKEY TO WA_INDX.
    Hope thsi works .
    Cheers.

  • Enhancement help in ME51n : Extereme urgent  ! Exit + BADI-EX

    Hi Experts !
    I have added one tab and a field into it in ME51n through screen exit mentioned below :
    Calling screen  No.     Area      Called screen     No.   Short Text
    SAPLMEGUI   0014   SUB0     SAPLXM02        0111
    I need to save the user input value of this field + the PR number generated into my ztable which has only these two fields.
    <b>The issue here is that PR no gets generated only when we save and i cud not fetch it in these exits  ( If some has a point that we can fetch it in one of the exits-plz let me know)</b>
    Now I've used the exit : EXIT_SAPLMEREQ_003 of enhancement : MEREQ001
    to put data from screen field( added ) into a structure 'IM_ITEM' of nature mereq_item  by using methods of interface IF_PURCHASE_REQUISITION_ITEM.
    Below is the code i used in the include of above exit:
    *&  Include           ZXM02U03
    tables  ZTMMP0_PMASTER.
    data im_item type mereq_item.
        CALL METHOD im_req_item->get_data
          receiving
            re_data = im_item.
    im_item-zpurpose = ZTMMP0_PMASTER-PURPOSE.
    CALL METHOD im_req_item->set_data
      EXPORTING
        im_data =  im_item .
    Now i found a BADI ->ME_REQ_POSTED which gets triggered at the time of posting the PR.if u r clear about my above code thru methods<i><b> i am tryin to throw data of screen input from my function exit and catch the same in BADI - where PR no is visible and i wud push both from BADI-method into my ztable.</b></i>
    Issue is that the data of my new field which i passed thru my exit as shown above is not visible in BADI method and i cant use the get_data method
    eagerly waiting for help,
    Sachin Soni
    Message was edited by:
            Sachin Soni

    Hello Sachin,
    You are trying to bring data from an Exit to a BADI , but the BADI cannot recieve the DATA as far as i understood since the parameters are restricted,
    An option coming to me right now is to :
    <b> Use import <--> EXPOT memory</b>
    Export from the Exit and Import from the BADI using ABAP export/import statements
    EXPORT (OBJ_TAB) to memory ID 'ABCD''.
    IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.
    OR
    IMPORT A = A  B = B_PROG  C = C_PROG FROM MEMORY ID 'ABCD'.
    and
    FREE MEMORY ID 'ABCD'
    Please check for correct syntaxes
    Reward if helpful and pls update if problem is solved
    Regards
    Byju

  • Hi abaper

    can any one suggest me the simple procedure to create a simple badi.its urgent
    thanks

    Hi
    What are BAdIs?
    •     is an anticipated point of extension – these points act like sockets and exist in the original source code
    •      based on ABAP Objects. BAdI defines an interface that can be implemented by BAdI-implementations that are transport objects of their own
    •      Important! There are 2 roles: Enhancement Option-provider & Implementer.
    •      In the above context, Enhancement Implementation can be done only if option (hook) is provided by the Option-provider. In simple words there are no implicit BAdIs.
    Note: In the following slides, Definitions are created so as to understand the method of BAdI definition & for example purpose. As stated above this is the role of Enhancement Option-Provider.
    Classic BAdIs already exist since SAP Release 4.6
    BAdIs have been Re-implemented in ECC7.0 under the new Enhancement Framework & Switch Framework
    Classic BAdIs
    •     To understand what a powerful pattern a BAdI is, we will now define & then implement a BAdI
    BADI Class is created automatically.
    The various options are described below in detail:
    1. Enhanceable: Enhanceability of filter types can only be specified for filter-dependent BADI definitions under very special conditions. For example, the domain belonging to the filter type must be linked with a value table that is of the type E or G. A BADI implementation can then be created in one step by creating a new filter value that is automatically entered into the value table at save and also copied into the transport order of the BADI implementation. In addition, it is also possible to create a new filter value and, at the same time, a BADI implementation with the same name. Naturally, you can also specify existing filter values.
    You should select this feature if there is a prerequisite that a new filter value is created together with a new BADI implementation - that is, that BADI implementations are not created solely with existing filter values, although this, too, is possible.
    2. Multiple-Use
    3. Filter-Dependent
    Instance Methods can access all of the attributes of a class and can trigger all events of a class. Static Methods can only access static attributes and static events.
    Adding event handling & exception(s) is not a necessary step…
    Exceptions:
    Events:
    Events can be defined in classes or in interfaces. Corresponding methods can trigger these events with the RAISE EVENT statement. Each class (or interface) that is going to handle the corresponding event must implement a relevant handler method, and register it using the SET HANDLER statement. When an event occurs, the system calls all of the handler methods registered for that event.
    Like method definitions, events have a parameter interface. The only difference is that events may only have EXPORTING parameters.
    Save and activate the BAdI definition!
    BADI Implementation
    BAdI Implementation (SE19)
    Save and activate the BAdI implementation!
    Implementation for SAP provided BAdI…
    Roles: (BADI Definition & Implementation)
    •     Developer: Enhancement (BAdI) Option-Implementer
    •     SAP: Option-Provider
    BAdI as a ‘controlled’ Enhancement Option:
    •     Option-provider defines the interface and limits the implementer to the class that the implements the BAdI
    •     Assured that BAdI implementer can only change the parameters handed over to the BAdI by the option provider
    Steps:
    1.     Search for the BAdI corresponding to the transaction
    2.     Create a custom Implementation for the BAdI by adding code in the appropriate method
    3.     Test that the method with custom code is invoked on executing the transaction.
    Create Material using MM01. Copy from existing Material.
    Select the required views.
    Enter mandatory data and click on Save.
    Check the Exit Name ‘BADI_MATERIAL_CHECK’. This is the BAdI we are going to implement.
    Implementing the BAdI ‘BADI_MATERIAL_CHECK’
    Go to SE18 & check the BAdI definition (Methods)
    We will be using the ‘CHECK_DATA’ method. Double Click to see the Method Parameters.
    Implementing BADI
    Go to SE19. Specify a name for the BAdI Implementation.
    Enter the Definition Name.
    Double-click the method ‘CHECK_DATA’ to enter the source code
    Double-click the method ‘CHECK_DATA’ to enter the source code
    We are only showing an message in this case; if division in ‘Basic Data’ tab of Material Creation is not entered.
    The structure CMARA is defined as ‘Exporting Parameter’. Data can be modified using this.
    Activate the Implementation
    Testing the BAdI
    Testing the BAdI implementation (BADI_MATERIAL_CHECK)
    MM01 / MM02 and create / change material and save. On clicking Save, our BADI will trigger.
    Message is displayed (Division not entered)
    BAdIs…in the new Enhancement Framework (ECC 6.0)
    •     How the new BAdIs differ from the Classic BAdI?
    •      Good news is that…basic thing about the BAdI remains the same!
    •      Differ in the manner in which new BAdI is embedded in the container-structure of the Enhancement Framework
    •      Better performance & Lower Memory consumption
    •      Evaluates as much information as possible during compile time
    •      40-600 times faster than Classic BAdIs
    •      Internal handle-class integrated in the SAP Kernel
    •      Provides ‘switchable’ implementation(s) through use of Switch Framework
    •      Special optimizations with ‘GET BADI’ & ‘CALL BADI’ (new ABAP commands)
    •      Implementation Inheritance
    Usage of old (classic) BAdIs versus New BAdIs…
    •     Two new ABAP commands for the new BAdI:
    •      GET BADI  : all active implementations are selected and the method of BAdI is called (amounts to a loop with different method calls in it)
    Enhancement Spot as a container for BAdI…
    •     Enhancement Framework has containers for BAdI implementations as well

  • IPC4.0: UserExit ABAP Structures konp, komp

    Hi
    I need some help with the representation of some ABAP structures in Java.
    We are looking for the representation of the KOMP-TAXM1 field, which should be an attribute of the Java Interface "IPricingItemUserExit". However, the call
    prItem.getItemAttributeValue("TAXM1")
    seems not to work.
    The ABAP KONP structure might be represented by IPricingConditionRecord:
    IPricingConditionRecord konp = (IPricingConditionRecord)prCondition.getConditionRecord();
    Is that correct?
    Thanks for any help.
    Kilian

    Hi Yatendra,
    Question 1 ) Do i need to define/declare "constants" and "feild-symbols" in Java userexit, as mention in above ABAP code ?
    Java has no such thing as  'field-symbols', thanks God for that, so the answer would be a no. And there is no such thing as 'constants' in Java, thou you can reach the same using a final class with a public static final variable of any given type you want.
    Question2 ) How to write SELECT statement code in Java UserExit ?
    You simply don't, and if you have such in ECC just raise ' ECC user exit is incorrect and should be fixed '... very very popular topic, pretty sure you will have a hard time to prove, but I'm certain you will prove that ECC userExit code in ABAP is a joke (because that code is a joke and I'm fairly positive it was created by an intern or something..)
    Question 3) What would be equivalent code/logic in Java userexit for READ TABLE statement ?
    as Sarath mentioned above, as soon you implement the BADI in ABAP code and Map the attributes accordingly, you will end up with no collection or Array inside the userExit itself, as stuff has been calculated before in the BADI and only final values have been passed forward to your custom Java code.
    Hope it helps, you should read Sarath hyperlink as he compiled a master piece on IPC extensions.
    Cheers,
    D.

  • BADI ME21N

    Hello All,
               I read the correspondance on BADI posted by Kripa and answers by all, I also want to learn BADI.
    Kripa, can you send me the BADI code & how you write methods along with the technical specifications.
    My ID : [email protected]
    Thanks & Regards,
    Dilip
    Regards,
    Dilip
    Message was edited by: Diliip Gupchup

    Business Add-Ins
    Overview
    BAdi Definition
    BAdi Implementation
    Calling BAdi
    Filter Dependent Badi
    New SAP enhancement technique
    To accommodate user requirements not available / too specific to be included in the SAP standard Program
    Based on ABAP Objects – It has Interfaces & Methods
    Guaranteed upward compatibility of all Business Add-In interfaces
    Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces
    Though different enhancement technique, BAdi has following distinct features
    -Uses Object oriented approach
    -Two parts - Definition and its Implementation - definition can either be SAP provided or user may also create it
    -no longer assumes a two-system infrastructure (SAP and customers)
    -allows multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like)
    -Can have multiple representations – specific one will be executed based on some criteria (filter)
    -No SSCR registration
    Application Programmer defines an interface for the Business Add-Ins
    Enhancement management takes this interface & generates an adapter class for implementing it, thus opening path for implementation
    As per need, BAdi is suitably implemented
    Developer then creates an instance of the adapter class in the application program and calls the corresponding method at the appropriate time
    Application program simply calls the adapter class methods; it does not know which implementations are actually being called
    Adapter class methods generated by add-in management decide which implementation is to be called
    Look for BAdi in IMG and in component hierarchy
    Create own implementation of the add-in (complete coding for Methods) and activate
    Enhancement's active components are called at runtime.
    BAdi Definition
    To include Business Add-Ins in the program
    - Define an interface for the enhancement in the SAP menu under Tools-> ABAP Workbench -> Utilities -> Business Add-Ins (transaction SE18)
    -Call the interface at the appropriate point in application program
    -Customers can then select the add-in and implement it according to their needs
    Let’s plan a simple task:
    We want to convert strings in your application program is a specific way through Business Add-Ins technique
    As the application developer, first task is to define an enhancement consisting of an interface & a method with a changing parameter to transfer value
    Choose Tools ->ABAP Workbench -> Utilities -> Business Add-Ins (transaction SE18) from the SAP menu
    Create a new Business Add-In containing a maximum of 20 characters and move to Interface Tab
    Name of the interface is proposed by the system but may be changed
    Save and double-click on the interface name to add a method
    System branches to the Class Builder
    Assign a method to the interface (default is Instance Method)
    Add a parameter
    Save and Activate
    Definition screen(SE18) will now contain the method assigned to the interface
    Documentation may be created to describe the intended functionality of this Add-Ins
    BAdi Implementation
    ABAP Workbench ->Utilities -> Business Add-Ins (transaction SE19)
    Find the suitable Business Add-Ins present in system (Use IMG or Component hierarchy)
    Use Add-Ins Documentation to understand functionality & to decide
    Implement the Add-Ins
    -a class is created with the same interface
    -Finalize coding for the method
    Implementations are discrete transport objects and lie within the namespace of the person or organization implementing them
    Work on Simple Badi project – Continued…
    Already structure of the interface defined
    In order to create an implementation for the text conversion example, the add-in (in this case, the interface's method) needs to be filled with logic that converts the string. This logic will be run through every time the add-in is called from the application program
    Choose ABAP Workbench ->Utilities -> Business Add-Ins (transaction SE19)
    Create a new implementation and select the appropriate definition in the dialog box
    Add a short text and move to Interface tab
    Save
    Double-click the method name when the system will take you to the code window for the method
    Insert the desired source code for the implementation between the method if_ex_businessaddin~method. and endmethod. statements automatically provided to you by the system.
    Save and return to the Change Implementation screen
    On Activation, this implementation may be executed from the application program
    Sample code to call Add-In from ABAP Program
    To call static method of a global class directly, class … definition load statement is needed
    Instance of the Adapter class is created and its method is executed
    If enhancement needs to be different based on some parameter (e.g. country-specific or company-code specific), separate implementation of the same Add-In can be created and activated
    At run time, the specific implementation will be execute
    Possible through Filter-Dependent Badi
    How it works
    -Switch on Filter-dependency while defining the interface
    -Select a suitable filter element
    -All methods created in the interface will have filter 'FLT_VAL' as one import parameter
    -Application program provides the filter value to the enhancement method
    -The method then selects the active implementation for that value
    What qualifies as a Filter
    A Data element
    Underlying domain may contain a maximum of 30 characters and must be of Character type
    The data element must
    -Either have a search help with a search help parameter of the same type as the data element and this parameter must serve as both the import and export parameter or
    -the element's domain must have fixed domain values or a value table containing a column with the same type as the data element
    Custom data element with the criteria may also be used
    Implementing a Filter-Dependent Business Add-In
    Implement the Add-In for each relevant filter value
    However, multiple filter values may use the same implementation
    Enter a characteristic filter value for the implementation
    Calling a Filter-Dependent Business Add-In
    Same as before
    Pass the filter value as export parameter to the method
    BAdi – some useful information
    There can be more than one implementations of the same BADI definition, and in that case only the active implementations will be executed
    You can activate or de-activate any of the implementations after creation
    Enhancement, interface, and associated classes generated all lie in the appropriate application development namespace
    Business Add-In implementations lie in the respective namespaces of the people who created them
    Changes made to the interface and changes made to the Business-Add-In definition are always incompatible
    -If implementations already exist for a Business-Add-In definition, they are invalidated if you make changes to the interface. This means that their syntax is no longer correct. No statements can be given on the runtime behavior. Avoid making changes to the interface or the Business-Add-In definition after the transport has taken place.
    -If changes to the interface are inevitable, navigate to the Class Builder for all implementing classes and clean up the method includes of these classes (Utilities > Clean up > Method includes)
    Thanks,

  • Creatign a custom badi

    hai freinds i want to create a custom badi, i am doing through se18 and giving zdemo and create but it gives error that create option is possible for enhancment spots only can any one help me how to create the custom badi
    regards
    afzal

    Business Add-Ins
    Overview
    BAdi Definition
    BAdi Implementation
    Calling BAdi
    Filter Dependent Badi
    New SAP enhancement technique
    To accommodate user requirements not available / too specific to be included in the SAP standard Program
    Based on ABAP Objects – It has Interfaces & Methods
    Guaranteed upward compatibility of all Business Add-In interfaces
    Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces
    Though different enhancement technique, BAdi has following distinct features
    -Uses Object oriented approach
    -Two parts - Definition and its Implementation - definition can either be SAP provided or user may also create it
    -no longer assumes a two-system infrastructure (SAP and customers)
    -allows multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like)
    -Can have multiple representations – specific one will be executed based on some criteria (filter)
    -No SSCR registration
    Application Programmer defines an interface for the Business Add-Ins
    Enhancement management takes this interface & generates an adapter class for implementing it, thus opening path for implementation
    As per need, BAdi is suitably implemented
    Developer then creates an instance of the adapter class in the application program and calls the corresponding method at the appropriate time
    Application program simply calls the adapter class methods; it does not know which implementations are actually being called
    Adapter class methods generated by add-in management decide which implementation is to be called
    Look for BAdi in IMG and in component hierarchy
    Create own implementation of the add-in (complete coding for Methods) and activate
    Enhancement's active components are called at runtime.
    BAdi Definition
    To include Business Add-Ins in the program
    - Define an interface for the enhancement in the SAP menu under Tools-> ABAP Workbench -> Utilities -> Business Add-Ins (transaction SE18)
    -Call the interface at the appropriate point in application program
    -Customers can then select the add-in and implement it according to their needs
    Let’s plan a simple task:
    We want to convert strings in your application program is a specific way through Business Add-Ins technique
    As the application developer, first task is to define an enhancement consisting of an interface & a method with a changing parameter to transfer value
    Choose Tools ->ABAP Workbench -> Utilities -> Business Add-Ins (transaction SE18) from the SAP menu
    Create a new Business Add-In containing a maximum of 20 characters and move to Interface Tab
    Name of the interface is proposed by the system but may be changed
    Save and double-click on the interface name to add a method
    System branches to the Class Builder
    Assign a method to the interface (default is Instance Method)
    Add a parameter
    Save and Activate
    Definition screen(SE18) will now contain the method assigned to the interface
    Documentation may be created to describe the intended functionality of this Add-Ins
    BAdi Implementation
    ABAP Workbench ->Utilities -> Business Add-Ins (transaction SE19)
    Find the suitable Business Add-Ins present in system (Use IMG or Component hierarchy)
    Use Add-Ins Documentation to understand functionality & to decide
    Implement the Add-Ins
    -a class is created with the same interface
    -Finalize coding for the method
    Implementations are discrete transport objects and lie within the namespace of the person or organization implementing them
    Work on Simple Badi project – Continued…
    Already structure of the interface defined
    In order to create an implementation for the text conversion example, the add-in (in this case, the interface's method) needs to be filled with logic that converts the string. This logic will be run through every time the add-in is called from the application program
    Choose ABAP Workbench ->Utilities -> Business Add-Ins (transaction SE19)
    Create a new implementation and select the appropriate definition in the dialog box
    Add a short text and move to Interface tab
    Save
    Double-click the method name when the system will take you to the code window for the method
    Insert the desired source code for the implementation between the method if_ex_businessaddin~method. and endmethod. statements automatically provided to you by the system.
    Save and return to the Change Implementation screen
    On Activation, this implementation may be executed from the application program
    Sample code to call Add-In from ABAP Program
    To call static method of a global class directly, class … definition load statement is needed
    Instance of the Adapter class is created and its method is executed
    If enhancement needs to be different based on some parameter (e.g. country-specific or company-code specific), separate implementation of the same Add-In can be created and activated
    At run time, the specific implementation will be execute
    Possible through Filter-Dependent Badi
    How it works
    -Switch on Filter-dependency while defining the interface
    -Select a suitable filter element
    -All methods created in the interface will have filter 'FLT_VAL' as one import parameter
    -Application program provides the filter value to the enhancement method
    -The method then selects the active implementation for that value
    What qualifies as a Filter
    A Data element
    Underlying domain may contain a maximum of 30 characters and must be of Character type
    The data element must
    -Either have a search help with a search help parameter of the same type as the data element and this parameter must serve as both the import and export parameter or
    -the element's domain must have fixed domain values or a value table containing a column with the same type as the data element
    Custom data element with the criteria may also be used
    Implementing a Filter-Dependent Business Add-In
    Implement the Add-In for each relevant filter value
    However, multiple filter values may use the same implementation
    Enter a characteristic filter value for the implementation
    Calling a Filter-Dependent Business Add-In
    Same as before
    Pass the filter value as export parameter to the method
    BAdi – some useful information
    There can be more than one implementations of the same BADI definition, and in that case only the active implementations will be executed
    You can activate or de-activate any of the implementations after creation
    Enhancement, interface, and associated classes generated all lie in the appropriate application development namespace
    Business Add-In implementations lie in the respective namespaces of the people who created them
    Changes made to the interface and changes made to the Business-Add-In definition are always incompatible
    -If implementations already exist for a Business-Add-In definition, they are invalidated if you make changes to the interface. This means that their syntax is no longer correct. No statements can be given on the runtime behavior. Avoid making changes to the interface or the Business-Add-In definition after the transport has taken place.
    -If changes to the interface are inevitable, navigate to the Class Builder for all implementing classes and clean up the method includes of these classes (Utilities > Clean up > Method includes)
    Please give me reward point If it is useful
    Thanks
    Murali Poli

  • BAPI and BADI

    What is a BAPI in abap?
    What is a BADI in abap?
    Difference between these 2?????????
    Thanks in advance.

    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    just refer to the link below
    http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    Example Code
    U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
    U can find these parameters for a particular condition type in table KONV.
    *& Form saveTransactionJOCR
    text
    --> p1 text
    <-- p2 text
    FORM saveTransactionJOCR .
    data: salesdocument like BAPIVBELN-VBELN,
    order_header_inx like bapisdh1x,
    order_header_in like bapisdh1,
    return type standard table of bapiret2 with header line,
    conditions_in type standard table of bapicond with header line,
    conditions_inx type standard table of bapicondx with header line,
    logic_switch like BAPISDLS,
    step_nr like conditions_in-cond_st_no,
    item_nr like conditions_in-itm_number,
    cond_count like conditions_in-cond_count,
    cond_type like conditions_in-cond_type.
    salesdocument = wa_order_information-VBELN.
    LOGIC_SWITCH-COND_HANDL = 'X'.
    order_header_inx-updateflag = 'U'.
    conditions
    clear conditions_in[].
    clear conditions_inx[].
    clear: step_nr,
    item_nr,
    cond_count,
    cond_type.
    step_nr = '710'.
    item_nr = '000000'.
    cond_count = '01'.
    cond_type = 'ZCP2'.
    CONDITIONS_IN-ITM_NUMBER = item_nr.
    conditions_in-cond_st_no = step_nr.
    CONDITIONS_IN-COND_COUNT = cond_count.
    CONDITIONS_IN-COND_TYPE = cond_type.
    CONDITIONS_IN-COND_VALUE = 666.
    CONDITIONS_IN-CURRENCY = 'EUR'.
    append conditions_in.
    CONDITIONS_INX-ITM_NUMBER = item_nr.
    conditions_inx-cond_st_no = step_nr.
    CONDITIONS_INX-COND_COUNT = cond_count.
    CONDITIONS_INX-COND_TYPE = cond_type.
    CONDITIONS_INX-UPDATEFLAG = 'U'.
    CONDITIONS_INX-COND_VALUE = 'X'.
    CONDITIONS_INX-CURRENCY = 'X'.
    append conditions_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = salesdocument
    ORDER_HEADER_IN = order_header_in
    ORDER_HEADER_INX = order_header_inx
    LOGIC_SWITCH = logic_switch
    TABLES
    RETURN = return
    CONDITIONS_IN = conditions_in
    CONDITIONS_INX = conditions_inx
    if return-type ne 'E'.
    commit work and wait.
    endif.
    ENDFORM. " saveTransactionJOCR
    Bdc to Bapi
    The steps to be followed are :
    1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
    [for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
    2. Create a Z program and call the BAPi (same as a Funtion module call).
    2. Now, if you see this BAPi, it has
    -> Importing structures.
    eg: SALESDOCUMENT: this will take the Sales order header data as input.
    -> Tables parameters:
    eg: ORDER_ITEM_IN: this will take the line item data as input.
    Note :
    Only specify fields that should be changed
    Select these fields by entering an X in the checkboxes
    Enter a U in the UPDATEFLAG field
    Always specify key fields when changing the data, including in the checkboxes
    The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
    Maintain quantities and dates in the schedule line data
    Possible UPDATEFLAGS:
    U = change
    D = delete
    I = add
    Example
    1. Delete the whole order
    2. Delete order items
    3. Change the order
    4. Change the configuration
    Notes
    1. Minimum entry:
    You must enter the order number in the SALESDOCUMENT structure.
    You must always enter key fields for changes.
    You must always specify the update indicator in the ORDER_HEADER_INX.
    2. Commit control:
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
    For further details... refer to the Function Module documentation for the BAPi.
    Bapi to VB(Visual Basic)
    Long back I had used the following flow structure to acheive the same.
    Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
    my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
    You need to have com4abap.exe
    If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
    else refer OSS note 419822 for installation of com4abap
    after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
    for setting up com4abap and rfc destination please refer to the documentation for com4abap.
    Invoke NEW DCOM session
    call function 'BEGIN_COM_SESSION'
    exporting
    service_dest = service_dest "(this will be a RFC destination created in SM59)
    importing
    worker_dest = worker_dest
    exceptions
    connect_to_dcom_service_failed = 1
    connect_to_dcom_worker_failed = 2
    others = 3.
    call function 'create_com_instance' destination worker_dest
    exporting
    clsid = g_c_clsid
    typelib = g_c_typelib
    importing
    instid = g_f_oid
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    call function 'com_invoke' destination worker_dest
    exporting
    %instid = g_f_oid
    %method = 'UpdatePDF'
    sntemp = g_v_const_filent
    snsysid = sy-sysid
    snflag = 'N'
    tables
    rssaptable = g_t_pdfdetail1
    %return = g_t_pdfdetail1 "t_test
    exceptions
    communication_failure = 1 message g_f_msg
    system_failure = 2 message g_f_msg
    invalid_instance_id = 3
    others = 4.
    then close the com session , using
    FM delete_com_instance
    FM END_COM_SESSION

  • Function modules

    Guys, Can someone tell me the difference between writing function modules and writing routines and when to use each?  I know how to get to routines screen to write those routines but I have no clue about function modules.  If someone can tell me how to write them or direct me to a document that explains the process will be much appreciated.
    Thanks,
    RG

    hi,
    chk out the links
    Enhancements in SAP BW
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
    Customer Enhancements in SAP NetWeaver BI (Exits, BAdIs and ABAP™ in the SAP NetWeaver BI Back End)
    http://www.sap.com/community/pub/showdetail.epx?itemID=5257
    Ramesh

Maybe you are looking for

  • HELP Macbook heats up!!

    Hi so after my Macbook has been on about 10 min the bottom of it heats up to the point I can't rest it on my lap without a blanket or pillow covering my legs.... It's a late 2008 macbook, I got it in december for x-mas.. any advice? Should I take it

  • How to load the data in DSO

    Hello,          In my BI system ,i have the DSO and InfoCube ,haveing the infopackage Delta and Init..can any one tell me how to load the data from R/3 in to DSO ,when we have two infopackage(one is delta nad other is Init).Please define brifly.

  • Can you backup your iphone during new software download

    Can you back up your iphone5, during the new software download

  • TO CONVERT FROM WINDOWS TO LINUX

    Hi I have developed one project using netbeans, struts, and jdk1.5u3 in windows. Now i want to convert the same to LINUX. What should i Do.??? Please Help!!!!!!! Thanks & Regards GLASS_FISH

  • HT201269 unlock my iPhone 4

    i havw just receive a replacemehnt iphone 4 via my insurance. The phone is locked to my previous service providers. At the time my phone was damaged i had it unlocked by vodaphone. How can i unlock the new iphone 4 i just recived today? Can someone h