Badi for va02

Hi
I am working on a workflow for approval of Credit memo request (CMR)
As per my requirement i have to prevent anyone from changing the PO ie use transaction VA02 unless one of the approver requests the creator to change the CMR (the request will go as a workitem in the creators workplace.)
Is there any BADI wherein i can block VA02.
Such a BADI exists for ME29N ME_PO_PROCESS_CUST.
wherein i can block anyone from using transaction ME29N.
Does such a BADI exist for transaction VA02.

Hi Chetan,
Use the Below BAdI:
BADI_SD_SCH_GETWAGFZ
BADI_SD_V46H0001
Or you can user the user exit
Go to program
SAPMV45A
Use the subroutine:
PERFORM USEREXIT_SAVE_DOCUMENT.
Thanks,
Chidanand

Similar Messages

  • User exit or badi for VA02 on delivering

    Hi all,
    i need to know if exists a user exit or a badi which is activated when you click on the menu Sales Document -> Deliver in the transaction VA02.
    Thanks.
    Francesca

    Dear Francesca,
    goto se24, see the class cl_exithandler
    double click on method GET_INSTANCE
    put a session breakpoint on CALL METHOD CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE (in this EXIT_NAME indicates the badi name)
    now when u execute ur program or tcode, if there is any badi for this then it goes in debugging mode.
    Regards
    Sajid

  • Needs User Exit or BADI for VA02 Delete button

    Hi Friends ,
    I have requirement like i need to do perform some operation when in VA02 menuSALES DOCUMENTDELETE button pressing...So i need to write that code in User Exit or Some BADI or Enhancement Spot...
    I tried for BADI ,no BADI is triggering there...So please suggest me how to proceed further.

    Hi,
    You can do this using form USEREXIT_DOCUMENT_DELETE in include MV45AFZZ. You need to get a access key for this include.
    See the below link for more details;
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm
    Regards
    Karthik D

  • Enhancements and Badi for va02

    Hi Experts,
        My requirment is in VA02 , Delivery Block(LIFSK) and Billing Block(FAKSK) fields should be initialized.
    When user change these values and saving the sales order it should check the authorization of the user from table SETLEAF.
    If he is a valid user it will save else it will through a error message like "not authorized'.
    can any body please tell me which exit or badi is suitable for this requrement.
    Regards,
    Praveena

    Hi vinod..
    Thanks for giving replies....
    now i could activate the enhancement fine..
    this code not triggering while saving the sales order VA02...can you plzz check this code..
    FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Form USEREXIT_SAVE_DOCUMENT_PREPARE, Start                                                                                D
    $$-Start: (1 )----
    $$
    ENHANCEMENT 315  ZSO_APPROVALCHECK.    "active version
    DATA: WA_USR01 TYPE USR01,
          UNAME TYPE SY-UNAME.
    CASE SY-UCOMM.
    WHEN 'SICH'.
        if sy-tcode = 'VA02'.
       UNAME = SY-UNAME.
       SELECT SINGLE VALFROM FROM SETLEAF INTO WA_USR01 WHERE VALFROM = UNAME.
         IF SY-SUBRC NE 0.
           MESSAGE E000(ZMSG) WITH 'You are not authorized for approval'.
           endif.
           endif.
       ENDCASE.
    ENDENHANCEMENT.
    $$-End:   (1 )----
    $$
    ENDFORM.

  • User Exit or BADI for VA02-Text editor Functionality

    Hi experts,
    Can anyone of you please provide me the User exit or BADI name for the tcode VA02 to call the Function Modules related to TEXT Editor?
    **********Issues********
    I have an Order eg.110022345...Under that Order,there are many line items...Say if i select one line item and change its Schedule line date,then that line item will get cancel and in turn an corresponding New line item will get ceated.
    However,the Content of the TEXT fields is not copied to the line item from the parent line item.
    I guess the STD SAP code functions in that way.So i thought of writting an Zcode to apply this functionality by using the Function modules "SAVE_TEXT" and "READ_TEXT_INLINE".
    In order to do this i need to know the User exit or BADI which is suitable for my requirment.
    Requesting you to help me in this case..
    Thanks in advans:)

    Hi
    Try USEREXIT_MOVE_FIELD_TO_VBAP in userexit MV45AFZZ.
    I'm not sure but may be you need to use FM 'CREATE_TEXT' instead of 'SAVE_TEXT'.
    First try with "SAVE_TEXT" if it won't work then use 'CREATE_TEXT'.
    Best Regards,
    Nikhil Patil

  • BADI in VA02 at SAVING and function module for POP where i enter email id

    Hi All,
    Its urgent.
    1. I want a BADI name for VA02 at the time of saving .
    2. a POP up where i can enter email id .
    in SALES ORDER in SHIPPING TAB when i select DELIVERY BLOCK BADI should trigger and a pop up should come.
    I will enter the mail id and mail will go to a concern person.
    Sending a mail i can do , but BADI name and POPUP with entering mail id is the PROBLEM.
    Please friends i want it ASAP.
    Regards,
    Kumar.

    Problem is solved .
    I have created the POP box using CALL SCREEN..
    It worked .
    Thank you all

  • Need exit or Badi for updating Warranty data in IE02 while Prod Order conf.

    Hi All,
    I need a user exit or Badi for updating the Warranty data in IE02(Equipment Master) while production order confirmation(CO15)?
    I need to update the Begin guarantee date from Production order and warranty master type in IE02 while confirming the production order.
    Thanks,
    Sudha

    Hi,
    Are you saying first create notification,then service order
    and then Sales order.
    But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
    Thanks & regards,
    chetan.

  • User Exit or Badi for CN60 transaction

    Hi
    Can anyone tell me the user exits or Badis for Tcode CN60.
    i need to Include the Comments field for the activities from CN22.soi would like to know  is there any userexit for CN60.
    Thanks
    Sowjanya

    Hi Sowjanya
    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.
    reward points to all helpful answers
    kiran.M

  • BADI for VA21/VA22

    Hello everyone.!
    I need to know if there is a BADI for Tx. mentioned above(Quotation). What i need to do is simple: Validation check in condition types (pricing & discounts).
    If user selects a condition type (i.e. PR00), then i need to validate its amount.
    I've read some about BADIs por Sales Order document, i.e. VA01/VA02.. but ¿can these BADIS help me with this?
    Thanks in advance.!!!
    Luis

    Hi
    you can use Standard User-exit program MV45AFZZ Provided by SAP  for Sales, You can write ur
    Code in following Section of This Above Program.
          FORM USEREXIT_PRICING_PREPARE_TKOMK                           *
          This userexit can be used to move additional fields into the  *
          communication table which is used for pricing:                *
          TKOMK for header fields                                       *
          This form is called from form PREISFINDUNG_VORBEREITEN.       *
    FORM USEREXIT_PRICING_PREPARE_TKOMK.
    *{   INSERT         EEDK900305                                        1
    We are executing this functionality through a different report
    *}   INSERT
    TKOMK-zzfield = xxxx-zzfield2.
    ENDFORM.                    "USEREXIT_PRICING_PREPARE_TKOMK
    *eject
          FORM USEREXIT_PRICING_PREPARE_TKOMP                           *
          This userexit can be used to move additional fields into the  *
          communication table which is used for pricing:                *
          TKOMP for item fields                                         *
          This form is called from form PREISFINDUNG_VORBEREITEN.       *
    FORM USEREXIT_PRICING_PREPARE_TKOMP.
    *{   INSERT         EEDK900305                                        1
    I Think This Will Help You.
    Regards,
    Shyam.

  • Reg. Exit/BADI for changing item data of PO in ME22N

    Hi all,
    My requirement is to update the field LABNR (Order Ack.) of few specific line items of a PO, in the Transaction ME22N, using Exit/BADI.
    I have tried the BADI  ME_PROCESS_PO_CUST. But the PROCESS_ITEM method of this BADI processes only the line item which has been changed/inserted in ME22N transaction. But my requirement is to update line items irrespective of whether that line item was "changed/not changed" during the process in ME22N screen.
    Could you please suggest me some suitable Exit/BADI for this requirement.
    Regards,
    Anbarasan K

    Thanks Martin.
    Problem solved by implementing the method Process_Header.
    1. Get the items from Header                              -  im_header->get_items
    2. Loop the item list and get the line item record   - re_item-item->get_data
    3. <- Logic to Update the line item - >.
    4. Update the line item                                       - re_item-item->set_data
    Thank you very much.. Martin.
    Regards,
    Anbarasan K

  • Do you have any idea what is the BADI for creation of Purchase Order?

    Hi Gurus, I would like to ask regarding the BADI for the P.O creation in SRM. I have a requirement that if the Account Assignment Type is "asset" it should tick the checkbox (goods receipt/confirmation of performance of service) in the related documents tab of item.  Thanks a lot. I hope you can help me gurus.

    Thanks for the help.

  • User Exit/ BADI for PO release

    Hi Experts,
    Can anyone please tell me about the User Exit or BADI for Sub contract PO release.Also tel me how to proceed for the following 2 requirement ,
    i have to send an IDOC as & when the Sub contract PO releases.
    And automatically resent if changes are made in PO with the repeat output function in ME22N.
    Regards,
    Nik

    Hi,
      Use trx SE19 to implement your BADI: create an ZME_PROCESS_PO_CUST using ME_PROCESS_PO_CUST as definition.
    Now in Interface Tabs you can see the METHODs you can use as "user-exit", in particular there's PROCESS_ITEM to manage items data.
    You have to write your code into this method.
    This method has IM_ITEM like parameter in its interface, and it's like the type IF_PURCHASE_ORDER_ITEM_MM.
    This type has the method IF_LONGTEXTS_MM~SET_TEXT, you can try to use it to set your text in item.
    This is code for example:
    DATA: TLINE TYPE MMPUR_T_TEXTLINES.
    CALL METHOD IM_ITEM->IF_LONGTEXTS_MM~SET_TEXT
    EXPORTING
    IM_TDID = <YOUR ID>
    IM_TEXTLINES = TLINE.
    So you should read the text you want to copy and pass it to TLINE.
    You can use the METHOD PROCESS_HEADER to read the text you need. This METHOD has IM_HEADER as parameter and it's like the type IF_PURCHASE_ORDER_MM, this type has the method IF_LONGTEXTS_MM~GET_TEXT to read header logn text.
    Anyway while you're in implementation of the BADI go to:
    GoTo->Sample Code
    Here you can try an example how to implement the method you need to use.
    Regards

  • User exit / BADI for training and event management

    Hi all,
    Can anybody tell me if there is any user exit / BADI for training and event management module?
    Thanks & regards,
    LOI

    Hi
    BADI's for Training and Event Management
    HRTEM00MASTERDATA      HR: Training and Event Management - Master Data
    HRTEM00NET_ACTIVITY      Determine Activities of an Attendee (e.g. ESS PV8I)
    HRTEM00NET_WEBST      Set Cancellation Reason in ESS PV8I
    HRTEM_CORR_NOTIF_REQ      Customer Enhancement:Confirmation on Send (R/3 Mail, E-Mail)
    HRTEM_HANDLE_BOOKING      HR-TEM BAdI: Employee Leaves Company - Update TEM Data
    HRTEM_INT_ZW           HR-TEM: Badi for Integration TEM - Time Management
    HRTEM_READ_OBJECT      Customer Enhancement: Name Format
    RHPV0001 Customer      Enhancement for Additional Checks for Booking
    Enhancemnet Spot:
    HRTEM00MASTERDATA      HR: Training and Event Management - Master Data
    ~~~Ganesh Kumar K.

  • How to create a BADI for the sceanrio

    Hi abapers,
    I have a scenario as follows.
    I create a Transaction where in i put the details of the product and quantity for a particular project's site. The amount gets calculated based on the products  unit value and its displayed in net value field. Now the user saves the transaction and a number gets generated. If the net value amount is less than 500 then the user can approve , if its greater than 501 and less than 1500 then a mail should be generated to his superior who is able to approve and ifs amount is greater than 1501 then a mail should be generated to the top of hierarchy who should approve it.
    Now the real challenge is if the same project card  has more than 1  new request and the amount is less than 500 the user should not be able to approve  instead it should generate a mail to his hierarchy for approval  since  the site has already been exceeded its limit of approval. bcoz earlier 500 and current 400 which will make it to greater than 500.similarly for the hiearchy.How do i go about  it.
    Now i want to create a BADI  on the save event of transaction to check the net value amount as well as check for earlier amounts saved for the particular site.
    Any help will be appreciated.
    Regards,
    Navin .

    hai navin
    r u using ECC 6.0 or 4.7 if 4.7 u can create badi defintiion directly form se18 transaction
    and define the interface and its methods , once u define them activate them
    and to use in ur code u create an instance of ur badi name
    and then use
                     cl_exithandler=>get_instance  method in instance name parameter just pass ur badi name and this will create a badi defintion in ur code, and an oen can implement it
    if u r usign ecc6.0 then u can either create new badis usign enhancments or classical badis
    for clasical badis just go to menu  utilites and create classical badis and follw the sam eprocedure
    regards
    m.a

  • Regarding Error message in ME_PROCESS_PO_CUST badi for validation.

    hi Friends,
    I am Using ME_PROCESS_PO_CUST badi for validation in Purchase order (ME21N),
    For that I implemented PROCESS_ITEM method which fires during each row now i  add another validation in same implementation for plant  should be same through out the all line item. Now following code is woking fine but when for second line item user changese plant then it shows error message as per logic which is fine but even after changing plant to correct one the error message is still coming why is it so?
    following is my current validation code
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:ls_poitem TYPE mepoitem,
           ls_poitem_set TYPE mepoitem.
      DATA:ls_poheader TYPE MEPOHEADER.
      DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
      DATA:w_mara TYPE mara.
      DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
           WA_ZMMTBL039 TYPE ZMMTBL039 .
      DATA:ls_poitem1 TYPE mepoitem.
      DATA:V_KUNNR1 TYPE KNA1-KUNNR.
      DATA:V_KUNNR2 TYPE KNA1-KUNNR.
      DATA:W_WERKS(4),
           w_werks_tmp(4),
           w_flag(1).
      ls_poitem = im_item->get_data( ).
      lm_poheader = im_item->GET_HEADER( ).
      ls_poheader = lm_poheader->GET_DATA( ).
      IF ls_poitem-werks IS NOT INITIAL.
        w_werks = ls_poitem-werks.
        import w_flag to w_flag from MEMORY ID 'FLAG'.
        if w_flag is initial.
          w_flag = 'X'.
          EXPORT w_werks_tmp FROM w_werks TO MEMORY ID 'MEMO1'.
          export w_flag from w_flag to MEMORY ID 'FLAG'.
          clear: w_flag.
        endif.
      ENDIF.
      IMPORT w_werks_tmp TO w_werks FROM MEMORY ID 'MEMO1'.
    break swaroopb.
      IF ls_poitem-werks NE w_werks.
          MESSAGE E010(zparts) with 'Different plants are not allowed in single PO.'.
      ENDIF.
      CLEAR: WA_ZMMTBL039,w_mara.
      REFRESH:IT_ZMMTBL039[] .
      SELECT *
        INTO TABLE IT_ZMMTBL039
        FROM ZMMTBL039
       WHERE bsart EQ ls_poheader-bsart.
      IF sy-subrc EQ 0.
        CLEAR: WA_ZMMTBL039,w_mara.
        SELECT SINGLE *
          INTO w_mara
          FROM mara
         WHERE matnr EQ ls_poitem-MATNR.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY  bsart = ls_poheader-bsart
                                                              mtart = w_mara-mtart
                                                              spart = w_mara-spart.
          IF SY-SUBRC NE 0.
            MESSAGE E009(zparts) WITH ls_poitem-MATNR w_mara-spart ls_poheader-bsart .
          ENDIF.
        ENDIF.
      ENDIF.
    end method

    Hello Swarup
    Since you want to compare all items together (having the same plant) I would suggest to implement this logic either in method CHECK or POST of the interface.
    However, if you want to make your checks within the PROCESS_ITEM method then you should change your logic.
    It does not make sense to work with the ABAP memory within a BAdI implementing class because the class itself is your "memory".
    I would use the following logic to implement your validation:
      lo_poheader = im_item->get_header( ).  " retrieve header instance
      lt_items = lo_poheader->get_items( ).   " retrieve all items
      ls_detail_x = im_item->get_detail( ).  " details of currently processed item
      LOOP AT lt_items INTO ls_item.
        ls_detail = ls_item-item->get_detail( ).
        IF ( ls_detail-werks NE ls_detail_x-werks ).  " validation failed
        " do something...
       ENDIF.
      ENDLOOP.
    However, I would prefer to do this kind of validation in CHECK or POST method.
    Regards,
      Uwe

Maybe you are looking for

  • Best practice for exporting a .mov file for YouTube

    I am using FCPX 10.0.9 with a MacBook Pro. We are needing to upload relatively small-size high school football videos as .mov files to YouTube for my newspaper. I have been choosing the Export File option with the setting set to h.264, exporting the

  • 'iTunes has detected an iPod in recovery mode' loop. Help?

    On Friday I plugged in my iPod touch (4g) to download the new ios 5 (from 4.3.5), but about when it reached about 4 minutes remaining, the error message 'iTunes has detected an iPod in recovery mode. You must restore the iPod before using it with iTu

  • Integrated Sound Blaster Audigy ADVANCED HD Help

    Hey guys, I was hoping maybe someone could help me... I have the Integrated Sound Blaster Audigy ADVANCED HD driver but its only for 32-bit operating systems. I am running windows 7 64 bit and I was wondering if there are any 64 bit drivers around si

  • FCP 6 export widescreen SD - iDVD 7 widescreen plays 4:3

    Exporting DV anamorphic, plays in QT as widescreen, iDVD menu is widescreen, BUT the exported video plays 4:3.

  • What are the settings for using an ATT mail account with iPad mail?

    Dear Folks, I just switched from earthlink to att, and I can't seem to get Mail configured quite right. I can send email just fine, via stmp.att.yahoo.com. But when I try to receive email it tells me it can't connect to pop.att.yahoo.com. Since I can