Where can I find the BADI

Hi Gurus,
i am new to concept of BADI. Can any one present application/Use of BADI with an example . Can anyone tell me in which table or under which Tcode can I find the list of abailable BADI's ?
Regards,
NewAbaper

Hi Abaper user,
This will give the clear idea about the badi.
Go through this info.
just run this report u get badi
REPORT ZNEGI16 .
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE,
P_PGMNA LIKE TSTC-PGMNA .
DATA wa_tadir type tadir.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'PROG'
AND OBJ_NAME = TSTC-PGMNA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM TRDIR
WHERE NAME = TSTC-PGMNA.
IF TRDIR-SUBC EQ 'F'.
SELECT SINGLE * FROM TFDIR
WHERE PNAME = TSTC-PGMNA.
SELECT SINGLE * FROM ENLFDIR
WHERE FUNCNAME = TFDIR-FUNCNAME.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'FUGR'
AND OBJ_NAME EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
SELECT * FROM TADIR INTO TABLE JTAB
WHERE PGMID = 'R3TR'
AND OBJECT in ('SMOD', 'SXSD')
AND DEVCLASS = V_DEVCLASS.
SELECT SINGLE * FROM TSTCT
WHERE SPRSL EQ SY-LANGU
AND TCODE EQ P_TCODE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) P_TCODE,
45(50) TSTCT-TTEXT.
SKIP.
IF NOT JTAB[] IS INITIAL.
WRITE:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.
Get the total SMOD.
LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.
endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 wf_object2,
105 SY-VLINE.
endat.
case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
when 'SXSD'.
For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
endcase.
WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
data : wf_object type tadir-object.
clear wf_object.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.
case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
DEFINING THE BADI
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.
IMPLEMENTATION OF BADI DEFINITION
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
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for “BBB” sample program.
“AAA”
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-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
“BBB”
*& Report ZBADI_TEST *
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.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli. 
Rewards somw points if it is helpful,
P.Nag
Rgds,

Similar Messages

  • How to install all the drivers for the MacBook with Windows 7 or 8 without the disk from OSX Lion? Where can I find the drivers?

    Guys, a have one big problem..My customer brought me a macbook with windows 7 installed to do a format and reinstallation, but she is no longer the OSX Lion, and do not know how to install the sound drivers, "touchpad", among other drivers, how to solve this? Where can I find the drivers? The MacBook is now with Windows 8 installed.

    Sorry my bad english..
    See is meant. The MacBook has already come for me with Windows 7 installed, checked that it does not have another partition with OSX Lion installed, do not know how the person who did the maintenance before I managed to remove the partition with the Lion, so I can not create a disk or access boot camp because there is no partition Lion and don't own the DVDs of OSX Lion, you understand me?
    There is a boot camp Windows executable? Where do I find, since I poked around and found nothing on ...
    The sound driver is installed, but not working ... and the rest are missing there also, the trackpad also does not work correctly, the right button does not work ... My experience with mac is low, it may be that you do not know how it works correctly the trackpad

  • HT3669 I have an imac running OS10.6.8 and an Apple laserwriter 16/600PS.  Is it possible to connect these directly without networking?  Where can I find the printer driver?

    I have an imac running OS10.6.8 and an Apple laserwriter 16/600PS.  Is it possible to connect these directly without networking?  Where can I find the printer driver?

    It turned out that WD is the big bad guy in this game.
    According the data rescue company where I asked for an inspection, both of the drives had their reader head loose. And in the one, which was my already-in-use disk its even damaged the platters... xxxxx
    So its time to pay bunch of money to recover, and take a walk to wd service to bang on the desk.
    Also note - it may be somehow related to intellispeed technology - since macs not really friendly with wd-s built-in solutions.
    On the other hand, with WD GP 1Tb there is no problems at all for ages.
    thanks guys, thread is closed

  • Where can I find the serial numbers of the defective Seagate 1T hard drives?

    Where can I find the serial numbers of the defective Seagate 1T hard drives that were in iMacs?
    I tried Seagate site.
    Not the iMac serial #, I know about the recall program. We are looking at a refurbished (not Apple) iMac & it has a Seagate 1T HD,  naturally, we want to know if it is one of the bad ones.
    Thanks for your help.
    Sorry for the large font, I have vision problems.

    Apple icon on the menubar->About this Mac->more info->Hardware->Serial ATA. This is what's on mine:
    ST31000528AS:
      Capacity:          1 TB (1,000,204,886,016 bytes)
      Model:          ST31000528AS                           
      Revision:          AP2E   
      Serial Number:                      9VPFJ89K

  • Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache of sent text?

    Fire Fox sent not all the data in text form. Reached only piece of information. Where can I find the cache sent the text?
    For example, I posted an article on a news site, but found that only a small part of my article was posted.

    I'm not sure whether Firefox saved that information. There is a chance that it is in the session history file, especially if you haven't closed that tab yet. To check that:
    Open your currently active Firefox settings folder (AKA your Firefox profile folder) using
    Help > Troubleshooting Information > "Show Folder" button
    Find all files starting with the name sessionstore and copy them to a safe working location (e.g., your documents folder). In order to read a .js file, it is useful to rename it to a .txt file. Or you could drag it to Wordpad or your favorite word processing software.
    The script will look somewhat like gibberish, but if you search for a word in your article that doesn't normally appear in web pages, you may be able to find your data.
    Any luck?
    For the future, you might want to consider this add-on, although I don't know how long it saves data after you submit a form: [https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-recovery/].

  • HT201272 Where can I find the app password saver by yonglin wang.  i wanted to restore my iphone and i had purchased this app and it is not anywhere in my purchases to reload.  Why is it not on my list of purchases?

    Where can I find the app "password Saver" by yonglin wang?  while updating my iphone the app was dropped for some reason.  I went to reload from my purchased apps and it is not available.  The history shows my purchase but I can not find the app to reload.  I've lost some critical info and need to retreive if possible.  Any suggestions?

    You tried what ? If the app is no longer available in the store (can you find it in the main part of the store ?) for re-downloading then you would need to have a copy of it somewhere e.g. on your computer's iTunes, on a backup of your downloads.

  • On installation of Firefox 4 beta, it tells me that it won't run on my Mac. When I go to system requirements, it takes me to a page for Firefox3.6 requirements. Where can I find the requirements for the beta?

    The link to system requirements for Firefox 4 beta takes you to a page that gives you the requirements for Firefox 3.6 instead. I assume that the requirements for the beta are different as I can't seem to install the beta on my Macs. Where can I find the beta system requirements?

    I never expected Mozilla to neglect the users of Apple's PowerPC (PPC) computers, while still supporting much older operating environments such as Windows XP. So, I should just throw away a $6,000 system, which is still fast and functional, and contribute masses of heavy metals to land-fills because…?
    I'm hurt and confused after supporting Firefox for many years — installing and using it not only on my own computers but on most of my customers' computers. Now I have to tell my customers with PPC Macs they can't have a secure cross-platform browsing experience from Mozilla. They'll have to learn to use some other browser, or buy a new computer.
    If one doesn't buy a new computer every year, one doesn't deserve Firefox 4. This is sort of sounding more like a Microsoft™© doctrine. (But wait, I can still have Firefox 4 on a ''SERIOUSLY CRAPPY WINDBLOWS XP pile of rubbish?!'') Please open your eyes Mozilla. This just doesn't make sense.

  • Where can I find the Start up disk and how can I delete file from it.

    where can I find the Start up disk on theMac Book Air?
    How can I delete files from it?

    The startup disk is the internal SSD in your MBA.  You may delete files by draging the file  to Trash (or clicking on them and then execute COMMAND+Delete).  Then empty Trash.
    Ciao.

  • HT1657 I rented a movie on Itunes last night and I watched half of it before falling asleep. Today I tried to open the movie and watch the last half but I cannot find it. It has been less than 24 hours since I rented it. Where can I find the movie?

    I rented a movie on Itunes last night and I watched half of it before falling asleep. Today I tried to open the movie and watch the last half but I cannot find it. It has been less than 24 hours since I rented it. Where can I find the movie?

    I found my answer in another Thread and it worked... so for anyone who needs it, here it is:
    https://discussions.apple.com/message/19134562#19134562
    Had the same problem and spoke with Apple Support. They had me reset the System Management Controller:
    Shut down the computer. With the computer off, on the left hand side of the keyboard press shift+control+option along with the power button simultaneously and release. Wait 5-10 seconds and restart the computer.
    This solved my problem and I was immediately able to purchase, download, and play an HD movie from iTunes w/o any error message.

  • Where can I find the no-no list?

    As I am learning more and more about app development, it seems a lot of time can be wasted if you don't follow the rules Apple has set forth. I find post here and there about what not to do, such as using private API's, and tried searching in the Dev Center for something. As I learn I want to learn the, your app has more chance of not being rejected way, where can I find the "no-no" list Apple has?

    The obvious document would be the App Store Review Guidelines for iOS and OSX.
    iOS: https://developer.apple.com/app-store/review/guidelines/
    Mac (OSX): https://developer.apple.com/app-store/review/guidelines/mac/
    Note that iOS apps can only be distributed via the App Store while OSX apps can be distributed directly by the developer.
    Creating a non-App Store app in OSX has several advantages and disadvantages:
    The App Store handles a number of practical issues for you: like setting up a download page and processing payments. It also (supposedly) gives you access to a larger customer base and is the "default" location for getting apps that Apple pushes new users to. The App Store is also more convenient when re-downloading apps, safer and more convenient as users don't have to keep track of activation codes for purchased apps. 
    You don't need to sandbox your app, this is helpful for certain apps that need to access data from other apps or needed to call other apps e.g. via AppleScript.
    You can use private APIs, although this is generally not recommended as these classes are not documented and may change/disappear between OS releases. But poking around in private APIs and other internals may sometimes be the only way to access certain information or to get certain features.
    Not being a App Store app will also mean that you can't use certain APIs - I think that iCloud is one of these.

  • I need to go back to Firefox 3.5-3.6 because 90% of my extension do not work. Where can I find the download to Firefox 3.5-3.6? Thank you for the link.

    I need to go back to Firefox 3.5-3.6 because 90% of my extension do not work. Where can I find the download to Firefox 3.5-3.6? Thank you for the link.

    You are a "life saver". Thank you very much.

  • When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    Welcome to Apple Support Communities
    All the storage in "Backups" is taken up by local snapshots, which are made automatically in all MacBooks, MacBooks Pro and MacBooks Air with OS X Lion or newer and Time Machine turned on.
    See > http://pondini.org/TM/30.html I recommend you to leave them there, because they will be removed automatically. However, if you want, you can disable or remove them manually if you want, even if there's no reason to do this. Have a look at the link above for more information

  • How do I install OS 10.7 NOT 10.7.5 on a mac running Snow Leopard 6.8  i.e. where can I find the original install app for Lion OS 10.7.0?

    I'm running 10.6.8 Snow Leopard fine on my MacPro1,1, Dual-Core Intel Xeon, 2.66 GHz  Mac, but I need to install Lion 10.7.0 to run a program I need.How do I install OS 10.7 NOT 10.7.5, because I get this message when I try to install 10.7.5, which I've downloaded:"This update requires Mac OS X version 10.7." on a mac running Snow Leopard 10.6.8, So i need to install the original 10.7.0 over the 10.6.8  i.e. where can I find the original install app for Lion OS 10.7.0? The original Lion 10.7. is not avaialable for purchase from the App store or anywhere,  even C-Net . Where can I find it to purchase?
    Also it seems I cannot install Mountain Lion over 10.6.8 as advertised. When I go to purchase I get this message: "We could not complete your purchase. OS X Mountain Lion is not compatible with this computer."   I think my computer can handle it (specs above) Are there any workarounds to this?

    If you're getting a "This update requires Mac OS X version 10.7" message, than you have the updater and not the full installer. Go to your Purchases section of the Mac App Store and you should see the full version there. But it may be 10.7.5, though in my system is shows as being from 2011 which would appear to be the original version.
    As to Mountain Lion, that's supported only on the Early 2008 Mac Pro or newer.
    Regards.

  • Where can we find the new iPod Touch 2.0 software to download it?

    I am in the United States in Northern Ca..
    It is Friday early Morning after 12 and after 1, I was wondering if anyone knows if the New iPod Touch software 2.0 is or will be ready soon for download or do we all have to wait till 8 in the morning to download the new 2.0 iPod Touch software?
    Where can we find the new Software at the Apple web site to downlod it? I looked everywhere on the apple web site trying to find a place to download it, does anyone know??
    I have updated the to the new version of iTunes 7.7..
    In the iTunes where I sync my iPod Touch where in the summary section it says "check for Update", next to it, it says "iTunes will automatically check for an update again on 7/15/08", I also hit the back up button and it tells me that 1.1.4 is the current Version, do I have to wait till the 15th for that update??
    I was reading somewhere on the apple web site that in order to update to 2.0 I have to restore my iPod Touch and have a backup, is this just for the iPhone to restore and create a backup? if not then how do I create a 2nd back up?
    Thanks,
    Mrs. Trisha Foster

    the update is ready on the servers but is just waiting to be pushed through to itunes. I am in australia and I contacted apple technical support, that's what they told me. Don't restore your ipod, just wait and when you connect and click on update, it will update your ipod and there will also be an icon on the home page of the itunes store. We are all waiting in anticipation.

  • Where can I find the Users Manual for the DROID TURBO?

    Where can I find the Users Manual for the DROID TURBO?

    https://motorola-global-portal.custhelp.com/app/product_page/faqs/p/30,6720,9277/session/L3RpbWUvMTQxNTI0NTY1Ny9zaWQvc0xvbk1JNm0%3D#/how_do_i

Maybe you are looking for

  • Is it a Bug in ORACLE 8i????

    I am using Oracle 8.1.7(Japanese) on Win2k professional (Japanese) and developing a multilingual application. * I have some columns of NVARCHAR2 datatype. * NLS_Lang entry of registry is right now NA. * Database procedures When i use insert or any ot

  • Enhancement of component ERP_H with a custom field in the Web UI

    Hi, I'm facing an error when enhancing the component ERP_H with a custom field in the web UI. I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note 1224179): I´ve done a enhacement on ER

  • SECOND QUESTION - HAS ANYONE  GOT ELEMENTS EDITOR NOT WORKING - ON WINDOWS 8.1?

    I Get message -  when i try to open elements 12 editor... a problem caused program to stop working correctly. Windows will close program and notify if a solution is available -- no response after 2 weeks - anyone help please? john reid

  • Robohelp Server 7.0 vs Robohelp  Desktop version

    hi there, We have to write help files for our various products. What are the major difference in server and desktop version. Precisely, i am looking for anwers of : 1. can we create independent (does not look for robohelp server to get data) executab

  • Apply policy from VB 6.0 using webservices?

    Hi All, Our requirement is to call Adobe methods from VB 6.0 to apply policy, i have the .wsdl file of the service, using which i tried generating VB project to generate VB DLL with the help of tools Pocket Soap / wsdl.exe (for command line). but i a