User Exit - MV45AFZZ - Urgent

Hello,
I have a requirment when the user changes the delivery date for a order a mail has to trigger to the sales people.
As of now I know the place to capture both the new and the old date. - FORM USEREXIT_SAVE_DOCUMENT.
My question is, is Email possible through the exit.
If it is, is it recommended, would it impact a lot on the performance of the exit.
any alternative ideas.
Let me know.
Thanks,
Ster

It will not have any performance issue to give email functionality,hardly it takes 2 or 3 seconds to raise message.
Note : Use one include program within MV45AFZZ ,use email coding in that include.
Thanks
Seshu

Similar Messages

  • Is the Sales Order Item User Status available in user exit MV45AFZZ

    Hello,
    Does anyone know if a sales order line item user status is available within user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT)?
    I need to send an email when the status changes from one specific value to another specific value but I don't seem to have access to what the latest value is in this user exit.
    I have found a table XTVSTAT which cntains some user status' but it's not clear which status maps to which line item.
    If anyone has any suggestion please let me know.
    Thanks,
    Ruby

    Hi,
    I do need to access the values as I need to check for a specific change to the user status from value A to value B.
    I have already tried debugging the user exit and searching through the available variables but the status information doesn't seem to be available.
    I guess I will have to try the output determination route. Can you explain this in a bit more detail please.
    Thanks,
    Ruby

  • User exit MV45AFZZ - Unable to modify the code

    Hi,
    I am working in ECC 6.0 version and new to this editor.
    I need to do some changes in include MV45AFZZ,when sales order is saved.
    When i try to go to change mode,program is asking for 'Access key'.
    Whether i need to get 'Access key' from SAP,or is there any procedure for doing code changes in this exit?
    Please help.
    Thanks & Regards,
    Seshagiri.

    Hi Seshagiri,
    To modify the User exit MV45AFZZ you need to get the Access Key from the Basis.
    The Basis Team will Generate the Access Key so that you can make the changes .User exit MV45AFZZ is not yet Used so that why its asking the Access key.
    Thanks & Regards,
    Nelson
    Reward points if helpfull

  • Manually trigger Availability Check in the Sales Order User Exit MV45AFZZ

    Hi All,
    As per the normal scenario where sales orders are created and the schedule line delivery dates are determined.
    Based on some business logic for few customers we need to change the delivery priority and confirmation delivery date.
    We are implementing this logic in the user exit MV45AFZZ in the routine USER_EXIT_SAVE_DOCUMENT_PREPARE.
    The availability check logic is already implemented by then. Now we have scenarios where the date redetermined by the custom logic is greater than the one determined by the standard availability check done by SAP.
    We have changed the values of the field VBEP-EDATU as per our logic but we still have 2 lines in the schedule line data where the requested date is greater than the confirmed date.
    This can be tackled if we can redo the Availability Check.
    Can someone provide pointers on how can we trigger the availability check manually in the code.
    Regards,
    Karthik

    What was the solution?

  • User Exit Mv45afZZ for Promotional BOM

    Hi All,
    I am adding custom code to the user exit MV45AFZZ for Promotional BOM. The aim is to add a new entry in the Line tiems details with the BOM header data.
    Say if the initial order is  like this:                                       It should like this after user exit execution:
    Material         Quantity            Itm Ctg                                          Material         Quantity            Itm Ctg
      M1                   10                  X                                                   M3                   1                    Z
      M1                   10                  X                                                   M1                   10                  X
                                                                                    M2                   10                  X
    We assume that in the configuration, we have configured so, such that, BOM Item M3 comprises of Items (M2, M1) with 10 Qty each.
    For this purpose, we are adding a new row to the XVBAP table at runtime. But, when we post the order, finally the quantity field for item M3 is automatically getting changed to 10.
    Please help and revert back. Let me know if i have to clarify more on my doubt.
    Thanks
    Debabrata

    Hi,
    The userexit save_document_prepare will directly hit the tables like vbak and vbap. So, as i can see that you would like to change at the pricing conditions so it is better to user the user exit:userexit_pricing_prepare_tkomk...
    All the pricing conditions will be stored in the tkomp and tkomk tables.
    The changes can be happnd at this level also.
    Thanks
    rohith

  • Global data declaration in user exit 'MV45AFZZ ' for VA01

    Hi folks,
    i  am using USEREXIT_PRICING_PREPARE_TKOMP  in MV45AFZZ for VA01 pricing modification.i need to declare one Global internal table for this exit.i tried to do this one in MV45ATZZ.but i can not save as it is asking access key.
      how can i achieve this one?
    ur answers will be rewarded.
    Thanks
    pabi

    Hi Pabitra,
    You can find the parent program and use an enhancement point to declare a global internal table mainly in the top include of the program
    ed: if t-code ABC is executed then the program for the t-code ABC is your parent program...
    Here SAPMV45A is your parent program for VA01
    and in INCLUDE MV45ATOP.
    use ENHANCEMENT-POINT MV45ATOP_02 SPOTS ES_SAPMV45A STATIC. to declare the global internal table
    Once the table is declared,also check in the user exit by debugging if the table is made available..
    i have done the above technique to use an internal table in userexit_save_document after declaring table in the mentioned enhancement point and it worked for me...
    Pls check and revert
    Reward if useful
    Regards
    Byju

  • Which user exit MV45AFZZ or MV45AFZ1 or MV45AFZB to use.

    Hi All,
                In the Sales Order Types ZDRC and ZCRU, when Sales Org is US15, the field VBAP-MVGR1 shall be mandatory.
    We need to use MV45AFZZ or MV45AFZ1 or MV45AFZB user exit.
    In MV45AFZB, USEREXIT_CHECK_VBAP, seems closest, which is used to carry out additional checks (e.g. for completion) at item level.
    Please suggest.
    Thanks.

    Hi
    Pl check this exit...this may be useful to meet the requirement
    in program MV45AFZB
    USEREXIT_CHECK_VBAK
    This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.
    Thanks,
    Ravi

  • User exit MV45AFZZ

    Hi Gurus,
    I  have put logic in userexit "MV45AFZZ" , in FORM USEREXIT_SAVE_DOCUMENT_PREPARE .That is to change schedule line category based on "User Status" . If user status is u201CAPPR u201C  schedule line category should automatic change to CP .
    loop at XVBEP.
    if RV45A-ASTTX = 'APPR'.
    xVBEP-ETTYP = 'CP'.
    xvbep-updkz = 'U'.
    xvbep-BDART = '4'.
    modify xvbep .
    ENDIF.
    endloop.
    This is working fine,  updating the value.
    Now the problem is:
    1.     Whenever schedule line cat changes via user exit for sales orders and sales order saved, sales order is not showing  in MD04 . if I will changed schedule line category manually  CP . It is showing in MD04.
    We have make to order scenario . so it is not coming for MRP run if I will changed through user exit.
    Please help me out .
    Thanks in advance .
    Regards,
    Subhash

    Hi
    Please, do a trace with ST05 and check if your system is updating table VBBE before this userexit. Other question, run report SDRQCR21 and check if it update MD04 (see Note 25444 - SDRQCR21: Recovery of sales and delivery requirements)
    I hope this helps you
    Regards
    Eduardo

  • MB1B User Exit , BAdi (Urgent)

    HI all !!
    What is the user-exit or BAdi which is triggered <b>after</b> saving (not <b>while</b> saving)a material document in t-code MB1B?
    Handsome points will be rewarded.
    Nikhil

    hi this will help u.
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  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.
    with regards,
    Hema Sundara.
    reward if helpful.

  • Urgent- Help abt  User Exit MV45AFZZ

    very good morning to all the SAP Masters out there....
    I had already posted a thread regarding the same but didnt get helpful answers...
    Hope I will get some this time...
    It is Interesting actually...
    I need ur help for solving an issue...
    when Sales Order is Being created...the Purchase Requisition and Requisition item is generated in the Schedule Line of Sales order's Line Items
    If I am not worng we are able to make changes in MV45AFZZ program for SalesOrder..
    So My requirement is..
    When Sales order is being created the value of KDMAT field of VBAP table should also be saved in EBAN-BEDNR...the length for BEDNR is 10 so it'll b taken care to limit VBAP-KDMAT with in 10 Chars...
    help me to Carry XVBAP-KDMAT into EBAN-BEDNR for VA01 Transaction....
    Points Rewrded for Helpful answers

    Hi,
    Why don't you try the exit
    V45E0001
    where the description says "Update Purchase Order from Sales Order"
    Please find below the documentation for the exit
    Update Purchase Order from Sales Order
    With this customer exit the standard system behavior regarding updating order data from the sales order can be expanded or restricted.
    The module is called up when the sales order is changed, as long as the conditions for changing the order have been filled. It transfers the document number, the purchase requisition number and a table for the fields to be changed in the order (T_PURCHASE_DATA). This can be expanded or restricted in the existing Customizing.
    The rule is: To change a field with the name FIELDNAME, a subprogram (form routine) with the name POSITION_CHANGE_FIELDNAME must exist in the program SAPMM06E.
    OR..in MV45AFZZ in userexit_save_document we need to write the code to manually update the table EBAN field by using abap code like modify table or seeking a BAPI..consider this as the last resort pls.....
    Reward if it helps
    Regards
    Byju

  • User-Exit MV45AFZZ - userexit_move_field_to_vbkd

    Hi All,
               I have one requirement which i need to get department number, stored in table T023T and assigned to sales order item level.
               The logic is based on material i am getting the material group and based on material group i am getting the department number which is maintained in the Description2 field of table T023T.
    i written the above logic in form 'userexit_move_field_to_vbkd' and moved department number to VBKD-ABTNR. But i dont know why for some materials Department number is assigning wrong values and for some it is assigning correct value.
    Please help me out is there any other place to move the data to department number while creating sales order.
    Regards,
    Siva.

    HI Siva,
    In this user MV45AFZZ, value are store in structure like,
    Xvbkd- hold current values, Yvbkd contain old value.
    like this yvbak, yvbak, Xvbep,yvbep,vbap,xvbap,yvbap.
    try to change this internal structure value then it will populate.
    Thanks,
    Sendil

  • How to capture an address change for a sale order in user exit MV45AFZZ?

    Hi ,
    My requirement is to capture the address change in sale order .
    I have to write the code in my own z-include in MV45AFZZ of SAPMV45A.
    Here I have to use VBAP-KUNNR for PARVW = ‘AG’ or ‘WE’. And  ADDR1_DATA.
    Could you please give me idea , how to capture the address change?
    Thanks ,
    Suresh.

    Farshid,
    As I understand it it is the RCS software that replaces the $Revision$ with $Revision: 1.2$. Is that correct?
    There are two things that you need to be aware of if this is the case.
    First, the length of the text fields are saved as part of the SystemBuild model file. This means that when the revision control software replaces the tag the length is no longer correct, and SystemBuild will not be able to load the file correctly. You can still change the text as long as you make sure the the length of the tag stays the same. For example if the version number is a single digit decimal then single digit, then when you create the file you could store the revision as $Revision: x.x$. When the tag gets replaced by the revision control software you would get
    $Revision: 1.2$ which is the same length.
    Next you need to be aware of potential line breaks. When the SystemBuild model is saved as ASCII then line breaks are added at regular intervals, so the tag might be broken up on two lines. This could prevent the revision control software from recognizing the tag. To prevent this save the file as binary.
    In short make sure that the text the revision control software adds is the same length as the text that it replaced and save the files as binary files.
    Carl L
    National Instruments
    www.ni.com/matrixx

  • VA01 - User Exit mv45afzz

    Dear All
    I have crated one validation for VBAK-VKBUR  (Sales office) field in VA01.  - MV45aFZZ
    In  FORM USEREXIT_FIELD_MODIFICATION.  section, I put the validation. 
    On error message, it come out of the session, 
    However, i want to stay in the same session and focus on filed VKBUR.
    my code as
          if <Conditon>
            MESSAGE 'error message here..!' TYPE 'E' DISPLAY LIKE 'S'.
          endif.
    I want the error message and control should stay on the same session.
    Your input will be helpful to me
    Regards,
    Venkat

    Hi,
    You can try as below.
         if <Conditon>
            MESSAGE 'error message here..!' TYPE 'S' DISPLAY LIKE 'E'.
          endif.
    Regards
    Gangadhar

  • Sales order split line user exit MV45AFZZ

    Hi Guys.
    Requirement is to split the sales order line items into multiple based on certain requirement. I Started coding in MV45AFZZ (USerexit_Save_Document_Prepare).  Basically what i am doing is looping at XVBAP and based on some condition inserting additional line in XVBAP and adding a new line with new UOM and incrementing the POSNR.). The data seems to be ok to me. But when i save i am getting update terminated error.  Can anyone help me out ?
    Thanks
    Vikram.

    Hi,
    Ary you using any 'COMMIT WORK' there?? If yes, that may cause this kind of error. Appending the records in XVBAP with mandatory fields should work.

  • Vendor user exit

    hi all,
                    while creation of vendor is under process, i want to catch the vendor number and use it accordingly to my requirement even before the vendor is created.
    i know this can be accomplished by user exits.but not sure, which user exit to use.
    i have used vendor user exit EXIT_SAPMF02K_001 initially.
    after i create a vendor and save it, the control goes to exit EXIT_SAPMF02K_001.by the time control comes out of this user exit,the vendor number is not yet generated by SAP.
    now,i want to use a vendor user exit,so that by the time  control reaches there, vendor number should have been generated.
    plz look at the steps.
    step1--->XK01(vendor creation).
    step2--->save.
    step3--->the control goes to EXIT_SAPMF02K_001, where code written according to requirement is executed.(the vendor number is not yet generated by SAP).
    step4--->the control comes out of EXIT_SAPMF02K_001 .
    step5--->the control comes to vendor exit EXIT_?????????_???.(the vendor number is generated by SAP,by the time control reaches here).here, i write code according to my further requirement by using vendor number generated by SAP,eventhough vendor has not been created yet.
    plz suggest me the correct vendor user exit for this purpose.i have used
    EXIT_RFKRRANZ_001 for this purpose, but it doesnt suit my requirement.
    thanks in advance,
    shivaa

    Hi Tamás ,
                     thanx for ur quick reply.     
    i had the same requirement while creating a sales order too.i have completed the task sucessfully.
    there i have used the user exit MV45AFZZ.
    plz see the following steps.
    step1--->VA01(salesorder creation).
    step2--->save.
    step3--->the control goes to form FORM USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ
    , where code written according to requirement is executed.(the salesorder number is not yet generated by SAP).
    step4--->the control comes out of FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    step5--->now,the control comes to FORM USEREXIT_SAVE_DOCUMENT in MV45AFZZ.
    (the salesdocument number is generated by SAP,by the time control reaches here).here, i write code according to further requirement by using salesdocument number generated by SAP,eventhough salesorder has not been created yet.
    can u plz check once again, and suggest me the vendor user exit for my requirement.
    plz its urgent.
    thanking u once again for ur reply.

Maybe you are looking for

  • For Next loop in allocations

    Request help in writing a allocation logic code. The current runs for 2600 Projects and 12000 customers. This causes memory issue and the code is aborted when run. Please suggest if this code can be run in a For/Next loop for each project.. *XDIM_MEM

  • Truncate, then reload causes ora-00001 unique constraint on apply side

    I setup schema level replication using the maintain_schema procedure. Its replicating DML and not DDL. I have a source side process that truncates a table then reloads it every day. Since DDL is not replicating, the reload produces generates an ora-0

  • Sending a default HTML page when email is blank

    How can I send a default HTML contents if HTML portion is blank in the email using JSP? I'm writing a JSP file where it emails To, from and with some HTML contents.

  • Cannot attach any file to any email from within Mail (6.2) in Mountain Lion (10.8.2)

    Everything was normal until 2 weeks ago, when suddenly I realized that photos from iPhoto do not appear in the body of the email as they used to. When I tried to attach a .doc or a .pdf, the result was the same. I sent an email with text and attachme

  • Can't Activate iMessage on MAC

    Hello! Since upgrading to Mavericks I have been unable to use iMessage on my Macbook pro early 2011. It gives me the error: "An error occurred during activation. Try again". I've been looking around for the past few days trying to fix my issue to no