Skip to Content
author's profile photo Former Member
Former Member

How to Implement this Badi?

Hi all,

I have a requirement which requires me to Implement the Badi 'DOC_PERSONALIZE_BCS' .

This is a filter dependent Badi.

When I try to Implement this Badi , I am required to give a filter value.

When I give the filter value and try to activate the Badi , I get a message as follows:

"There are already Active Implementations for these Filter types"

I checked and found out that there is already a Standard Implementation for this Badi.

I want my Badi to get activated.

Please tell me how I can activate my Badi for the Filter type.

Kindly reply immediately as this is bit urgent.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 05:21 PM


    I believe that if you make your implementation of the BADI, 'DOC_PERSONALIZE_BCS

    a 'Multiple use' type of BADI you should be OK.

    Read the help on this checkbox for some advice when making aBADI multiple use.

    Hope this helps


    Greg Kern

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 27, 2008 at 05:28 PM

    You can't just change it to multiple use, since SAP especially designed this BAdI to make there is only one active implementation. In some cases it doesn't matter if there are more (for example if you want to do multiple checks), but in this case it probably will give error (inconsistencies or whatever) if there were to be more than one implementation.

    It looks like the standard implementation already uses the same filter. So if this standard implementation doesn't do the trick (whatever that may be) for you, you should deactivate the standard implementation and than activate your implementation. But be careful and make sure this is absolutely necessary and you're not going to lose any functionality when deactivating the standard implementation.

    Good luck.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 05:44 PM

    It looks like the standard implementation already uses the same filter that you are using for your implementation. If this standard implementation does not help you in doing what you wanted to achieve, then you should deactivate the standard implementation and than activate your new implementation. But make sure you dont lose any functionality. So to be on the safer side, copy the code of the standard implementation and put that in your implementation and then add your piece of code.

    Check for any OSS note for deactivating the standard implementation of the BADI. I assume you may need access key to do the same.

    Check the below document for more information on BADI


    Hope this helps. <REMOVED BY MODERATOR>



    Edited by: Alvaro Tejada Galindo on Mar 27, 2008 1:45 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 27, 2008 at 05:57 PM


    1) execute Tcode SE18.

    2) Specify a definition Name : ZBADI_SPFLI

    3) Press create

    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :

    multiple use.

    5) Choose the interface tab

    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.

    7) Dbl clk on interface name to start class builder . specify a method name (name,

    level, desc).

    Method level desc

    Linese;ection instance methos some desc

    8) place the cursor on the method name desc its parameters to define the interface.

    Parameter type refe field desc

    I_carrid import spfli-carrid some

    I_connid import spefi-connid some

    9) save , check and activate…adapter class proposed by system is

    ZCL_IM_IM_LINESEL is genereated.


    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.

    2) Specify aname for implementation ZIM_LINESEL

    3) Specify short desc.

    4) Choose interface tab. System proposes a name fo the implementation class.

    ZCL_IM_IMLINESEL which is already generarted.

    5) Specify short desc for method

    6) Dbl clk on method to insert code..(check the code in “AAA”).

    7) Save , check and activate the code.

    Some useful URL

    Now write a sample program to use this badi method..

    Look for “BBB” sample program.


    data : wa_flights type sflight,

    it_flights type table of sflight.

    format color col_heading.

    write:/ 'Flight info of:', i_carrid, i_connid.

    format color col_normal.

    select * from sflight

    into corresponding fields of table it_flights

    where carrid = i_carrid

    and connid = i_connid.

    loop at it_flights into wa_flights.

    write:/ wa_flights-fldate,


    wa_flights-price currency wa_flights-currency,






    *& Report ZBADI_TEST *

    *& *



    tables: spfli.

    data: wa_spfli type spfli,

    it_spfli type table of spfli with key carrid connid.

    *Initialise the object of the interface.

    data: exit_ref type ref to ZCL_IM_IM_LINESEL,

    exit_ref1 type ref to ZIF_EX_BADISPFLI1.

    selection-screen begin of block b1.

    select-options: s_carr for spfli-carrid.

    selection-screen end of block b1.


    select * from spfli into corresponding fields of table it_spfli

    where carrid in s_carr.


    loop at it_spfli into wa_spfli.

    write:/ wa_spfli-carrid,





    hide: wa_spfli-carrid, wa_spfli-connid.


    at line-selection.

    check not wa_spfli-carrid is initial.

    create object exit_ref.

    exit_ref1 = exit_ref.

    call method exit_ref1->lineselection


    i_carrid = wa_spfli-carrid

    i_connid = wa_spfli-connid.

    clear wa_spfli.

    u can find BADI's in different ways...

    1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..

    2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..

    There are multiple ways of searching for BADI.


    • Finding BADI Using SQL Trace (TCODE-ST05).

    • Finding BADI Using Repository Information System (TCODE- SE84).

    1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.

    Make sure the radio button “In main program” is checked. A list of all the programs with call to the BADI’s will be listed.

    The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter ‘INSTANCE’ will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.

    2. Start transaction ST05 (Performance Analysis).

    Set flag field "Buffer trace"

    Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)

    Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.

    Push the button "Deactivate Trace".

    Push the button "Display Trace".

    The popup screen "Set Restrictions for Displaying Trace" appears.

    Now, filter the trace on Objects:

    • V_EXT_IMP

    • V_EXT_ACT

    Push button "Multiple selections" button behind field Objects

    Fill: V_EXT_IMP and V_EXT_ACT

    All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.


    3. Go to “Maintain Transaction” (TCODE- SE93).

    Enter the Transaction VD02 for which you want to find BADI.

    Click on the Display push buttons.

    Get the Package Name. (Package VS in this case)

    Go to TCode: SE84->Enhancements->Business Add-inns->Definition

    Enter the Package Name and Execute.

    Here you get a list of all the Enhancement BADI’s for the given package MB.

    The simplese way for finding BADI is

    1. chooes Tcode Program & package for that Tcode.

    2. Go to Tcode se18

    3. Press F4

    4. search by package or by program.





    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 10:57 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2008 at 02:54 PM

    Hi all,

    Thanks for all your replies.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.