Regarding BADI's and Transaction

Hi All,
I would like to know, how to find the BADI for a particular  transaction ?
Thanks and Regards
Mayank

hi,
execute  this program, it will give allexits and badi's avilable for a transaction.
REPORT  YMS_USEREXITBADITEST  .
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.
  ENDCASE.
reward points if hlpful.

Similar Messages

  • Regarding BADI , INVOICE_UPDATE ( MIRO transaction )

    Hi All,
    In Miro transaction, I need to do some manipulationwith  the amount field ( WRBTR ) from the line items of the invoice.
    I have found the BADI 'INVOICE_UPDATE' and method for this is 'CHANGE_AT_SAVE'. I can see all the line items entered on the miro screen into the the internal table TI_RSEG_NEW.
    However in the method it does not allow me to write the code to change the TI_RSEG_NEW table.
    Please help me out in achieveing this requirment.
    -Sanjay

    Hai.
    check this.
    User exit in the invoice
    USEREXIT_NUMBER_RANGE (module pool SAPLV60A, program RV60AFZZ)
    The internal set of numbers used in the standard is given in the table of kind of invoice and can be changed in this user exit. This user exit is called only when putting on the invoice.
    USEREXIT_ACCOUNT_PREP_KOMKCV (module pool SAPLV60A, program RV60AFZZ)
    In this user exit additional fields for the account identification are taken up in the communication structure KOMKCV (head fields), which is not intended in the standard.
    USEREXIT_ACCOUNT_PREP_KOMPCV (module pool SAPLV60A)
    In this user exit additional fields for the account identification in the communication structure become KOMPCV (position fields) aufenommen, which is not intended in the standard.
    USEREXIT_NUMBER_RANGE_INV_DATE (module pool SAPLV60A, program RV60AFZC)
    Dependent on the set of numbers over the table TVFKD the invoice date is set (country-specific requirement from Italy).
    During the use of this user exit the user exit USEREXIT_NUMBER_RANGE is automatically inactively switched.
    USEREXIT_FILL_VBRK_VBRP (module pool SAPLV60A, program RV60AFZC)
    This user exit is called only when putting on the invoice. It is used, in order to supply the head and the position of the invoice which can be provided with deviating or additional data.
    USEREXIT_PRINT_ITEM (module pool SAPLV61A, program RV61AFZB)
    Printing the position line of an invoice can be supplemented or changed.
    USEREXIT_PRINT_HEAD (module pool SAPLV61A, program RV61AFZB)
    Printing the headline of an invoice can be supplemented or changed.
    User exit in the program RV60AFZD
    A short description of the user exits are contained in the program:
    o USEREXIT_RELI_XVBPAK_AVBPAK
    o USEREXIT_NEWROLE_XVBPAK_AVBPAK
    o USEREXIT_NEWROLE_XVBPAP_AVBPAK
    USEREXIT_FILL_VBRK_VBRP (module pool SAPLV60A, program RV60AFZC
    Use RV60AFZZ Include
    regards.
    sowjanya.b

  • Regarding java xmlmanager and transactions

    xmlmanager has a prepare function that takes in an xmltransaction as a parameter and returns a xmlqueryexpression. if i prepare a query expression object with the prepare function and an xmltransaction object, can i safely reuse that xmlqueryexpression object with a different xmltransaction object?
    thanks.

    I think that's OK but the xmlqueryexpression object should be reused AFTER the expression object has been prepare by XmlTransaction::commit() sucessfully .
    For example:
    XmlTransaction txn1 = mgr.creatTransaction();
    std::string query = <The query expression>;
    XmlExpression expr = mgr.prepare(txn1, query, qc);
    txn1.commit();
    XmlQueryContext qc = mgr.createQueryContext();
    XmlTransaction txn2 = mgr.createTransaction();
    expr.execute(txn2, qc);
    txn2.commit();

  • How to search for a BADI in a transaction

    Hi All,
    Please let me know the steps to find a BADI for a transaction.
    Thanks,
    Jaffer Ali.S

    check this.
    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).
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    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.
    Regards
    Kiran Sure

  • BADI/Exit for transaction FB05/F-36

    Can anybody help me regarding exit/BADI for transaction FB05/F-36?
    I have tried exits in CMOD such as: F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002 FIDCC1: Change IDoc/do not send
    F050S003 FIDCC2: Change IDoc/do not send
    F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001 Balance Sheet Adjustment
    FARC0002 Additional Checks for Archiving MM Vendor Master Data
    FEDI0001 Function exits for EDI in FI
    RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00 Line item display: Checking of selection conditions
    RFKORIEX Automatic Correspondence
    SAPLF051 Workflow for FI (Pre-Capture, Release for Payment)
    But none of these seem to work.
    Can anybody tell me which BADI or Exit that I can use?

    To check for the suitable badi, Go to transaction SE24 and give the Object type as CL_EXITHANDLER and click on Display button.
    Double click on method GET_INSTANCE, put a break point on case statement.
    Execute your transaction and look for variable EXIT_NAME at your scenario then It will show the available badi's.
    You can find the exits in many ways.
    Get the developement class of the transaction code from SE93.
    Then go to transaction SMOD and press F4 and give the Development class in Press ENTER, then it will show all the exits available for that transaction.
    Or
    Go to transaction SE80 and give the development class name and then expand the enhancements tree view then you will get the list of userexits for that corresponding dev class.
    Reward if it is useful.
    Thanks,
    Srinivas

  • What causes ad-hoc to run with bad plan and its resolution

    One of our Company Application funcnalities uses the ad-hoc query that returns top first row from the result sets .There has been several times since this ad-hoc query ran with a bad
    execution in last 8 months .There is no specifice time and date or day when this query run with bad execution plan ,however whenever this query ran with a bad execution plan on SQL ,that happed always early in the morning , before 6am .The setting of database
    parameterization is set to forced .There is SQL maintenance reindexing job that runs each night at 2am that changes the recovedry model of our production database from Full to simple and changing back from simple to full after the reindexing operation .That
    causes the SQL plans to flush each night .The next day morning , when the application ad-hoc query runs on SQL first time , SQL generates a new plan for that query . Some strange reason , SQL genarates a good plan for that ad-hoc query most of the times ,but
    sometime this query picks up a bad plan .Whenever it happen,the application function becomes exetremly slow and it seems that the rest of the fuctionalities work fine meantime .
    Our application vender is aware of this issue and this issue will be fixed in the application next release .Developer is converting the ad-hoc query into stored procedure to fix this
    issue .Application new relase will not available for next 2-3 months ,meantime we still have to deal with the ad-hoc query bad execution plan issue . Usually ,when the ad-hoc query run with the bad execution plan , I retrieve the query bad plan and just remove
    the plan for that particular query from cache .Once the bad plan is removed from cache , the perfomance gets back to normal .
    As my understanding, this issue is related to parameter sniffing .but anyone thinks there are other factors responsible for this issue such as the network problem , the resource intensive
    report ran or something else .
    Has anyone have step by step troubleshooting steps that could help me with my investigation and what areas
     do I need to look into in order to investigate what could caused the ad-hoc query to pick up bad plan ?
    Any help will be apprecited .
    Daizy

    When we upgraded our Production Database to SQL server 2008R2 enterprise Edition. We ran into the transaction log file to grow too large during the reindexing job activities at night .To prevent the transaction log file to grow big , we had decided to change
    the recovery model of database from FULL to Simple before the reindexing job starts and the recovery model of Database is changed from Simple to Full after the reindexing job finishes . We also have the differential backup job setup right after the recovery
    model change back to full so the transaction log backup chain does not break.
    The transaction log chain breaks when you set the recovery to simple.
    Yes, if you take a diff backup, you can apply transaction logs from that point
    if the diff backup is good. If the diff backup is bad, you will lose all updates after you set recovery to simple. And, yes, when you hardware starts to deteoriate, you should not be surprise that the last backup is not good.
    Again, please stop setting recovery to simple, unless you have a very relaxed RPO in your SLA. Use bulk-logged recovery instead.
    By the way, you do take a t-log backup before you change the recovery mode, don't you?
     Changing the database recovery model does flush the SQL plans for specific Database. Please review this linkhttp://sqlblogcasts.com/blogs/steveh/archive/2010/09/02/changing-recovery-model-removes-plans-from-procedure-cache-for-a-database.aspx
    Hmmm. I don't have the time to verify this right now. Anyway, reindexing is good enough to flush the cache of most plans.
    I have pretty much all required info regarding this query , but what other areas or investigation do I need to do for the query parameter sniffing issue ?
    Have you researched what values the initial plan is sniffed for?
    As Erland said  adding space in query ,I don?t know adding space means just add additional space in the query so it hashes a different values .Please advice .
    Obviously, you need access to the application code. The other alternative is to set up an early morning job that runs after this first execution and which forces a recompilation; either by evicting this specific plan or more brutally runs sp_recompile on
    one of the tables in the query.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • BADi called from transaction FB60

    Hi all
    I am looking for a BADi called from transaction FB60 in ECC 6.0. This is needed due to the fact we will develope a solution where we transfer the cost from an invoice booked to an intern order and transfer the cost and currency to CRM 7.0. Please if there is anybody who know a Badi that is triggered when the transaction FB60 is Saved, it will be very help full to us.
    Best Regards
    Camilla

    Hi,
    Re: Need user exit or BADI for FB60
    Best regards, Christian

  • Regarding BADI FAA_EE_CUSTOMER

    Hi Gurus,
    I have a requirement of BADI FAA_EE_CUSTOMER ( new depreciatioin calculation ), the thing is i am new to BADIs,
    i have created the BADI Z_FAA_EE_CUSTOMER and inserted a break-point in the set_base_value interface. but i am unable to find the tcode for which this badi will trigger... and can any give me some help to work out on this ...this is available in ecc6.0. i have opened the tcodes OABZ and AOBK but how to go into my code ...if they are the correct tcodes?
    Waiting for ur reply....
    Regards
    Srinath

    goto se24
    type cl_exithandler and "display"
    double click on "get_instance"
    set a break-point on  CALL METHOD cl_exithandler=>get_class_name_by_interface
    run the transaction ,in the debugger you will see the badis name in "exit_name" variable.
    These badi's are the ones you can use in your transaction....
    have you activated your implemetation????

  • Regarding BADI implementation in Debugging

    Hi,
       i have a doubt regarding BADI.There are multiple badi implementations for VA02 transaction. now i am processing the VA02 transaction. Can i know which implementation is processing for the transaction.

    Hi Praveen,
    Use this code to find out the BADI of a Transaction code:
    *& Report ZGET_BADI
    REPORT ZGET_BADI.
    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.
    endcase.
    Reward if useful
    Regards
    Ravi

  • BADI FOR MIGO TRANSACTION

    HI EXPERTS,
    HOW CAN I ADD TWO SCREEN FIELDS FOR MIGO TRANSACTION?
    HOW CAN THE TWO SCREEN CAN VALIDATE DATA FROM PURCHASE ORDER NO ENTERED?
    CAN ANY ONE FIND A SOLUTION AND HELP ME THIS.

    Hi,
    You may create an implementation for the badi in SE19. Then the attributes will be available during runtime for the method, and you may use those to validate the data.
    The BADI MB_DOCUMENT_BADI and method MB_DOCUMENT_BEFORE_UPDATE also triggred during MIGO and the structures XMKPF, XMSEG contains the runtime values for the document.
    Regards,
    Renjith Michael.
    http://www.sourceveda.com/page4.htm

  • Exit or Badi for Migo transaction for given condition

    Hi,
    I need exit or Badi for MIGO transaction for the following condition ( When the goods receipt for the PO is initiated, prior to posting the accounting document).
    Please let me know
    Regards
    Ramesh

    Hi
    In rel 4.6C you can find these BADIs:
    - MB_DOCUMENT_BADI or MB_DOCUMENT_UPDATE
    and these exits: MBCF0002, MB_CF001
    Max

  • BADI'S AND EXITS

    I need  some information and examples related to Badis and User Exits

    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.
    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
    User exits
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    To find a Exit.
    Goto Transaction -- Find The Package
    SMOD >f4>Use the Package here to Find the Exits In the Package.
    Else if you Want to search by Application Area wise ,
    There is one more tab to find the Exits in the Respective Application Area.
    Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
    Now Run ur Transaction to Check if it Triggers.
    Thats it..
    Suppose you need to find out all the user exits related to a tcode.
    1. Execute the Tcode.
    2. Open the SAP program.
    3. Get the Development Class.
    4. Execute Tcode SE84.
    5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
    6. Enter the Development class and execute.
    Check out this thread..
    The specified item was not found.
    1. Type the transaction : system->status-> <PROG. NAME>
    2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    3. Open CMOD utilities->SAP enhancements
    EDIT->All selections
    4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
    5. The displayed list contains the enhancements names for the transaction You were looking for.
    6. Create a project in CMOD and the code in default include->activate.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    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
    These links will help you to learn more on user exits.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.allsaplinks.com/user_exit.html
    www.sap-img.com/abap/what-is-user-exits.htm
    Also please check these threads for more details about user exits.
    Re: Screen exit
    user exit and customer exit
    user exit
    1. Document on UserExits in FI/CO
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    2. Finding User Exits...
    http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
    3. List of all User Exits...
    http://www.planetsap.com/userexit_main_page.htm
    Regards
    Anji

  • BADI in Billing Transaction (VF01)

    Dear All,
    I am new to BADIs Development. And I want to put a BADI in Billing Transaction VF01. My users want some extra fields for putting the data. So please guide me how can I do that.
    Regards,
    Vishal

    Hi vishal
    if u specify exact fields and requirements , i think more forum memebers can guide u.
    take help of technical consultant for finding out exact BADI  in applicable abap code u can use t.code SE17 and Se18 for the same.
    a generic info for you is from sap help check this if it helps
    Enhancement of Tables of Billing Document  
    Use
    For all components of the billing document there are customer includes that you can use to add your own fields without the need for modifications.
    Features
    All layers use the same customer includes. This means that, for example, when you include a field in the customer include of the document header, this field exists in the database layer, the logical layer, and the display layer. You cannot enhance the structures of the inbound interface of BAPI_ISTBILLDOC_CREATEMULTIPLE using customer includes. In accordance with the guidelines for programming BAPIs, you have to use the import table EXTENSIONIN to fill the fields in the customer include of the billing document.
    For technical reasons, there are two customer includes in the components of the billing document. One customer include is designed for fields of a character nature that can be transferred automatically. The transfer is supported by predefined BAPI table enhancements. If you use this predefined BAPI table enhancement when you fill table EXTENSIONIN, the fields in the customer include are provided with data automatically. You do not need a BAdI implementation. For more information, see the section  Customer Enhancement and Modification of BAPIs (CA-BFA) in the documentation for SAP NetWeaver under Cross-Services ® Further Development, Modifications, u2026 (CA-BFA).
    The predefined BAPI table enhancements also include the above-mentioned customer includes. The following table shows the names of the BAPI table enhancements and customer includes:
    Part     BAPI Table Enhancement     Customer Include
    Header     BAPI_TE_FKKINVBILL_H     CI_FKKINVBILL_H
    Items     BAPI_TE_FKKINVBILL_I     CI_FKKINVBILL_I
    Tax Items     BAPI_TE_FKKINVBILL_T     CI_FKKINVBILL_T
    Additional Items     BAPI_TE_FKKINVBILL_A     CI_FKKINVBILL_A
    A further customer include is designed for customer-defined fields that are not of a character nature or required for mapping. An example is additional currency fields. For these fields you have to implement a method of the BAdI ISTINV_BAPIBILL. The following table shows the names of the customer includes and the related methods that you have to implement for the transfer of the data:
    Part     BAdI Method     Customer Include
    Header     MAP_HEADER     CI_M_FKKINVBILL_H
    Items     MAP_ITEM     CI_M_FKKINVBILL_I          
    Tax Items     MAP_TAXITEM     CI_M_FKKINVBILL_T          
    Additional Items     MAP_ADDITEM     CI_M_FKKINVBILL_A
    The following figure shows how you can use the EXTENSION table to fill customer-defined fields:
           1.      The standard SAP fields are provided with data automatically. This means, for example, that the values of the structure HEADERS are transferred to the standard fields of the structure FKKINVBILL_H. Usually no BAdI implementation is required.
           2.      Use the customer include CI_FKKINVBILL_H for customer-defined character fields whose value is to be transferred from the interface to the billing document header unchanged. This include is also included in the BAPI table enhancement BAPI_TE_FKKINVBILL_H. Entries in table EXTENSIONIN that refer to this structure are processed automatically. A BAdI implementation is not required. However, we recommend BAdI implementation for checking. In the same way, you can add character fields to other parts of the billing document and provide them with data.
           3.      If you want to add a numerical field to the billing document header, you have to use the customer include CI_M_FKKINVBILL_H. Also define a BAPI table enhancement. We recommend that you only use character fields in the BAPI table enhancement. Implement method MAP_HEADER of the BAdI ISTINV_BILL. Use your BAPI table enhancement to identify the corresponding entries in table EXTENSIONIN in the method. Convert the character field from your BAPI table enhancement into the numerical field from the customer include CI_M_FKKINVBILL_H. In the same way, you can add numerical fields to other parts of the billing document and provide them with data.
           4.      You can also use the EXTENSIONIN table to provide a customer-defined table with values.
    Regards
    Mandar

  • BADI for F150 Transaction

    Hello evrybody,
    For T-code ' f150 ' package is FIBP.
    My requirement is to make some changes in dunning ,
    but i couldn't fina any BADI's or enhancements for that transaction,
    there is a userexit but it is not helpful to me.
    So is there any other options.
    Thanks in advance
    Regards
    Ravi

    hi Ravi chandra,
    There are no badis for that transaction and there is only one exit for this transaction.
    Enhancement
    F150D001                                Indiv. customer exits in prog. for printing dunning notices.
    I think the above exit will  satisfy your requirement.
    Since it is in FI module try for some BTE's if not go for modification.
    Reward points if usefull,
    Thanks,
    Kalyan.

  • User-Exit/BADI/BTE for transaction /COCKPIT/1

    Hi everybody,
    I need to send and Idoc when a MM invoice enters the system from transaction /COCKPIT/1.
    I already made a function to send the idoc but now I'm having trouble to find a place to fire it.
    Any help would be very much appreciated.
    Thanks.
    Fábio Galvã

    Hi ,
    I dont know if replying on such an old link will help.
    Did you find the user exit /Badi for this transaction?
    Regards,
    Kushmeen

Maybe you are looking for

  • Password file and sysdba grant in 10g on AIX ...

    Hi, I am very familiar with password file, orapwd ... I installed oracle 10gR2 database on AIX, created a password file using orapwd (file name orapwdSID.ora under $ORACLE_HOME/dbs), set remote_login_passwordfile='EXCLUSIVE' in init.ora file. 1 - Whe

  • Event Handling Issues

    Hi Guys.. I am doing some event handling code and am having some problem.I have placed the following on the stage, a submit button whose instance name is 'btnSubmit' and a label whose instance name is 'lblTest'. The ActionScript 3 code resides in a s

  • Adobe Captivate 7 patch (CP 7.0.1)

    Adobe Captivate 7.0.1 patch is released now. Downloading instruction and What's new in Adobe Captivate 7 : http://helpx.adobe.com/captivate/kb/captivate-7-patch.html Mac users may share his/her contact details on [email protected] and we will share C

  • Moved library - how to correct file locations in playlists

    I copied my library off my HD to an external HD because the library is pretty large, about 120gb. I have all my music in playlists, and I back up my playlist library regularly just to be safe. I have not deleted my original library off my HD just yet

  • FLV file not showing in projector works as swf

    Hi I am nearly complete with my projector file, however the .flv I have playing on entering frame 2 just has a blank screen no skin etc. 1st frame [as] stop(); fscommand("fullscreen", "true"); // CLICK to play flick flick_Btn.addEventListener("mouseU