<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: badi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584762#M863129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Business Add-Ins&lt;/P&gt;&lt;P&gt;Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.&lt;/P&gt;&lt;P&gt;As with customer exits (SMOD/CMOD [Page 40]), two different views are available:&lt;/P&gt;&lt;P&gt;&amp;#149; In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.&lt;/P&gt;&lt;P&gt;&amp;#149; In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.&lt;/P&gt;&lt;P&gt;In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.&lt;/P&gt;&lt;P&gt;SAP guarantees the 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. You do not have to register Business Add-Ins in SSCR.&lt;/P&gt;&lt;P&gt;The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.&lt;/P&gt;&lt;P&gt;In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.&lt;/P&gt;&lt;P&gt;A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINING THE BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) execute Tcode SE18.&lt;/P&gt;&lt;P&gt;2) Specify a definition Name : ZBADI_SPFLI&lt;/P&gt;&lt;P&gt;3) Press create&lt;/P&gt;&lt;P&gt;4) Choose the attribute tab. Specify short desc for badi.. and specify the type : &lt;/P&gt;&lt;P&gt;multiple use.&lt;/P&gt;&lt;P&gt;5) Choose the interface tab&lt;/P&gt;&lt;P&gt;6) Specify interface name: ZIF_EX_BADI_SPFLI and save.&lt;/P&gt;&lt;P&gt;7) Dbl clk on interface name to start class builder . specify a method name (name, &lt;/P&gt;&lt;P&gt;level, desc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method level desc&lt;/P&gt;&lt;P&gt;Linese;ection instance methos some desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; place the cursor on the method name desc its parameters to define the interface.&lt;/P&gt;&lt;P&gt;Parameter type refe field desc&lt;/P&gt;&lt;P&gt;I_carrid import spfli-carrid some&lt;/P&gt;&lt;P&gt;I_connid import spefi-connid some&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9) save , check and activate&amp;#133;adapter class proposed by system is &lt;/P&gt;&lt;P&gt;ZCL_IM_IM_LINESEL is genereated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPLEMENTATION OF BADI DEFINITION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.&lt;/P&gt;&lt;P&gt;2) Specify aname for implementation ZIM_LINESEL&lt;/P&gt;&lt;P&gt;3) Specify short desc.&lt;/P&gt;&lt;P&gt;4) Choose interface tab. System proposes a name fo the implementation class. &lt;/P&gt;&lt;P&gt;ZCL_IM_IMLINESEL which is already generarted.&lt;/P&gt;&lt;P&gt;5) Specify short desc for method&lt;/P&gt;&lt;P&gt;6) Dbl clk on method to insert code..(check the code in &amp;#147;AAA&amp;#148;).&lt;/P&gt;&lt;P&gt;7) Save , check and activate the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some useful URL&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt" target="test_blank"&gt;http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf" target="test_blank"&gt;http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc" target="test_blank"&gt;http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc" target="test_blank"&gt;http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf" target="test_blank"&gt;www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now write a sample program to use this badi method..&lt;/P&gt;&lt;P&gt;Look for &amp;#147;BBB&amp;#148; sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;AAA&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wa_flights type sflight,&lt;/P&gt;&lt;P&gt;it_flights type table of sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format color col_heading.&lt;/P&gt;&lt;P&gt;write:/ 'Flight info of:', i_carrid, i_connid.&lt;/P&gt;&lt;P&gt;format color col_normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight&lt;/P&gt;&lt;P&gt;into corresponding fields of table it_flights&lt;/P&gt;&lt;P&gt;where carrid = i_carrid&lt;/P&gt;&lt;P&gt;and connid = i_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_flights into wa_flights.&lt;/P&gt;&lt;P&gt;write:/ wa_flights-fldate,&lt;/P&gt;&lt;P&gt;wa_flights-planetype,&lt;/P&gt;&lt;P&gt;wa_flights-price currency wa_flights-currency,&lt;/P&gt;&lt;P&gt;wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;wa_flights-seatsocc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;BBB&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report ZBADI_TEST *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZBADI_TEST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_spfli type spfli,&lt;/P&gt;&lt;P&gt;it_spfli type table of spfli with key carrid connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Initialise the object of the interface.&lt;/P&gt;&lt;P&gt;data: exit_ref type ref to ZCL_IM_IM_LINESEL,&lt;/P&gt;&lt;P&gt;exit_ref1 type ref to ZIF_EX_BADISPFLI1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;select-options: s_carr for spfli-carrid.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select * from spfli into corresponding fields of table it_spfli&lt;/P&gt;&lt;P&gt;where carrid in s_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;write:/ wa_spfli-carrid,&lt;/P&gt;&lt;P&gt;wa_spfli-connid,&lt;/P&gt;&lt;P&gt;wa_spfli-cityfrom,&lt;/P&gt;&lt;P&gt;wa_spfli-deptime,&lt;/P&gt;&lt;P&gt;wa_spfli-arrtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hide: wa_spfli-carrid, wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at line-selection.&lt;/P&gt;&lt;P&gt;check not wa_spfli-carrid is initial.&lt;/P&gt;&lt;P&gt;create object exit_ref.&lt;/P&gt;&lt;P&gt;exit_ref1 = exit_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method exit_ref1-&amp;gt;lineselection&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_carrid = wa_spfli-carrid&lt;/P&gt;&lt;P&gt;i_connid = wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_spfli. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;badi finding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can find BADI's in different ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;First go to any transaction-&amp;gt;iN THE menu bar SYSTEM-&amp;gt;STATUS-&amp;gt;Get the program name -&amp;gt;double click-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;Goto SE24-&amp;gt;Give class name as CL_EXITHANDLER-&amp;gt;Display-&amp;gt;double click on get_instance mathod-&amp;gt;Now u will go inside the method-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are multiple ways of searching for BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using CL_EXITHANDLER=&amp;gt;GET_INSTANCE&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using SQL Trace (TCODE-ST05).&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using Repository Information System (TCODE- SE84).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System-&amp;gt;Status. Double click on the program name. Once inside the program search for &amp;#145;CL_EXITHANDLER=&amp;gt;GET_INSTANCE&amp;#146;.&lt;/P&gt;&lt;P&gt;Make sure the radio button &amp;#147;In main program&amp;#148; is checked. A list of all the programs with call to the BADI&amp;#146;s will be listed.&lt;/P&gt;&lt;P&gt;The export parameter &amp;#145;EXIT_NAME&amp;#146; for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter &amp;#145;INSTANCE&amp;#146; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Start transaction ST05 (Performance Analysis).&lt;/P&gt;&lt;P&gt;Set flag field "Buffer trace" &lt;/P&gt;&lt;P&gt;Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)&lt;/P&gt;&lt;P&gt;Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session. &lt;/P&gt;&lt;P&gt;Push the button "Deactivate Trace".&lt;/P&gt;&lt;P&gt;Push the button "Display Trace".&lt;/P&gt;&lt;P&gt;The popup screen "Set Restrictions for Displaying Trace" appears.&lt;/P&gt;&lt;P&gt;Now, filter the trace on Objects: &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_IMP &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_ACT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Push button "Multiple selections" button behind field Objects &lt;/P&gt;&lt;P&gt;Fill: V_EXT_IMP and V_EXT_ACT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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_.&lt;/P&gt;&lt;P&gt;So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Go to &amp;#147;Maintain Transaction&amp;#148; (TCODE- SE93).&lt;/P&gt;&lt;P&gt;Enter the Transaction VD02 for which you want to find BADI.&lt;/P&gt;&lt;P&gt;Click on the Display push buttons.&lt;/P&gt;&lt;P&gt;Get the Package Name. (Package VS in this case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to TCode: SE84-&amp;gt;Enhancements-&amp;gt;Business Add-inns-&amp;gt;Definition&lt;/P&gt;&lt;P&gt;Enter the Package Name and Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you get a list of all the Enhancement BADI&amp;#146;s for the given package MB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simplese way for finding BADI is &lt;/P&gt;&lt;P&gt;1. chooes Tcode Program &amp;amp; package for that Tcode.&lt;/P&gt;&lt;P&gt;2. Go to Tcode se18&lt;/P&gt;&lt;P&gt;3. Press F4&lt;/P&gt;&lt;P&gt;4. search by package or by program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;badi links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/papers/sugi30/SAP.ppt" target="test_blank"&gt;http://support.sas.com/rnd/papers/sugi30/SAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.aol.com/_ht_a/skarkada/sap/" target="test_blank"&gt;http://members.aol.com/_ht_a/skarkada/sap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ct-software.com/reportpool_frame.htm" target="test_blank"&gt;http://www.ct-software.com/reportpool_frame.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saphelp.com/SAP_Technical.htm" target="test_blank"&gt;http://www.saphelp.com/SAP_Technical.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.kabai.com/abaps/q.htm" target="test_blank"&gt;http://www.kabai.com/abaps/q.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.guidancetech.com/people/holland/sap/abap/" target="test_blank"&gt;http://www.guidancetech.com/people/holland/sap/abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/download_abap_programs.htm" target="test_blank"&gt;http://www.planetsap.com/download_abap_programs.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series&lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt" target="test_blank"&gt;http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc" target="test_blank"&gt;http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf" target="test_blank"&gt;http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc" target="test_blank"&gt;http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip" target="test_blank"&gt;http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt" target="test_blank"&gt;http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;sowjanya.b&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2008 09:34:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-31T09:34:38Z</dc:date>
    <item>
      <title>badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584759#M863126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am learner wht to learn abut BADI can any one send me the details. how to fine BADI and how to do enchanements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2008 07:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584759#M863126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-29T07:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584760#M863127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to find relevant badi.&lt;/P&gt;&lt;P&gt;test the program.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZUSEREXIT&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;REPORT  ZUSEREXIT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TABLES : TSTC,&lt;/P&gt;&lt;P&gt;TADIR,&lt;/P&gt;&lt;P&gt;MODSAPT,&lt;/P&gt;&lt;P&gt;MODACT,&lt;/P&gt;&lt;P&gt;TRDIR,&lt;/P&gt;&lt;P&gt;TFDIR,&lt;/P&gt;&lt;P&gt;ENLFDIR,&lt;/P&gt;&lt;P&gt;SXS_ATTRT ,&lt;/P&gt;&lt;P&gt;TSTCT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : FIELD1(30).&lt;/P&gt;&lt;P&gt;DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PARAMETERS : P_TCODE LIKE TSTC-TCODE,&lt;/P&gt;&lt;P&gt;P_PGMNA LIKE TSTC-PGMNA .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA wa_tadir type tadir.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF NOT P_TCODE IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ELSEIF NOT P_PGMNA IS INITIAL.&lt;/P&gt;&lt;P&gt;TSTC-PGMNA = P_PGMNA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TADIR&lt;/P&gt;&lt;P&gt;WHERE PGMID = 'R3TR'&lt;/P&gt;&lt;P&gt;AND OBJECT = 'PROG'&lt;/P&gt;&lt;P&gt;AND OBJ_NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TRDIR&lt;/P&gt;&lt;P&gt;WHERE NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;IF TRDIR-SUBC EQ 'F'.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TFDIR&lt;/P&gt;&lt;P&gt;WHERE PNAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM ENLFDIR&lt;/P&gt;&lt;P&gt;WHERE FUNCNAME = TFDIR-FUNCNAME.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TADIR&lt;/P&gt;&lt;P&gt;WHERE PGMID = 'R3TR'&lt;/P&gt;&lt;P&gt;AND OBJECT = 'FUGR'&lt;/P&gt;&lt;P&gt;AND OBJ_NAME EQ ENLFDIR-AREA.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM TADIR INTO TABLE JTAB&lt;/P&gt;&lt;P&gt;WHERE PGMID = 'R3TR'&lt;/P&gt;&lt;P&gt;AND OBJECT in ('SMOD', 'SXSD')&lt;/P&gt;&lt;P&gt;AND DEVCLASS = V_DEVCLASS.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM TSTCT&lt;/P&gt;&lt;P&gt;WHERE SPRSL EQ SY-LANGU&lt;/P&gt;&lt;P&gt;AND TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;WRITE:/(19) 'Transaction Code - ',&lt;/P&gt;&lt;P&gt;20(20) P_TCODE,&lt;/P&gt;&lt;P&gt;45(50) TSTCT-TTEXT.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;IF NOT JTAB[] IS INITIAL.&lt;/P&gt;&lt;P&gt;WRITE:/(105) SY-ULINE.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_HEADING INTENSIFIED ON.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sorting the internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sort jtab by OBJECT.&lt;/P&gt;&lt;P&gt;data : wf_txt(60) type c,&lt;/P&gt;&lt;P&gt;wf_smod type i ,&lt;/P&gt;&lt;P&gt;wf_badi type i ,&lt;/P&gt;&lt;P&gt;wf_object2(30) type C.&lt;/P&gt;&lt;P&gt;clear : wf_smod, wf_badi , wf_object2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the total SMOD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOOP AT JTAB into wa_tadir.&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_HEADING INTENSIFIED ON.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;2 'Enhancement/ Business Add-in',&lt;/P&gt;&lt;P&gt;41 SY-VLINE ,&lt;/P&gt;&lt;P&gt;42 'Description',&lt;/P&gt;&lt;P&gt;105 SY-VLINE.&lt;/P&gt;&lt;P&gt;WRITE:/(105) SY-ULINE.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;clear wf_txt.&lt;/P&gt;&lt;P&gt;at new object.&lt;/P&gt;&lt;P&gt;if wa_tadir-object = 'SMOD'.&lt;/P&gt;&lt;P&gt;wf_object2 = 'Enhancement' .&lt;/P&gt;&lt;P&gt;elseif wa_tadir-object = 'SXSD'.&lt;/P&gt;&lt;P&gt;wf_object2 = ' Business Add-in'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_GROUP INTENSIFIED ON.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2 wf_object2,&lt;/P&gt;&lt;P&gt;105 SY-VLINE.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;case wa_tadir-object.&lt;/P&gt;&lt;P&gt;when 'SMOD'.&lt;/P&gt;&lt;P&gt;wf_smod = wf_smod + 1.&lt;/P&gt;&lt;P&gt;SELECT SINGLE MODTEXT into wf_txt&lt;/P&gt;&lt;P&gt;FROM MODSAPT&lt;/P&gt;&lt;P&gt;WHERE SPRSL = SY-LANGU&lt;/P&gt;&lt;P&gt;AND NAME = wa_tadir-OBJ_NAME.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NORMAL INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;when 'SXSD'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For BADis&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wf_badi = wf_badi + 1 .&lt;/P&gt;&lt;P&gt;select single TEXT into wf_txt&lt;/P&gt;&lt;P&gt;from SXS_ATTRT&lt;/P&gt;&lt;P&gt;where sprsl = sy-langu&lt;/P&gt;&lt;P&gt;and EXIT_NAME = wa_tadir-OBJ_NAME.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NORMAL INTENSIFIED ON.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;2 wa_tadir-OBJ_NAME hotspot on,&lt;/P&gt;&lt;P&gt;41 SY-VLINE ,&lt;/P&gt;&lt;P&gt;42 wf_txt,&lt;/P&gt;&lt;P&gt;105 SY-VLINE.&lt;/P&gt;&lt;P&gt;AT END OF object.&lt;/P&gt;&lt;P&gt;write : /(105) sy-ULINE.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE:/(105) SY-ULINE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_TOTAL INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WRITE:/ 'No.of Exits:' , wf_smod.&lt;/P&gt;&lt;P&gt;WRITE:/ 'No.of BADis:' , wf_badi.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WRITE:/(105) 'No userexits or BADis exist'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WRITE:/(105) 'Transaction does not exist'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data : wf_object type tadir-object.&lt;/P&gt;&lt;P&gt;clear wf_object.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;GET CURSOR FIELD FIELD1.&lt;/P&gt;&lt;P&gt;CHECK FIELD1(8) EQ 'WA_TADIR'.&lt;/P&gt;&lt;P&gt;read table jtab with key obj_name = sy-lisel+1(20).&lt;/P&gt;&lt;P&gt;move jtab-object to wf_object.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;case wf_object.&lt;/P&gt;&lt;P&gt;when 'SMOD'.&lt;/P&gt;&lt;P&gt;SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;when 'SXSD'.&lt;/P&gt;&lt;P&gt;SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to select appropriate badi, and then you need to find the method in the badi which can be useful for our requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once found the method( set break point and check weather it worthful for you or not), implement it and do your coding .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 10:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584760#M863127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-30T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584761#M863128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can find BADI's in different ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;First go to any transaction-&amp;gt;iN THE menu bar SYSTEM-&amp;gt;STATUS-&amp;gt;Get the program name -&amp;gt;double click-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;Goto SE24-&amp;gt;Give class name as CL_EXITHANDLER-&amp;gt;Display-&amp;gt;double click on get_instance mathod-&amp;gt;Now u will go inside the method-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are multiple ways of searching for BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using CL_EXITHANDLER=&amp;gt;GET_INSTANCE&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using SQL Trace (TCODE-ST05).&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using Repository Information System (TCODE- SE84).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System-&amp;gt;Status. Double click on the program name. Once inside the program search for &amp;#145;CL_EXITHANDLER=&amp;gt;GET_INSTANCE&amp;#146;.&lt;/P&gt;&lt;P&gt;Make sure the radio button &amp;#147;In main program&amp;#148; is checked. A list of all the programs with call to the BADI&amp;#146;s will be listed.&lt;/P&gt;&lt;P&gt;The export parameter &amp;#145;EXIT_NAME&amp;#146; for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter &amp;#145;INSTANCE&amp;#146; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Start transaction ST05 (Performance Analysis).&lt;/P&gt;&lt;P&gt;Set flag field "Buffer trace" &lt;/P&gt;&lt;P&gt;Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)&lt;/P&gt;&lt;P&gt;Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session. &lt;/P&gt;&lt;P&gt;Push the button "Deactivate Trace".&lt;/P&gt;&lt;P&gt;Push the button "Display Trace".&lt;/P&gt;&lt;P&gt;The popup screen "Set Restrictions for Displaying Trace" appears.&lt;/P&gt;&lt;P&gt;Now, filter the trace on Objects: &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_IMP &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_ACT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Push button "Multiple selections" button behind field Objects &lt;/P&gt;&lt;P&gt;Fill: V_EXT_IMP and V_EXT_ACT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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_.&lt;/P&gt;&lt;P&gt;So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Go to &amp;#147;Maintain Transaction&amp;#148; (TCODE- SE93).&lt;/P&gt;&lt;P&gt;Enter the Transaction VD02 for which you want to find BADI.&lt;/P&gt;&lt;P&gt;Click on the Display push buttons.&lt;/P&gt;&lt;P&gt;Get the Package Name. (Package VS in this case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to TCode: SE84-&amp;gt;Enhancements-&amp;gt;Business Add-inns-&amp;gt;Definition&lt;/P&gt;&lt;P&gt;Enter the Package Name and Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you get a list of all the Enhancement BADI&amp;#146;s for the given package MB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simplese way for finding BADI is &lt;/P&gt;&lt;P&gt;1. chooes Tcode Program &amp;amp; package for that Tcode.&lt;/P&gt;&lt;P&gt;2. Go to Tcode se18&lt;/P&gt;&lt;P&gt;3. Press F4&lt;/P&gt;&lt;P&gt;4. search by package or by program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BADI Material&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Refer following theard for material and example&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=10209784&amp;amp;messageID=4929119" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=10209784&amp;amp;messageID=4929119&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 12:42:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584761#M863128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-30T12:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584762#M863129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Business Add-Ins&lt;/P&gt;&lt;P&gt;Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.&lt;/P&gt;&lt;P&gt;As with customer exits (SMOD/CMOD [Page 40]), two different views are available:&lt;/P&gt;&lt;P&gt;&amp;#149; In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.&lt;/P&gt;&lt;P&gt;&amp;#149; In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.&lt;/P&gt;&lt;P&gt;In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.&lt;/P&gt;&lt;P&gt;SAP guarantees the 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. You do not have to register Business Add-Ins in SSCR.&lt;/P&gt;&lt;P&gt;The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.&lt;/P&gt;&lt;P&gt;In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.&lt;/P&gt;&lt;P&gt;A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINING THE BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) execute Tcode SE18.&lt;/P&gt;&lt;P&gt;2) Specify a definition Name : ZBADI_SPFLI&lt;/P&gt;&lt;P&gt;3) Press create&lt;/P&gt;&lt;P&gt;4) Choose the attribute tab. Specify short desc for badi.. and specify the type : &lt;/P&gt;&lt;P&gt;multiple use.&lt;/P&gt;&lt;P&gt;5) Choose the interface tab&lt;/P&gt;&lt;P&gt;6) Specify interface name: ZIF_EX_BADI_SPFLI and save.&lt;/P&gt;&lt;P&gt;7) Dbl clk on interface name to start class builder . specify a method name (name, &lt;/P&gt;&lt;P&gt;level, desc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method level desc&lt;/P&gt;&lt;P&gt;Linese;ection instance methos some desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; place the cursor on the method name desc its parameters to define the interface.&lt;/P&gt;&lt;P&gt;Parameter type refe field desc&lt;/P&gt;&lt;P&gt;I_carrid import spfli-carrid some&lt;/P&gt;&lt;P&gt;I_connid import spefi-connid some&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9) save , check and activate&amp;#133;adapter class proposed by system is &lt;/P&gt;&lt;P&gt;ZCL_IM_IM_LINESEL is genereated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPLEMENTATION OF BADI DEFINITION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.&lt;/P&gt;&lt;P&gt;2) Specify aname for implementation ZIM_LINESEL&lt;/P&gt;&lt;P&gt;3) Specify short desc.&lt;/P&gt;&lt;P&gt;4) Choose interface tab. System proposes a name fo the implementation class. &lt;/P&gt;&lt;P&gt;ZCL_IM_IMLINESEL which is already generarted.&lt;/P&gt;&lt;P&gt;5) Specify short desc for method&lt;/P&gt;&lt;P&gt;6) Dbl clk on method to insert code..(check the code in &amp;#147;AAA&amp;#148;).&lt;/P&gt;&lt;P&gt;7) Save , check and activate the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some useful URL&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt" target="test_blank"&gt;http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf" target="test_blank"&gt;http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc" target="test_blank"&gt;http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc" target="test_blank"&gt;http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf" target="test_blank"&gt;www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now write a sample program to use this badi method..&lt;/P&gt;&lt;P&gt;Look for &amp;#147;BBB&amp;#148; sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;AAA&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wa_flights type sflight,&lt;/P&gt;&lt;P&gt;it_flights type table of sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format color col_heading.&lt;/P&gt;&lt;P&gt;write:/ 'Flight info of:', i_carrid, i_connid.&lt;/P&gt;&lt;P&gt;format color col_normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight&lt;/P&gt;&lt;P&gt;into corresponding fields of table it_flights&lt;/P&gt;&lt;P&gt;where carrid = i_carrid&lt;/P&gt;&lt;P&gt;and connid = i_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_flights into wa_flights.&lt;/P&gt;&lt;P&gt;write:/ wa_flights-fldate,&lt;/P&gt;&lt;P&gt;wa_flights-planetype,&lt;/P&gt;&lt;P&gt;wa_flights-price currency wa_flights-currency,&lt;/P&gt;&lt;P&gt;wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;wa_flights-seatsocc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;BBB&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report ZBADI_TEST *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZBADI_TEST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_spfli type spfli,&lt;/P&gt;&lt;P&gt;it_spfli type table of spfli with key carrid connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Initialise the object of the interface.&lt;/P&gt;&lt;P&gt;data: exit_ref type ref to ZCL_IM_IM_LINESEL,&lt;/P&gt;&lt;P&gt;exit_ref1 type ref to ZIF_EX_BADISPFLI1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;select-options: s_carr for spfli-carrid.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select * from spfli into corresponding fields of table it_spfli&lt;/P&gt;&lt;P&gt;where carrid in s_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;write:/ wa_spfli-carrid,&lt;/P&gt;&lt;P&gt;wa_spfli-connid,&lt;/P&gt;&lt;P&gt;wa_spfli-cityfrom,&lt;/P&gt;&lt;P&gt;wa_spfli-deptime,&lt;/P&gt;&lt;P&gt;wa_spfli-arrtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hide: wa_spfli-carrid, wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at line-selection.&lt;/P&gt;&lt;P&gt;check not wa_spfli-carrid is initial.&lt;/P&gt;&lt;P&gt;create object exit_ref.&lt;/P&gt;&lt;P&gt;exit_ref1 = exit_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method exit_ref1-&amp;gt;lineselection&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_carrid = wa_spfli-carrid&lt;/P&gt;&lt;P&gt;i_connid = wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_spfli. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;badi finding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can find BADI's in different ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;First go to any transaction-&amp;gt;iN THE menu bar SYSTEM-&amp;gt;STATUS-&amp;gt;Get the program name -&amp;gt;double click-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;Goto SE24-&amp;gt;Give class name as CL_EXITHANDLER-&amp;gt;Display-&amp;gt;double click on get_instance mathod-&amp;gt;Now u will go inside the method-&amp;gt;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..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are multiple ways of searching for BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using CL_EXITHANDLER=&amp;gt;GET_INSTANCE&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using SQL Trace (TCODE-ST05).&lt;/P&gt;&lt;P&gt;&amp;#149; Finding BADI Using Repository Information System (TCODE- SE84).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System-&amp;gt;Status. Double click on the program name. Once inside the program search for &amp;#145;CL_EXITHANDLER=&amp;gt;GET_INSTANCE&amp;#146;.&lt;/P&gt;&lt;P&gt;Make sure the radio button &amp;#147;In main program&amp;#148; is checked. A list of all the programs with call to the BADI&amp;#146;s will be listed.&lt;/P&gt;&lt;P&gt;The export parameter &amp;#145;EXIT_NAME&amp;#146; for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter &amp;#145;INSTANCE&amp;#146; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Start transaction ST05 (Performance Analysis).&lt;/P&gt;&lt;P&gt;Set flag field "Buffer trace" &lt;/P&gt;&lt;P&gt;Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)&lt;/P&gt;&lt;P&gt;Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session. &lt;/P&gt;&lt;P&gt;Push the button "Deactivate Trace".&lt;/P&gt;&lt;P&gt;Push the button "Display Trace".&lt;/P&gt;&lt;P&gt;The popup screen "Set Restrictions for Displaying Trace" appears.&lt;/P&gt;&lt;P&gt;Now, filter the trace on Objects: &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_IMP &lt;/P&gt;&lt;P&gt;&amp;#149; V_EXT_ACT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Push button "Multiple selections" button behind field Objects &lt;/P&gt;&lt;P&gt;Fill: V_EXT_IMP and V_EXT_ACT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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_.&lt;/P&gt;&lt;P&gt;So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Go to &amp;#147;Maintain Transaction&amp;#148; (TCODE- SE93).&lt;/P&gt;&lt;P&gt;Enter the Transaction VD02 for which you want to find BADI.&lt;/P&gt;&lt;P&gt;Click on the Display push buttons.&lt;/P&gt;&lt;P&gt;Get the Package Name. (Package VS in this case)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to TCode: SE84-&amp;gt;Enhancements-&amp;gt;Business Add-inns-&amp;gt;Definition&lt;/P&gt;&lt;P&gt;Enter the Package Name and Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you get a list of all the Enhancement BADI&amp;#146;s for the given package MB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simplese way for finding BADI is &lt;/P&gt;&lt;P&gt;1. chooes Tcode Program &amp;amp; package for that Tcode.&lt;/P&gt;&lt;P&gt;2. Go to Tcode se18&lt;/P&gt;&lt;P&gt;3. Press F4&lt;/P&gt;&lt;P&gt;4. search by package or by program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;badi links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/papers/sugi30/SAP.ppt" target="test_blank"&gt;http://support.sas.com/rnd/papers/sugi30/SAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.aol.com/_ht_a/skarkada/sap/" target="test_blank"&gt;http://members.aol.com/_ht_a/skarkada/sap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ct-software.com/reportpool_frame.htm" target="test_blank"&gt;http://www.ct-software.com/reportpool_frame.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saphelp.com/SAP_Technical.htm" target="test_blank"&gt;http://www.saphelp.com/SAP_Technical.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.kabai.com/abaps/q.htm" target="test_blank"&gt;http://www.kabai.com/abaps/q.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.guidancetech.com/people/holland/sap/abap/" target="test_blank"&gt;http://www.guidancetech.com/people/holland/sap/abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/download_abap_programs.htm" target="test_blank"&gt;http://www.planetsap.com/download_abap_programs.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series&lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt" target="test_blank"&gt;http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc" target="test_blank"&gt;http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf" target="test_blank"&gt;http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc" target="test_blank"&gt;http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip" target="test_blank"&gt;http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt" target="test_blank"&gt;http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;sowjanya.b&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 09:34:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584762#M863129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T09:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584763#M863130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Z_BADI_TEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;test call Badi from standard abap. (Only from rel 6.40 and above)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do the following&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1) define the Badi (SE18). For Abap call test uncheck multiple use&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and filter boxes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;2) Implement the badi (SE19). Add any methods here in the implemntation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;3) activate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;4) define the standard class exithandler to the abap. This class is the "Badi caller&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;"&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;5) define an exit variable referring to your Badi Implementation interface&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this interface will normally be something like ZIF_EX***************&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You will see this in SE18/SE19.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;6) Instantiate your instance of the badi (method call get_instance)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;7) Now call any method(s) in the Badi.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class cl_exithandler definition load. "Declaration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data exit type ref to zif_ex__jimbotest. "Interface reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data yes type c.&lt;/P&gt;&lt;P&gt;data: v_knvv type knvv. "Used in Fmod call in Badi methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;yes = ' '.&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;parameters: r1 radiobutton group rad1,&lt;/P&gt;&lt;P&gt;r2 radiobutton group rad1,&lt;/P&gt;&lt;P&gt;r3 radiobutton group rad1.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_kunnr type knvv-kunnr.&lt;/P&gt;&lt;P&gt;select single * into v_knvv&lt;/P&gt;&lt;P&gt;from knvv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where kunnr eq p_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;export v_knvv to memory id 'CUST6A'. "Save customer data for the function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method cl_exithandler=&amp;gt;get_instance "Factory method call&lt;/P&gt;&lt;P&gt;exporting "Method&lt;/P&gt;&lt;P&gt;exit_name = 'Z_JIMBOTEST' "Name of your BADI&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;null_instance_accepted = yes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;changing instance = exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not exit is initial.&lt;/P&gt;&lt;P&gt;break-point 1.&lt;/P&gt;&lt;P&gt;if r1 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method exit-&amp;gt;dispord . "Add-In call&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;changing testparm1 = word.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if r2 = 'X'.&lt;/P&gt;&lt;P&gt;call method exit-&amp;gt;dispfakt.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if r3 = 'X'.&lt;/P&gt;&lt;P&gt;call method exit-&amp;gt;dispmat.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the badi methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;/P&gt;&lt;P&gt;method ZIF_EX__JIMBOTEST~DISPORD.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_DISPLAY_CUST'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;method ZIF_EX__JIMBOTEST~DISPFAKT.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_DISPLAY_FAKT'.&lt;/P&gt;&lt;P&gt;endmethod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) &lt;/P&gt;&lt;P&gt;method ZIF_EX__JIMBOTEST~DISPMAT.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_DISPLAY_CUST'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Copy via SE 41 the status SALV_STANDARD from standard SAP program SALV_DEMO_METADATA into the main program where you've created the 3 function modules below (SAP______TOP) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global Data for the three function modules I'm calling&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION-POOL Z_BADI_KNVV. "MESSAGE-ID ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include &amp;lt;color&amp;gt;.&lt;/P&gt;&lt;P&gt;include &amp;lt;icon&amp;gt;.&lt;/P&gt;&lt;P&gt;include &amp;lt;symbol&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: zknvv.&lt;/P&gt;&lt;P&gt;data: v_zzkvgr6 TYPE KNVV-ZZKVGR6.&lt;/P&gt;&lt;P&gt;data: choice1 type c.&lt;/P&gt;&lt;P&gt;data: choice2 type c.&lt;/P&gt;&lt;P&gt;data: choice3 type c.&lt;/P&gt;&lt;P&gt;data: choice4 Type c.&lt;/P&gt;&lt;P&gt;data: ok-code(5) type c.&lt;/P&gt;&lt;P&gt;data: answer type string.&lt;/P&gt;&lt;P&gt;data: value1 type SPOP-VARVALUE1.&lt;/P&gt;&lt;P&gt;data: answer1 type string.&lt;/P&gt;&lt;P&gt;tables: vbak, vbap, vakpa, vbrk, vrkpa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lr_functions type ref to cl_salv_functions_list.&lt;/P&gt;&lt;P&gt;constants: gc_true type sap_bool value 'X',&lt;/P&gt;&lt;P&gt;gc_false type sap_bool value space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add for colour displays&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ls_color type lvc_s_colo.&lt;/P&gt;&lt;P&gt;DATA : LV_SALV_COLUMNS_TABLE TYPE REF TO CL_SALV_COLUMNS_TABLE.&lt;/P&gt;&lt;P&gt;data: lr_columns type ref to cl_salv_columns_table,&lt;/P&gt;&lt;P&gt;lr_column type ref to cl_salv_column_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr_table TYPE REF TO cl_salv_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: z_datum type sy-datum.&lt;/P&gt;&lt;P&gt;data: v_knvv type knvv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of s_vbak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vkorg type vakpa-vkorg,&lt;/P&gt;&lt;P&gt;vkgrp type vakpa-vkgrp,&lt;/P&gt;&lt;P&gt;vtweg type vakpa-vtweg,&lt;/P&gt;&lt;P&gt;spart type vakpa-spart,&lt;/P&gt;&lt;P&gt;auart type vakpa-auart,&lt;/P&gt;&lt;P&gt;vbeln type vakpa-vbeln,&lt;/P&gt;&lt;P&gt;bstnk type vakpa-bstnk,&lt;/P&gt;&lt;P&gt;audat type vakpa-audat,&lt;/P&gt;&lt;P&gt;netwr type vbak-netwr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of s_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of s_vbrk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbeln type vrkpa-vbeln,&lt;/P&gt;&lt;P&gt;vkorg type vrkpa-vkorg,&lt;/P&gt;&lt;P&gt;fkart type vrkpa-fkart,&lt;/P&gt;&lt;P&gt;fkdat type vrkpa-fkdat,&lt;/P&gt;&lt;P&gt;netwr type vbrk-netwr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of s_vbrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of s_vbap,&lt;/P&gt;&lt;P&gt;matnr type vbap-matnr,&lt;/P&gt;&lt;P&gt;arktx type vbap-arktx,&lt;/P&gt;&lt;P&gt;netwr type vbap-netwr,&lt;/P&gt;&lt;P&gt;kwmeng type vbap-kwmeng,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of s_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_vbap like table of s_vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_vbak&lt;/P&gt;&lt;P&gt;like table of s_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_vbrk&lt;/P&gt;&lt;P&gt;like table of s_vbrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: s_name type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gr_selections type ref to cl_salv_selections.&lt;/P&gt;&lt;P&gt;data: gr_events type ref to cl_salv_events_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source code of the function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_DISPLAY_CUST.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale interface:&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;s_name = 'S_VBAK'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;orders in last 6 months&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;z_datum = sy-datum - 180.&lt;/P&gt;&lt;P&gt;import v_knvv from memory id 'CUST6A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;vkorg a&lt;/SUB&gt;audat a&lt;SUB&gt;vkgrp a&lt;/SUB&gt;vtweg a&lt;SUB&gt;spart a&lt;/SUB&gt;auart a&lt;SUB&gt;bstnk a&lt;/SUB&gt;vbeln b~netwr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_vbak&lt;/P&gt;&lt;P&gt;up to 100 rows&lt;/P&gt;&lt;P&gt;from ( vakpa as a&lt;/P&gt;&lt;P&gt;inner join vbak as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;vbeln eq b&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where a~kunde eq v_knvv-kunnr&lt;/P&gt;&lt;P&gt;and a~parvw eq 'AG'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and a~vkorg eq 'EN01'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and a~trvog eq '0'&lt;/P&gt;&lt;P&gt;and a~audat gt z_datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort t_vbak by audat descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: gt_hyperlink type standard table of g_type_s_hyperlink.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Instead of if_salv_c_bool_sap=&amp;gt;false, you can pass the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value if_salv_c_bool_sap=&amp;gt;true to this method to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;see your ALV as a list.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display data in Grid / List&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_salv_table=&amp;gt;factory&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;list_display = if_salv_c_bool_sap=&amp;gt;false&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;r_salv_table = gr_table&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;t_table = t_vbak.&lt;/P&gt;&lt;P&gt;CATCH cx_salv_msg.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 0.&lt;/P&gt;&lt;P&gt;ls_color-inv = 0.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'VBELN' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 1.&lt;/P&gt;&lt;P&gt;ls_color-inv = 1.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_short_text( 'Short' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_medium_text( 'Medium' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_long_text( 'Net Value' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'URL' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr_table-&amp;gt;set_screen_status( pfstatus = 'SALV_STANDARD'&lt;/P&gt;&lt;P&gt;report = sy-repid&lt;/P&gt;&lt;P&gt;set_functions = gr_table-&amp;gt;c_functions_all ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this statement actually does the display.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_table-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_DISPLAY_FAKT.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale interface:&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name = 'S_VBRK'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invoices in last 6 months&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;z_datum = sy-datum - 180.&lt;/P&gt;&lt;P&gt;import v_knvv from memory id 'CUST6A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;vbeln a&lt;/SUB&gt;fkart a&lt;SUB&gt;vkorg a&lt;/SUB&gt;fkdat&lt;/P&gt;&lt;P&gt;b~netwr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_vbrk&lt;/P&gt;&lt;P&gt;up to 100 rows&lt;/P&gt;&lt;P&gt;from ( vrkpa as a&lt;/P&gt;&lt;P&gt;inner join vbrk as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;vbeln eq b&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where a~kunde eq v_knvv-kunnr&lt;/P&gt;&lt;P&gt;and a~parvw eq 'RG'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and a~vkorg eq 'EN01'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and a~vbtyp eq 'M'&lt;/P&gt;&lt;P&gt;and a~fkdat gt z_datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort t_vbrk by fkdat descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data: gt_hyperlink type standard table of g_type_s_hyperlink.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Instead of if_salv_c_bool_sap=&amp;gt;false, you can pass the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;value if_salv_c_bool_sap=&amp;gt;true to this method to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;see your ALV as a list.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display data in Grid / List&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_salv_table=&amp;gt;factory&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;list_display = if_salv_c_bool_sap=&amp;gt;false&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;r_salv_table = gr_table&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;t_table = t_vbrk.&lt;/P&gt;&lt;P&gt;CATCH cx_salv_msg.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 0.&lt;/P&gt;&lt;P&gt;ls_color-inv = 0.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'VBELN' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 1.&lt;/P&gt;&lt;P&gt;ls_color-inv = 1.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;*LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_short_text( 'Short' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_medium_text( 'Medium' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_long_text( 'Net Value' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'URL' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr_table-&amp;gt;set_screen_status( pfstatus = 'SALV_STANDARD'&lt;/P&gt;&lt;P&gt;report = sy-repid&lt;/P&gt;&lt;P&gt;set_functions = gr_table-&amp;gt;c_functions_all ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this statement actually does the display.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_table-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_DISPLAY_MATERIAL.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale interface:&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_name = 'S_VBAP'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invoicesrs in last 6 months&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;z_datum = sy-datum - 180.&lt;/P&gt;&lt;P&gt;import v_knvv from memory id 'CUST6A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;vbeln b&lt;/SUB&gt;matnr b&lt;SUB&gt;arktx b&lt;/SUB&gt;netwr b~kwmeng&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into corresponding fields of table t_vbap&lt;/P&gt;&lt;P&gt;up to 100 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from ( vakpa as a&lt;/P&gt;&lt;P&gt;inner join vbap as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;vbeln eq b&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where a~kunde eq v_knvv-kunnr&lt;/P&gt;&lt;P&gt;and a~parvw eq 'AG'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and a~vkorg eq 'EN01'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and a~trvog eq '0'&lt;/P&gt;&lt;P&gt;and a~audat gt z_datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;CALL METHOD cl_salv_table=&amp;gt;factory&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;list_display = if_salv_c_bool_sap=&amp;gt;false&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;r_salv_table = gr_table&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;t_table = t_vbap.&lt;/P&gt;&lt;P&gt;CATCH cx_salv_msg.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 0.&lt;/P&gt;&lt;P&gt;ls_color-inv = 0.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'ARKTX' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_color-col = col_negative.&lt;/P&gt;&lt;P&gt;ls_color-int = 1.&lt;/P&gt;&lt;P&gt;ls_color-inv = 1.&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_color( ls_color ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LV_SALV_COLUMNS_TABLE = gr_table-&amp;gt;get_columns( ).&lt;/P&gt;&lt;P&gt;lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'NETWR' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_short_text( 'Short' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_medium_text( 'Medium' ).&lt;/P&gt;&lt;P&gt;lr_column-&amp;gt;set_long_text( 'Net Value' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*lr_column ?= LV_SALV_COLUMNS_TABLE-&amp;gt;get_column( 'URL' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;catch cx_salv_not_found.&lt;/P&gt;&lt;P&gt;endtry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr_table-&amp;gt;set_screen_status( pfstatus = 'SALV_STANDARD'&lt;/P&gt;&lt;P&gt;report = sy-repid&lt;/P&gt;&lt;P&gt;set_functions = gr_table-&amp;gt;c_functions_all ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this statement actually does the display.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gr_table-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;sowjanya.b&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 09:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3584763#M863130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-31T09:36:33Z</dc:date>
    </item>
  </channel>
</rss>

