Can anyone explain me step by step procedure for creating badi?

hi all,,
Can anyone explain me about badi with step by step procedure with an example like trsn code mm01, xd01 etc.
And what is the significance of badi?
regs
hari

Hi
Business Add-Ins
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.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
• 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.
• 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.
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.
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.
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.
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.
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
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.
u can find BADI's in different ways...
1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..
2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
There are multiple ways of searching for BADI.
• Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
• Finding BADI Using SQL Trace (TCODE-ST05).
• Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.
Make sure the radio button “In main program” is checked. A list of all the programs with call to the BADI’s will be listed.
The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter ‘INSTANCE’ will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
• V_EXT_IMP
• V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to “Maintain Transaction” (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADI’s for the given package MB.
The simplese way for finding BADI is
1. chooes Tcode Program & package for that Tcode.
2. Go to Tcode se18
3. Press F4
4. search by package or by program.
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/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
http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
sample code for Purchase requisition
BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
Definition Name: ME_REQ_POSTED
Interface Name : IF_EX_ME_REQ_POSTED
Implementing Class: ZCL_IM_PUR_REQ
Method :            POSTED
METHOD if_ex_me_req_posted~posted .
  DATA : v_mtart TYPE mtart.
  DATA l_s_eban TYPE ueban.
  LOOP AT im_eban INTO l_s_eban.
    IF l_s_eban-estkz NE 'B'.
      CLEAR v_mtart.
      SELECT SINGLE  mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
      IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
        MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
      ENDIF.
    ENDIF.
    IF  l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
      IF l_s_eban-knttp NE 'A'.
        IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' )  AND l_s_eban-matnr EQ
space.
          MESSAGE e000(zm_msg) WITH 'You cannot create' 'a PR without material number'.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDMETHOD.
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Can anyone explain why safari is going wrong for me on the iMac but works on the ipad?

    Safari on my iMac desktop has started freezing when blue band is halfway along an address from my bookmarked list. Once it has stuck I can double click on any other address and it will not  open or change the top address bar. If I actually delete the first address manually then I cannot even put a question in the window nor will it accept any bookmarked address. Can any one help?

    1. Power off the router. Unplug it from the wall. Wait for few minuets.
        Power off the router. Wait a while.
        Connect the router back to to the wall.
        Power the router back on. Wait  until all lights are letup properly. It will take a while.
        Restart the computer.
    Start up in Safe Mode
    http://support.apple.com/kb/PH11212
    Empty Caches
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        Develop menu will appear in the Safari menu bar.
        Click Develop and select "Empty Caches" from the dropdown.

  • Ting to my itunes store can anyone explain the issue?

    I have a problem connecting to my itunes store but my internet connection works just fine. can anyone explain this issue ?

    Thank you for using the Apple Support Communities
    From what I understand is that the device will show up in iTunes but it will not allow you to synchronize media over to the device even after you reset the device. When you say you reset the device, do you mean you restored the device in iTunes? What error message you are getting when attempting to synchronize media?

  • Can anyone explain steps in  ASAP Methodology

    Can anyone explain steps in  ASAP Methodology

    Hi,
    What is ASAP?
    ASAP: Accelerated Systems Application and Products in Data Processing
    All implementation projects have the the following phases:
    Scoping - What is to be implemented i.e. which submodules are to be implemented some clients may not require credit management for example. Look at the project scope document carefully it will tell you what SAP sub-modules in SAP you should be prepared for. Usually the sales people along with project manager do it.
    As is - Here you understand the existing business processes of the client . Your BPOcollect all the ISO-documentation (if client is ISO certified), reports and forms at this stage and you analyse how and when the reports/forms are generated, where the data is coming from. You also do a Level -2 training for your BPO so he is made aware of all the required transactions in SAP.
    Once this is over BPO can start learning with the consultants help more about SAP. This is crucial because if you miss out any transactions the BPO may forget about some of his Business processes which may come up later. It is a good practice to ask the BPO to make flow charts to explain business processes.
    To-Be - Parallely you map these processes to SAP. Processes that you are not sure of as to whether they are present in SAP or not you try to do a configuration of those processes, and along with the BPO(Business process owner he is the clients employee who knows about the clients business processes probably a middle management guy, ther can more than one), BPO involvement is required as he may be able to tell you his requirements better. Once you do the business modelling you
    will also be made aware of the gaps between as-is and to-be , here decisons have to be made as to wether a ABAP development/system modification is required or not and so on. Involve the BPO as much as possible and document everything it is good practice do not be lazy about it.
    Business blueprint: Here the as-is and to-be and gap analysis is explained. This is the document that you will be using to do your configuration in the realization phase.
    Realization phase: Here you do the configuration in the development server (there are three clients -development,quality, production). You also decide on the master data format, so that BPO can go collect the master data. You also gove ABAP specifications for forms, reports etc, system modifications etc. Unit testing: Your BPOs and a few key users sit down and test your configuration in your module only. It is good to test the BDCs that you need for uploading data at this stage so you have more realistic data and your BDCs are tested.
    Integration testing:
    Once all modules unit testing is over then the configuration is trasported to the Quality server, where testing for all the modules is done by BPOs and end user, this is to check if any problems are there in integration between various modules. Once all is okay from the QA server config is transported to the production server.
    Go live preparation
    Data uploading: The collected master data is checked and the uploaded into production server(sever and client I have used interchangeably). Now you are ready for go live i.e. users can now use the production server.
    Read ASAP methodology for more details you will understand better.
    ASAP methodoligy means nothing but standard process for implementation of SAP,  It consists of 5 phases.
    1. Project preperation - consists of identifying team members and developing strategy as how to go.
    2. Business Blue print - consists of identifying the client current process, reqeirement and how SAP provides solution.
        Consists of detailed documentaion
    3. Realization -The purpose of this phase is to implement all the business and process requirements based on the
        Business Blueprint.
    4  Final Preparation - The purpose of this phase is to complete testing, end-user training,
    5 Go Live and Support
    All the functinal consultatns need good rapo with Abapers. right from uploading of legacy data, devoloping customised reports, BDC's, Forms etc, here functinal consultatns need to give guidence as to get the requried data for reports and all.. like the table name, fields etc
    Reward If Helpfull,
    Naresh

  • Can anyone let me know the step by step procedure for creating userexits?

    Hi all,
    can anyone let me know the step by step procedure for creating user exits? for any transaction code like mm01 or vd01. If you have any docs send it across to my email id : [email protected]
    thanxs in advance
    hari

    Hi,
    *& Report  ZEXITFINDER
    *report  zexitfinder.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    Find Repository Objects for transaction code
    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 = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    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:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    look in txn CMOD or SMOD, check enhancement 0VRF0001. It uses function module EXIT_SAPL0VRF_001. It is used to manipulate route determination for SD.
    Here is the code
        DATA: ls_xvbpa LIKE xvbpa,
              lf_aland LIKE tvst-aland,
              lf_azone LIKE tvst-azone,
              lf_lland LIKE trolz-lland,
              lf_lzone LIKE trolz-lzone,
              ls_vbadr LIKE vbadr,
              ls_xvbap LIKE xvbap,
              ls_tvst LIKE tvst,
              lv_route LIKE trolz-route.
        LOOP AT xvbap INTO ls_xvbap.
          IF NOT ls_xvbap-vstel IS INITIAL.
            SELECT SINGLE * FROM tvst
              INTO ls_tvst
             WHERE vstel EQ ls_xvbap-vstel.
            IF sy-subrc = 0.
              lf_aland = ls_tvst-aland.
              lf_azone = ls_tvst-azone.
            ENDIF.
          ENDIF.
          READ TABLE xvbpa INTO ls_xvbpa WITH KEY vbeln = ls_xvbap-vbeln
                                                  posnr = ls_xvbap-posnr
                                                  parvw = 'Q1'.
          IF sy-subrc = 0.
            CALL FUNCTION 'SD_ADDRESS_GET'
              EXPORTING
                fif_address_number      = ls_xvbpa-adrnr
              IMPORTING
                fes_address             = ls_vbadr
              EXCEPTIONS
                address_not_found       = 1
                address_type_not_exists = 2
                no_person_number        = 3
                OTHERS                  = 4.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
              lf_lland = ls_vbadr-land1.
              lf_lzone = ls_vbadr-lzone.
            ENDIF.
          ENDIF.
          CALL FUNCTION 'SD_ROUTE_DETERMINATION'
            EXPORTING
              i_aland             = lf_aland
              i_azone             = lf_azone
              i_lland             = lf_lland
              i_lzone             = lf_lzone
            IMPORTING
              e_route             = lv_route
            EXCEPTIONS
              no_route_found      = 1
              departure_error     = 2
              destination_error   = 3
              invalid_generic_key = 4
              customer_exit_error = 5
              OTHERS              = 6.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            ls_xvbap-route = lv_route.
            MODIFY xvbap FROM ls_xvbap TRANSPORTING route.
          ENDIF.
        ENDLOOP.
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    <b>Reward points</b>
    Regards

  • Can anyone plz tell me the steps for performance tuning.

    hello friends
    what is performance tuning?
    can anyone plz tell me the steps for performance tuning.

    Hi Kishore, this will help u.
    Following are the different tools provided by SAP for performance analysis of an ABAP object
    Run time analysis transaction SE30
    This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05
    The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Need for performance tuning
    In this world of SAP programming, ABAP is the universal language. In most of the projects, the focus is on getting a team of ABAP programmers as soon as possible, handing over the technical specifications to them and asking them to churn out the ABAP programs within the “given deadlines”.
    Often due to this pressure of schedules and deliveries, the main focus of making a efficient program takes a back seat. An efficient ABAP program is one which delivers the required output to the user in a finite time as per the complexity of the program, rather than hearing the comment “I put the program to run, have my lunch and come back to check the results”.
    Leaving aside the hyperbole, a performance optimized ABAP program saves the time of the end user, thus increasing the productivity of the user, and in turn keeping the user and the management happy.
    This tutorial focuses on presenting various performance tuning tips and tricks to make the ABAP programs efficient in doing their work. This tutorial also assumes that the reader is well versed in all the concepts and syntax of ABAP programming.
    Use of selection criteria
    Instead of selecting all the data and doing the processing during the selection, it is advisable to restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code.
    Not recommended
    Select * from zflight.
    Check : zflight-airln = ‘LF’ and zflight-fligh = ‘BW222’.
    Endselect.
    Recommended
    Select * from zflight where airln = ‘LF’ and fligh = ‘222’.
    Endselect.
    One more point to be noted here is of the select *. Often this is a lazy coding practice. When a programmer gives select * even if one or two fields are to be selected, this can significantly slow the program and put unnecessary load on the entire system. When the application server sends this request to the database server, and the database server has to pass on the entire structure for each row back to the application server. This consumes both CPU and networking resources, especially for large structures.
    Thus it is advisable to select only those fields that are needed, so that the database server passes only a small amount of data back.
    Also it is advisable to avoid selecting the data fields into local variables as this also puts unnecessary load on the server. Instead attempt must be made to select the fields into an internal table.
    Use of aggregate functions
    Use the already provided aggregate functions, instead of finding out the minimum/maximum values using ABAP code.
    Not recommended
    Maxnu = 0.
    Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
    Check zflight-fligh > maxnu.
    Maxnu = zflight-fligh.
    Endselect.
    Recommended
    Select max( fligh ) from zflight into maxnu where airln = ‘LF’ and cntry = ‘IN’.
    The other aggregate functions that can be used are min (to find the minimum value), avg (to find the average of a Data interval), sum (to add up a data interval) and count (counting the lines in a data selection).
    Use of Views instead of base tables
    Many times ABAP programmers deal with base tables and nested selects. Instead it is always advisable to see whether there is any view provided by SAP on those base tables, so that the data can be filtered out directly, rather than specially coding for it.
    Not recommended
    Select * from zcntry where cntry like ‘IN%’.
    Select single * from zflight where cntry = zcntry-cntry and airln = ‘LF’.
    Endselect.
    Recommended
    Select * from zcnfl where cntry like ‘IN%’ and airln = ‘LF’.
    Endselect.
    Check this links
    http://www.sapdevelopment.co.uk/perform/performhome.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/afbad390-0201-0010-daa4-9ef0168d41b6
    kindly reward if found helpful.
    cheers,
    Hema.

  • I'm trying to delete multiple pix in iPhoto that i stupidly made duplicates of without knowing, I've tried going into the applications folder and using image capture but i think I've missed a step , can anyone send the correct info / steps pls thanks

    I'm trying to delete multiple pix in iPhoto that i stupidly made duplicates of without knowing, I've tried going into the applications folder and using image capture but i think I've missed a step , can anyone send the correct info / steps pls thanks

    again image capture is not involved with deleting photos from iPhoto in any way ever
    the paid version of iPhoto Library Manager is very good for finding duplicates as is Duplicate Annihilator
    And I have no idea who told you this - or what it means - but re-read both of my opening statements
    I was told I could delete multpiles thru image capture by transferring my iPhoto library etc
    LN

  • Can anyone explain me the procedure and initial settings to do sto for schedule lines?

    can anyone explain me the procedure and initial settings to do sto for schedule lines?
    Create a STO with new doc type for material M1 to ship from plant 1 to plant 2 with qty as 100. On pressing enter you should be able to see schedule lines in delivery schedule tab. In schedule line you should see the Material availability date, GI date, loading date etc.
    can anyone give the answer for this question..

    Hi Megha,
    Please find below links for Config STO with schedule lines.
    http://dhavalatsap.blogspot.sg/p/configuration-of-plant-to-plant-sto.html
    https://scn.sap.com/thread/1260375
    Thanks,
    Bala.

  • Pretty basic this, but I'm a total beginner.  Can anyone tell me (in simple steps!) how I burn a movie I bought in iMovies onto a DVD?  After I stick the DVD in, what happens then?  Sorry about the unsophisticated question.  Thanks.

    Pretty basic this, but I'm a beginner.  Can anyone tell me (in simple steps!) how I burn a movie I bought in imovies onto a DVD?  After I stick the DVD in, what happens then?  Do I have to be in my itunes library first?  Sorry about the unsophisticated question.  Thanks!

    Hello Jackie! (My brother lives in Brussels!)
    You may find these helpful:
    iMovie tutorials:
    http://www.apple.com/ilife/tutorials/#imovie
    and also this:
    http://www.kenstone.net/fcp_homepage/imovie_09_stone.html
    A good guide to iDVD 7 can be found here:
    http://www.kenstone.net/fcp_homepage/idvd_07_stone.html
    Apple's tutorial on iDVD 07/08 is here:
    http://manuals.info.apple.com/en/idvd_08_getting_started.pdf

  • Can anyone explain what a condition type means in pricing.

    Hi,
    Can anyone explain what a condition type means in pricing. And how to create condition type and how it effects Pricing conditions.
    As I am new to this area. Detailed explanation is highly appreciated.
    Thanks a lot,
    Rasheed

    Hello Rasheed,
    Below mentioned are the few important things related to pricing.
    - You first define Condition Tables .
    - Define Access Sequence and assign condition tables to it.
    - Define Condition Type and assign Access Sequence to it.
    - Now define Pricing Procedure and assign Condition Type to it.
    - Now you define Pricing Procedure Determination using Sales Org, Distribution    Channel ,Division,Document  Pricing Procedure and Customer Pricing Procedure which are the key fields.
    The above steps can be done in SPRO.
    -Now maintain the Condition Records(for eg:For the specific material what is the cost or for a specific customer what is the cost of the specific material etc) using Txn:VK11.
    - Once you maintain the Condition Records , you can reflect the same values in Condition Type in SPRO.
    Hope this information is helpful for you to relate Condition Type in Pricing,
    Please reward with points if this information is helpful for you.
    Regards,
    Shanthala.

  • Can anyone explain the integration of sd and mm with fico

    Hi all,
    Can anyone explain with an scenario how fico integrates with sd and mm.
    thanxs
    regds
    hari

    the following organisation units are to be set up to integrate SD with FI.
    1. Sales organisation
    2. Plant
    3. Storage location (under material management)
    4. Shipping point
    5. Distribution Channel
    6. Division.
    In addition u can also create sales office, sales group but it is optional.
    In order to integrate, follow the following steps:
    1. Assign sales organisation to co code.
    2. Assign plant to company code.
    3. Assign distribution channel, division to sales organisation
    4. Determine sales area (it is a combination of sales organisation, distribution channel and division)
    5. Assign SO - Distribution channel - Plant
    6. Assign sales area to credit control area.
    7. Assign shipping point to plant (under logistics execution).
    After defining and assigning the organisation units, u can view the properly integrated structure under Tcode EC01.
    Having created the above SD organisation units, there are only a few more to create for FI-MM integration.
    1. Purchasing organisation.
    2. Valuation level ( generally plant)
    3. Location (optional and need to be created only when required by client)
    On creating the above,
    1. Assign Purchasing org to co code.
    2. Assign purchasing orgn to plant
    3. Assign business area to plant / valuation area ( in this state the business area against your plant).
    Hope this solves your query.
    Assign points if useful.

  • Can anyone explain how the LO data source flows from ECC to BI up to cubes?

    Dear all,
    Can anyone explain step by step (HOW THE DATA FLOWS)....By taking 2LIS_11_VAHDR  from SD , starting from Activate Data source in ECC  to Info Cube in BI7.0. Please this will be helpful -
    Thanks for the advance answers...
    Edited by: harishk.225 on Dec 23, 2011 9:56 AM

    Hi Harish,
    First go to RSA5 in ECC  select your datasource 2LIS_11_VAHDR and activate it.
    After activatin check in RSA6 whether the datasoure activated properly or not.
    Then log on  to BI sytem Select datasource and click on replicate.
    Then Create Infocube infopackage ,Transformation, DTP ...entire flow. But dont schedule it because there is no data in SETUP Tables.For full load first we need to run statistical set up , so that data should come to SETUP Table.
    Now go to ECC  enter T.CODE OLI7BW to filled up the SETUP Table  for datasource 2LIS_11_VAHDR.
    It will ask  you for Run Name etc give the run name and time limit and execute it.
    If you get some error then first delete the SETUP Table by using Transaction Code LBWG.
    In LBWG it will ask you for applicatiion number , give 11 i.e for sales datasourc and execute it.
    Data will get deleted from SETUP Table. To check data is deleted or not  in SET UP Tabe go to database table MC11VA0HDRSETUP. Always remember the name of SETUP Table will be Extract Structure followed by SETUP.
    EX : If extract structure name is MC11VA0HDR then name of the SETUP Table will MC11VA0HDRSETUP.
    If data gets deleted then again go to 0LI7BW and run the Statistical Setup then agan check in MC1VAOHDRSETUP table contains data or not.
    Then trigger the Infopackage and DTP in BI.  Above steps was for full load.
    Now to Load deltas follow below steps.
    First Create INIT at BI side which enable delta at ECC Side.
    Then go to ECC and execute T.CODE LBWE.
    LBWE is LO Cockpit Work Bench. There we have folowng functions 1.Maintan Datasource. 2.Maintain Extract Structure. 3. Job  Control.  4.Delta Type 5.. Activate/deactivate.
    If you want to add any new field to your datasource then to to Maintain Extract Strucutere remeber before adding or modififying datasource first we should deactivate datasource by using 5th function  Activate/Deactivate.
    Then select DELTA TYPE in delta type we have four types of delta. 1. Delta Queue (RSA7) 2. Queued Delta (LBWQ)
    3. Unserialized (SM13) , 4. Seriaized (SM13)
    If you select Delta queue then deltas drectly come to RSAT.
    if you select Queued Delta  deltas goes to LBWQ then you have perform V3 job by using Job Control  function to move data from LBWQ to RSA7. Remeber to BI  data  always goes from RSA7 only.
    If you select Unserealized then delta goes to SM13 again you have to perorm V3 Job to move deltas in RSA7.
    Serialize update is not in used in Lo-cockpit.
    There is a differerence between  DELTA QUEUE , QUEUED DELTA, UNSERIALIZE UPDATE. Pls find the differences on net.
    Then select your delta type and create deltas dtp in BI and start loading .
    Hope this help you.
    In RSA7 we have two tables delta and repeat delta, to know the functionality of this please search for the documents on  net.
    Regards,
    Asim

  • Can anyone explain me "  How to debug updaterules?"

    Can anyone explain me "  How to debug updaterules?"

    Hi ALI,
    Transfer rules and Update rules are the main areas within a BW system where the BW professional can transform your transaction system data into the required format for what ever InfoObject / InfoProvider is being updated.
    Quite often when ABAP is used as part of your transfer and update rules there is a need to debug the code to ensure you don’t introduce any problems into your production environment.
    When data is loaded into a BW system the a background process is used. This means you can not run the data load in debug mode as you would most other programs. What you need to do is run the load program in Simulation mode.
    The first step to take is set a breakpoint in you coded Update/Transfer rule. This can be achieved by:
    •     Setting a breakpoint within the generated program once the rule has been activated.
    •     Locate the code manually during your debug session and setting a break-point.
    •     Hard code a breakpoint in the rule as shown below:
    o     if sy-uname = 'MYUSERID'.
    &#61607;     break.
    o     endif.
    My preferred method is the first option. I try not to hard code breakpoints (second option) as I sometimes forget to remove the code once I have finished debugging and the third option takes I find take too long.
    To set a break-point in the activated code you have to find the activated program and then search for your code that you want to debug. Follow these 4 steps (Update Rule):
    1, View the code for the Update Rule.
    2, Locate the code that you want to debug and remember some content that will identify the code that you need to debug.
    3, Come back out of the code and activate your Update rule. Once activated, select “Display Activated program from the Extra’s menu.
    4, Search for the code that you located in step 2 and set the break-point.
    Once your beak-point has been set you then need to run the update/transfer rule in simulation mode. To achieve this you must have already loaded data into the PSA. Follow these steps:
    1, Navigate to the PSA under the Monitoring section with transaction RSA1. Find the PSA Request that you want to debug and select the ‘Simulate/Cancel update’ option from the right mouse click menu.
    2, The screen will then show the details tab of the InfoPackage Monitor for the specific request. Right-click on a selected Data-Packet and select Simulate.
    3, Select the appropriate ‘Activate Debugging’ option for your rule (Update/transfer). Select the radio button to determine the number of records that you want to process in you debugging session and select the ‘Perform Simulation’ button.
    4, Select the Data Packets, Number of Records and then the continue button.
    5, The update process will start and your screen will show the debug window. Press ‘F8’ to run through your program. It will then stop at the breakpoint you set earlier.
    Regards]
    Anil

  • Can anyone Explain me the difference between Batch Input, Direct  input met

    Can anyone Explain me the difference between Batch Input Method and Direct Input Method.

    hi
    good
    Direct input method                     Batch Input Method
    1) We cannot send the fields   | 1) We can send fields as per 
       according to our requirement|    requirement.
    2) validations are done based
    2) validations are done based
       on pre-defined function
    on applications.
       modules
    Batch Input Session:
    - It is a sequence of transactions, which is generated when user run a particular program. 
    - It contains the accounting documents that are to be created. The SAP system stores these transactions until you decide to process them online. 
    - It does not update transaction figures until the session has been processed.  Using this technique, you can transfer large amounts of data to the SAP system in a short time.
    Three processing modes of executing Batch Input Session :-
    (1) Run Visibly : You can correct faulty transactions online & work step-by-step through  the transactions not yet executed. 
    (2) Display Errors only : You can correct faulty transactions online.   Transactions not yet executed, but without error, run in the background.
    (3) Run in Background : Recommended by SAP.                          
    thanks
    mrutyun^

  • Can anyone explain with senairio for formula variables with replacement  pa

    can anyone explain with senairio for formula variables with replacement  path?

    See the below link
    An Example for Replacement path
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Document Count using Replacement path
    I've explained the steps in this thread.
    Query formula-Counter???
    Example for Replacement Path: Characteristic Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
    Variable Replacement Example
    http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
    Formula Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/content.htm
    Regs
    Gopi
    Assign points if it helps

Maybe you are looking for

  • ICloud Control Panel 2.1 will not install on Windows 7 x64

    iCloud Control Panel 2.1 will not install on Windows 7 x64. If I try the to run the install from the Apple Software Updater it the iCloud 2.1 crashes and I get a message that suggests I do a download only  and they run it locally. I do that and the i

  • No video tab in adobe media encoder cs4

    Hi, I'd like to change the bit-rate when I export, but I have no video tab in adobe media encoder cs4 v4.2 http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=105647 explains how to change bit-rates but it unfortunately doesn't help me. A

  • Firefox keeps freezing then crashing. I reset but it is still happening

    I will open a new tab and go to a website. It will stall and I will get message saying there is a problem with a script on the page or a plug-in or a message saying that Firefox is running out of memory. It takes a long time to work through and somet

  • When downloading software update, ipad restarts

    I tried to update to 6.1 and my ipad went into recovery mode.  When I try to reconnect to Itunes and attempt to download and restore the Ipad, the Ipad itself turns off and on several times during the download, corrupting the download.  The download

  • Converting from Int/Double to Wording Format

    Hi, Does anyone has any sample program to convert double values into wording (this functionality is used to convert currency value) up to Trillion value. For eg: 1000.90 One thousand And Ninety Cents I have written a program which can accept up to 1