URGENT! BADIs or USER EXITS !

Do u know any BADI's or User Exits for SAVE EVENT in transaction me21n??

Hi Julia,
Copy this program in SE38 and execute. Will get all list of existing Exits and
Badis for a particular Transaction code.
very useful program
Below code will give a list of BADIs for particular transaction.
*& Report ZNEGI16 *
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.
endcase.
<b>Reward points if this helps.
Manish</b>

Similar Messages

  • Badi or User exit to modify MSEG data during Goods issue

    Hello,
    I have a requirement to modify the field plant MSEG-WERKS while doing goods issue of outbound delivery via transactiona VL02N.
    Can anybody suggest me which BADI or user exit should i use.I have searched the SDN and all the previous threads on this haven't yeild any solution for this.
    I have tried with below listed Badis and enhancements which wont work.
    Badi
    ===================
    MB_DOCUMENT_BADI
    MB_MIGO_BADI
    LE_SHP_GOODSMOVEMENT
    DELIVERY_PUBLISH
    Enhancements
    ===============
    MB_CF001
    MBCF0005
    Thanks and Regards,
    Koustubh

    Hi,
    I am facing a similar issue of updating the MSEG-DMBTR field when Post Goods reciept is done in VL02n.
    I hav tried to update the value in LE_SHP_GOODSMOVEMENT BADI and tried to modify the structure .
    eg in this way
    method IF_EX_LE_SHP_GOODSMOVEMENT~CHANGE_INPUT_HEADER_AND_ITEMS.
    data: wa1 type LINE OF shp_imsegvb_t. "IMSEGVB.
    DATA: flag TYPE c.
    LOOP at CT_XIMSEG INTO wa1.
      wa1-dmbtr = '12345'.
    MODIFY CT_XIMSEG FROM wa1.
    " TRANSPORTING dmbtr.
    flag = 'x'.
    ENDLOOP.
    endif.
    endmethod.
    The value gets updated in the structure but when the material document gets created then the table MSEG has the amount DMBTR field not changed.
    Also, I tried doing the updation in the Function eXit : EXIT_SAPMM07M_001 by the method mentioned in different threads:
    betweeb statemnet if  sy-tcode = 'VL02n'
    FIELD-SYMBOLS: <DMBTR> TYPE any,
    <DMBTR1> TYPE any.
    ASSIGN '(SAPMM07M)MSEG-DMBTR' TO <DMBTR>.
    assign (<DMBTR>) to <DMBTR1>.
    But still on save of the material document in MSEG I cannot find the new DMBTR field value.
    Kindly help me on this, urgently required. I have already gone through the number of threads in the forum, but no solution.

  • BAdI: or User Exit for Campaign Creation   IN CRM 5.0

    Hi all,
    we are working in CRM 5.0,
    we have a Requirement like :
    when we create the campaign it should check higher level project ID (marketing Plan ID)
    if it is there it should permit for create campaign else it ll show error...
    Any BAdI: or User Exit for Campaign Creation?
    I ll geive reward points....
    Rhanks & Regards,
    Ganesh

    IN WHICH TRANSACTION U R CREATING CAMPAIGN ??

  • BADI or USER EXIT for MIGO when changing order number

    Hi experts, I'm looking for a BADI or USER EXIT in Tx. MIGO that is triggered after pushing ENTER when you change the order number. What I need to do is to propose the movement type depending on the order data. Thanks.

    Not sure but you can try in BADi MB_DOCUMENT_BADI menthod:
    MB_DOCUMENT_UPDATE

  • Badi or user-exit for QA32 after save

    I need a badi or user exit to execute exactly after save in QA32 ..I tried belows but they are not that i want
    QPL1_SUBSCREEN_ADDON
    INSPECTIONLOT_UPDATE
    Check these Exits:
    QEVA0004 Exit for changing information line in usage decision he
    QEVA0005 User subscreen for displaying add. data for usage decis
    QEVA0006 Entry to usage decision transactions
    QEVA0007 UD: Control of compulsory comment or long text presetti
    QEVA0008 Usage decision: Customer function key (e.g. to cancel U
    QEVA0009 UD: Predefinition of quantity to be posted to sample st
    QEVA0010 UD: Usage decision check
    QLCO0001 QM: Call alternative costs report from UD
    QSS10001 Possibility of calling a different print report

    Hello Tuncer,
    have you checked the BADI QE_SAVE? This is the last possible chance of changing data on saving a QM transaction and should be active in QA32.
    The only other solution I can come up with is a follow-up action i.e. for the UD-code
    Hope this information proves usefull.
    Regards
    Isabelle

  • BADI or User exit  for FB50 to update custom field in table COEP

    Hi all,
    i have added one custom field in table COEP through include CI_COBL .
    when i do posting through sales order(VA02) or purchase order(ME22n) that custom fields in COEP get updated with controlling document
    and through BADI AC_DOCUMENT i m updating that custom field in COEP.
    but when i do manual posting through FB50 controlling document is generated in COEP but i m not able to update that custom field
    because in this case BADI AC_DOCUMENT  is not get triggered.
    is there any BADI or User exit or enhancement spot for FB50 through which i can update that custom field in table COEP

    Hi Sandy,
    Thanks for u r reply,
    RFAVIS01 is not getting triggered through FB50
    and F180A001 ( EXIT_SAPLF048_001) is getting triggered but it doesnt contain COEP field in its parameter
    import - F180A_DOC_HEAD_TAB
                 F180A_DOC_ITEM_TAB
    changing - RELATION_TAB

  • Badi or user exit for FTR_CREATE for modifying the Payment Details

    Hi,
    I need a Badi or user exit that will modify the internal table for the "Payment Details" in transaction FTR_CREATE. Basically, instead of using the default entries in the "Payment Details", data from a Z custom table will overwrite the "Payment details" or the internal table containing the "Payment details". This should create entries in the Transparent Table VTBZV with the values fron the Z custom table.
    I'm trying to implement the BADI FTR_TR_GENERIC but I cannot find where and how to modify the original "Payment Details" entries. Or if its even possible to do this.

    Hi Ravi,
    I was trying to do that but I am not sure were to start. I tried to modify the contents of PI_PROXY_TRANSACTION->A_TAB_CASHFLOW using MODIFY <itab> but an error occured when I tried to activate it saying that the Class/Interdace Attribute is read-only and cannot be modified. Is there a Method that I need to do in order to modify the Attribute? (I'm not that familiar yet with Classes and Methods though)
    Also, just to test, I manually changed the contents of two internal tables containing the "Payment Details" data during debug mode. But after the program has ended its run and finally saved the data, the Table VTBZV was not updated with the manual data I introduced. So I'm not sure if the Badi FTR_TR_GENERIC (which is I'm implementing) really allows the "Payment Details" to be modified or if I'm modifying the correct internal table(s).

  • Urgent issue in user-exit

    hi friends,
    one urgent issue regarding user-exits;
    i have the requirement like this:
    if any one of these fields ZPBSTQTY2, ZPCSTQTY2, ZPBKTQTY2, ZPCKTQTY2 and ZPBFRQTY2 in table S505 is GT 0, then i need to pass a value 'X' to two flags present in that table.
    then i have to update it thru transaction VA01.
    Plz suggest some solution for this.
    Thanks
    Praveen

    SDAPO001 Activating Sourcing Subitem Quantity Propagation
    SDTRM001 Reschedule schedule lines without a new ATP check
    V45A0002 Predefine sold-to party in sales document
    V45A0003 Collector for customer function modulpool MV45A
    V45A0004 Copy packing proposal
    V45E0001 Update the purchase order from the sales order
    V45E0002 Data transfer in procurement elements (PRreq., assembly)
    V45L0001 SD component supplier processing (customer enhancements)
    V45P0001 SD customer function for cross-company code sales
    V45S0001 Update sales document from configuration
    V45S0003 MRP-relevance for incomplete configuration
    V45S0004 Effectivity type in sales order
    V45W0001 SD Service Management: Forward Contract Data to Item
    V46H0001 SD Customer functions for resource-related billing
    V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
    V45A0001 Determine alternative materials for product selection
    And also you can write your code in MV45AFZZ
    <b>Reward points</b>
    Regards

  • BADI or User Exit validation of operations tab and displaying an error mess

    Hello,
    Could you please let me know the BADI or User Exit validation of operations tab and displaying an error message in iw32
    Thanks,
    Suresh Mgl

    Hi ..
    I tried that user-exit...but i need to block the changes for purchase requisition which is in released stutus..
    .i hope i need to do implicite enchancement spot.....could you please help me to do that..
    Thanks,
    Suresh Mgl

  • Badi or user exit for changing currency INR to EUR

    hi friends,
    in po header there is one tab called status.
    in this tab there is one field called delivery payment
    which has curr INR but i want to change that INR CuRR
    to EUR.Can any one tell me how do this is there any badi or user exit
    for this req.
    thanks.

    Hi Sonu,
    Use the following program to find out the appropriate user exist for ur transaction:
    REPORT ZGURU_USER_EXIT_FIND .
    *&  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.
    Then u can use the function CONVERT_TO_LOCAL_CURRENCY to change the amount from INR to EUR.
    Regards,
    Himanshu

  • Differences between BADIS and User-exits

    Hi everybody,
    I am new to ABAP and wonder what are the differences between BADIS and User-Exits. I read paper but did not find a SAP documentation yet.
    Does anybody know where to find a sap document which explains both technologies?
    Greetings, AD

    Hi,
    User-Exit is a specific place in a transaction-process where SAP offers
    third parties to include there own business functionality. Actually
    User-Exit is the namespace used for Exits programmed by SAP specifically
    for SD. For the other modules it's called Customer-Exit.=20
    >Business Add-Ins (BADI) =20
    The use of object orientated code within SAP has lead to new method of
    enhancing standard SAP code called Business Add-Ins or BADI's for short.
    Although the implementation concept is based on classes, methods and
    inheritance you do not really have to understand this fully to implement
    a BADI.
    For better understanding visit.
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/779183#
    Hope it was useful.
    Thansk,
    Sandeep.

  • BAdi or User exit to use in MB26 to avoid posting before saving of mat doc?

    Hello Experts,
    Can anyone tell me which BAdi or User exit to use in MB26 to avoid posting before saving of material document?
    I have requirement to stop posting incase of negative invetory in issuing storag location.
    Thanks

    Hello,
    The issue is currently we alllowing the negetaive stock at storage location level.At this movement , we want to avoid the negetive stock creation while posting the Mat doc with MB26.Before saving the material document I want check the stock levels in MARD , if the stock levels goes negative from this posting, then I want to stop the document posting.
    Thanks

  • Need BADI or USER EXIT for VT02n

    HI Friends,
    I'm writing a driver program for a ouptput type ZET1 (interface) the tcode is VT02N .
    In menu bar: goto--> output here i've give the output type and save.
    My Problem is, if there is any error on the driver program, it should be displayed the error msg while pressing  the save button.
    is there any BADI or User Exit.
    Thanks & Regards,
    Vallamuthu.M

    Hi,
       Check the below BADI's
       BADI_LE_SHIPMENT                        BadI: Shipment Processing
       BADI_V56N                                     User Exit Transport - Message Determination
    Regards,
    Srini.

  • BADI or User Exit for Txn : CRMD_ORDER

    Hi Experts,
    Is there any badi or user-exits for the transaction crmd_order.
    regrads,
    arul jtohi a

    Dear Arul Jothi,
    BAPI_ACTIVITYCRM_CREATEMULTI
    BAPI_BUSPROCESSND_CREATEMULTI
    CRM_BUSPROCESSND_BAPI
    CRM_LEADCRM_BAPI
    BAPI_LEAD_CREATEMULTI
    CRM_OPPORTUNITYCRM_BAPI
    BAPI_OPPORTUNITY_CREATEMULTI
    CRM_SLSTRANSACTCRM_BAPI
    BAPI_SLSTRANSACT_CREATEMULTI
    Also, visit the following thread:
    Change status for sales order in crmd_order
    BAdi/Enhancement:
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Regards,
    Naveen.

  • BADI or User Exit for  Transaction CK 24

    Hi Experts ,
    I need to do some customization as per my client requirement , once CK 24 transaction get executed .
    For that i am searching for a BADI or User exit that is being triggered after execution of the transaction  CK 24 .
    Can any body please help me on this to find a BADI or User exit on the same . Ihave tried all the basic methods for fidning the same .
    Good points will be rewarded on the solution .
    Regards
    Sarmistha

    SD,
    Am afraid to say there is no exit or BADi for same.just ask access key for program than change where you want.
    Amit.

  • BADI or User-Exit for MSEG

    Hi,
    I'm looking for a BADI or User-Exit to modify a field in MSEG. This field is an IS-Oil component, but, I must modify this field when I make an outbound delivery.
    I have tried the BADI MB_DOCUMENT_BADI but the system short-dumb when I modify the field. "The program tried to assign a new value to a field even though it is protected against changes.".
    If you have any user-exit or BADI or any solution for this BADI please tell me.
    Regards
    Frédéric

    Hi
    You can use exit ZXMBCU02 ( Function EXIT_SAPMM07M_001
    in SAP enhancement MBCF0002 ). Here also whtever changes you make to I_MSEG will be lost as MSEG is an importing parameter. You can do something like this.
    FIELD-SYMBOLS <F1> TYPE MSEG.
    DATA NAME(50) VALUE '(SAPMM07M)MSEG'.
    ASSIGN (NAME) TO <F1>.
    <F1>-KOSTL = 'XXXX'.
    ( In above example MSEG-KOSTL will be set as XXXX, you can change any of MSEG fields in above way. ).
    Cheers

Maybe you are looking for

  • How to change a background to an image? and how to put a 'clear' button.

    Hi guys, im new here & i really newbie in java. Recently i found code for java applet that can draw a line. I want put image as a background and draw some lines over the image and provide a button to clear the lines. Is there any one can help me to s

  • WBS Elements

    What are wbs elements in SAP. What is the different b/w internal orders and wbs elements.

  • AirTunes pauses then plays (in the middle of a song)

    I just got a brand new Airport Express to set up a wireless network at home. All the wireless is working seamlessly. But when I try to play a song from iTunes to the router to play on my home stereo, the song plays but every now and then it pauses, t

  • Simple question for bas

    or anyone else that may know the answer. should my bios see the sata drives with the sata controller enabled even before i do the f6 when installing the via raid drivers in the os. also what jumpers should be shorted on the back the hard drives. i ha

  • How to integrate BlazeDS with RAD 6.0

    I am using RAD6.0 which is having Websphere version 5.1.1.2 and jdk 1.4.2 Please provide me steps or a link which states how to configure BlazeDS with RAD or Websphere. Thanks in advance.