MB1A User Exit at document save

Hi everyone,
I have a requirement related to MB1A for materials distribution to personnel defined in HR. This can happen at line <Enter> press or at 'Document Save' time (either one is good, but could not get any to work). The requirements are:
- get all material quantities in all the lines of the document
- match the materials against a custom price table and get the total amount of the document
- compair the total amount with some value related to the person HR that receives the materials
- send a message to the user if the total amount is greater than the value
For this I tried MBCF0002 but here only get access to the current line item, not to all of them so I cannot get the total amount, only the line amount. I am aware about some other user exits but in none of them I could get a hold of all line items in the document before the document would be saved.
Do you know if there is a user exit where as parameters there are available all line items, or where can I find them, if I use MBCF0002?

Used MB_DOCUMENT_BADI but get an error using the described business logic.
The implementation text for MB_DOCUMENT_BEFORE_UPDATE method is:
(... some select from ztable and call for HR infotype, no insert or update...)
MESSAGE 'display text here' TYPE 'W'.
The problem is that user will see the message then try to modify the document lines. When trying this, he gets an ABAP error, message class M7, message number 372.
Checked the code in include MM07B9_BUCHEN_AUFBEREITEN in SAPMM07M program and found that this 'before_update' method is not supposed to be called more than once for some reason. In this case my business flow is broken (the request is to show the warning and then allow some modifications to the document, then check again).
Do you know of another user exit/badi that can help? For the workflow to function as requested, such a function should allow access to all document lines (not just a current line of the document line).

Similar Messages

  • How to find the ME29N 'USER EXIT' when our save the release PO after.

    How to find the ME29N 'USER EXIT' when our save the release PO after.
    which user exit will be used?
    thanks.
    alex.

    Hi,
      process :
        go to tranx code :   ME29N ,
           System---->Status , here copy the program name (SAPLMEGUI),
         go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
         tranx code : CMOD ,  Utilites--->Sap Enanchement,
                                         specify the package name : ME
                                          and execute, displays a list of exits ,
                                 and find out our suitable exit based on requirement.
    check these :   EXIT_SAPMM06E_021
    reg
    Siva

  • User Exit on the save of Billing document (VF01)

    Hello All,
    I have a requirement where in during the creation of a billing document of a particular type i need to put in a block to prevent the creation of a accounting document and call a workflow to remove the block in the Invoice.
    My requirement is that I require a user exit which is triggered on the save of the invoice document so that a call to the workflow can be done where in the runtime information of the document would be available in the workflow for further processing .
    Helpful answers would be rewarded.
    Thanks in Advance,
    Sowmya.

    Hi,
    USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ)
    The internal number range used in the standard system is specified in the billing type table and can be changed in this user exit. This user exit is only called when the billing documents is created.
    USEREXIT_ACCOUNT_PREP_KOMKCV (Module pool SAPLV60A, program RV60AFZZ)
    In this user exit additional fields for account determination that are not provided in the standard system are copied into communication structure KOMKCV (header fields).
    USEREXIT_ACCOUNT_PREP_KOMPCV (Module pool SAPLV60A)
    In this user exit additional fields for account determination that are not provided in the standard system are copied into communication structure KOMPCV (item fields).
    USEREXIT_NUMBER_RANGE_INV_DATE (Module pool SAPLV60A, program RV60AFZC)
    Depending on the number range, table TVFKD is used to set the billing date (country-specific requirments in Italy).
    USEREXIT_NUMBER_RANGE is automatically deactivated when this user exit is being applied.
    USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data.
    USEREXIT_PRINT_ITEM (Module pool SAPLV61A, program RV61AFZB)
    Printing the item line of a billing document can be supplemented or changed.
    USEREXIT_PRINT_HEAD (Modulpool SAPLV61A, Programm RV61AFZB)
    Printing the header line of a billing document can be supplemented or changed.
       Refer the help
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/frameset.htm
    Regards
    Kiran Sure

  • User exit VA41 at save document

    Hi Freinds,
    Im using VA41 tcode to create contract. Before saving the contract, i want to do some validation. Is there any user exit for VA41 at save document.
    Thanx
    RR

    Hi Rajiv,
    you can use the user exit USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in the include MV45AFZZ(use se38 to access this) to do your validation
    All VBAP details are available in XVBAP
    and all VBAK details are available in XVBAK
    Reward if helpful
    Regards
    Byju

  • USER EXIT / BADI on save VF01

    Hi,
    Do you know any user exit or BADI which triggers after save VF01 (Billing document), actually I need to modify the payment terms field in the VF01 while save.
    Used program RV60AFZC to modify payment terms field but it does triggers before save.
    <removed by moderator>
    Thanks,
    Srini
    Edited by: Thomas Zloch on Mar 2, 2011 3:24 PM - no promises, please

    Hi,
    There is an enhancement point in FM RV_INVOICE_DOCUMENT_ADD.
    "ENHANCEMENT-POINT rv_invoice_document_add_15 SPOTS es_saplv60a"
    You can check it once.
    You can try with BADI SD_CIN_LV60AU02.
    Thanks
    Arbind

  • FB70: User exit when the save button (for posting) has been click

    Hi ABAP Gurus,
    With regard to FB70, can anyone provide me the name of the user exit that will be triggered when the save button (for posting) has been clicked?
    Thanks!
    <b>
    Best Regards.
    Brando</b>

    Hello Brando,
    With FB70 I recommend you implement the user-exit via the Business Add-In (BADI) way and avoid SMOD exits if possible.
    The list below are the BADIs that are called by the <b>ECC6.0</b> system after you click the <b>Save</b> button to post a document. <u>They are listed in the order which they are called before the actual post</u>. You'll have to find the right one as per your requirement - you can view their definition via transaction SE18 then after you find the right one you need to use that definition to create an implementation via SE19. Here again, you'll have to choose the right method that suits your requirement. You'll find the method and class documentation in some cases with examples on how to implement, you need to write the code between the Method..EndMethod statement using the parameters provided by the Method.
    1. PPA_CUST_BADI
    2. FI_RES_ITEM_CURRENCY
    3. AC_QUANTITY_GET
    4. BADI_PRKNG_NO_UPDATE
    5. FM_POP_CORE
    6. FMRI
    7. FMRE_BUS_PROCESS
    8. FAGL_SET_SEGMENT
    9. EXIT_XFMPR1_001
    10. BUAVC_CHECK_RESTRICT
    11. UKM_R3_ACTIVATE
    12. CO_DOCUMENT_INFO
    I spent a bit of time debugging FB70 to find this info for you, please appreciate by rewarding points (or else
    Good luck.
    Cheers,
    Sougata.

  • User-Exit for document changes (status)

    Hi!
    I'm looking for an user-exit where I can check if the status of the document has been changed. Therefore I found the exit "EXIT_SAPLCV110_004" with the include "ZXCV110U04" which is triggered when a document (transaction CV02N) is saved. The problem is that there is no structure of the document provided so I cannot check the status of it! The interface if this exit is just
    FUNCTION EXIT_SAPLCV110_004.
    ""Lokale Schnittstelle:
    *" CHANGING
    *" REFERENCE(PFX_OKCODE) TYPE SY-UCOMM
    INCLUDE ZXCV110U04 .
    ENDFUNCTION.
    Is there another exit or how can I check if the status has changed for each document?
    Thanks,
    Konrad

    You can code in EXIT_SAPLCV00_001. Write your code in the program  ZXCV001U01. This has DRAW structure valeus and also DRAZ Item details.
    FUNCTION EXIT_SAPLCV00_001.
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_DRAW) LIKE  DRAW STRUCTURE  DRAW OPTIONAL
    *"             VALUE(I_OK_CODE) OPTIONAL
    *"             VALUE(SOURCEPATH) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(SOURCEFILE) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(TARGETPATH) LIKE  DRAW-FILEP OPTIONAL
    *"             VALUE(TARGETFILE) LIKE  DRAW-FILEP OPTIONAL
    *"       TABLES
    *"              I_INTDRAZ1 STRUCTURE  DRAZ OPTIONAL
    *"              I_INTDRAZ2 STRUCTURE  DRAZ OPTIONAL
    *"       EXCEPTIONS
    *"              ERROR
    INCLUDE ZXCV001U01 .
    ENDFUNCTION.
    Hope this will help you to check the conditions.

  • User exit for check/save/hold in Purchase order

    >The client requirement is like this :-
    >The client has development a Order Approval Form process and want the user to create all the purchase orders having value all inclusive value of Purchase order above Rs. 300000/-.
    >The user should not be able to save/hold/modify any purchase order above Rs. 300000/- in normal SAP through tcodes ME21N, ME22N, ME23N.
    >For this we need to use a user exit and flash an error message that PO value is above Rs. 300000/-, hence please process the purchase order in OAF.
    >Can any one please provide details of which user exit to use for the above scenario.
    >Thanks in advance
    >AJ

    BADi:ME_PROCESS_PO
    Method: PROCESS_HEADER
    PROCESS_ITEM
    Or
    BADi:ME_PROCESS_PO_CUST
    Method: PROCESS_HEADER
    PROCESS_ITEM
    Call your ABAPer to do the same.

  • User Exits for Document Info Record : CV01N in DMS

    Hi Experts
    My scenario is: We have Configured DMS in which new document type created Z01 is for MS word documents. I have assigned default Work Station Application : DOC to Z01 document type.
    But my problem is : while creating Info record : CV01n with Z01 document type during file creation system is showing default Application : DOC, But in help user can select either XL, or PPT instead of DOC.
    My requirement is : I need to restrict : other work station applications to the particular document type, i.e. for Z01 document type - allowed work Station Application is : DOC. System doesnot allow user to select other application instead of DOC.
    Where Can I Restrict ??  Is there any User Exits available to controle this function
    Please help
    Satish Babu

    Hi,
    Try these exits.
    CV000001            Check-in enhancement for document management
    CV110001            DMS: Enhancements for DMS Dialog (FB: CV110)
    CVDS0001            User exits for ALE DMS (DOCMAS)
    Hope this helps u.
    Thanks.

  • User exit / Badi on save of trip/receipt line

    Hi All,
    I am trying to find a user exit / BADI that is called when the user either accepts a line of a receipt within a trip or simply saves the trip in total (preferably the latter) and I have been unable to find it.
    Any ideas would be great,
    Thanks,
    Brenton.

    Hello
    In program SAPMWAKA (tcode WAK2) you will find routine MWAKAF03_CALL_PROMOTION_U in which fm PROMOTION_UPDATE is called.
    Within this fm you find at the end the coding:
    * BADI Aufruf
      PERFORM CALL_BADI_INTERF_PROM_UPD USING FXWAKHD.
    ENDFUNCTION.
    This routine check for implementation of BAdI WAKT_BADI_001. The BAdI method INTERFACE_PROMOTION_DATA is used to "Make Update Data Available to External Applications".
    In addition, you should look through the manyfold BAdIs and enhancement spots within package WAKT.
    Regards
      Uwe

  • User Exit/Badi on save of WAK2(retail promotions))

    Hi can anyone please tell me if there is any user exit or badi on save of WAK2 (retail promotions).I tried but i cant see any user exit or badi for same.

    Hello
    In program SAPMWAKA (tcode WAK2) you will find routine MWAKAF03_CALL_PROMOTION_U in which fm PROMOTION_UPDATE is called.
    Within this fm you find at the end the coding:
    * BADI Aufruf
      PERFORM CALL_BADI_INTERF_PROM_UPD USING FXWAKHD.
    ENDFUNCTION.
    This routine check for implementation of BAdI WAKT_BADI_001. The BAdI method INTERFACE_PROMOTION_DATA is used to "Make Update Data Available to External Applications".
    In addition, you should look through the manyfold BAdIs and enhancement spots within package WAKT.
    Regards
      Uwe

  • Need User Exit  for ML81N SAVE

    Scenario: Track employee id wise payments using SES ORDER field
    A.     To track employee Id in Service Entry Sheet (SES)
    Payments such as Mobile bill, OYC allowance is made against Service Purchase Order.
    1)      In SES, user will enter employee Id in field AUFNR i.e. Order.
    2)     Create z-table to maintain Expense GL A/c
    3)     While Save, get Service POu2019s GL A/c, validate in Z-table. If exists, then validate entered employee id.
    Is there any user exit which we can use while SAVING ML81N.

    Hi,
    I would advice you to use the user defined fields in table ESLL instead, like        
      ESLL-USERF1_NUM   User-Defined Field                                     
      ESLL-USERF2_NUM   User-Defined Field                                     
      ESLL-USERF1_TXT   User-Defined Field                                     
      ESLL-USERF2_TXT   User-Defined Field                                                                               
    and develop a custom solution with the help of customer enhancement          
    SRVDET.
    Regards,
    Edit

  • User exit at PO Save (ME21n)

    Hello,
    I want to change the valuation type of the Purchase Order item when I save a PO created via ME21n based on checks.
    For this which user exit should I use? I tried EXIT_SAPMM06E_013 of enhancement MM06E005. But that didnt help.
    I want a user exit which triggers when we save PO and should enable to change fields in item level. The saved PO should show the changed values.
    Any thoughts??
    Thanks
    CMV

    hi
    try
    ME_PURCHDOC_POSTED
    else
    LFM2_DB_STRG
    STOREGROUPING
    LUMER_BADI_ROUND_INT
    MD_STOCK_TRANSFER
    ME_TRIGGER_ATP
    CHECK_COBL_ADDON
    ME_COMMTMNT_PO_RELEV
    ME_COMMTMNT_PO_REL_C
    ME_COMMITMENT_STO_CH
    ADJUST_NET_DAYS
    BUAVC_CHECK_RESTRICT
    ME_CHECK_SOURCES
    ME_CHDOC_ACTIVE
    ADDRESS_UPDATE
    ME_PURCHDOC_POSTED
    EXTENSION_US_TAXES
    regards

  • User Exit for MIGO Save

    Hi Gurus,
    I am looking for user exit for MIGO transaction.  User exit should be given after saving the material document & I need this document number for carrying out some updations.
    regards,

    Hi
    You need to use the BAdi MB_DOCUMENT_BADI.
    This BAdi has two methods
    MB_DOCUMENT_BEFORE_UPDATE
    MB_DOCUMENT_UPDATE
    The method MB_DOCUMENT_BEFORE_UPDATE is called up before the FI document is created. This means that it is called up even if the program is terminated by an error during the subsequent processing. The update of data in separate tables should always be contained in function modules that are called up with the addition 'in update task'. This ensures that all the data is updated consistently.
    The method MB_DOCUMENT_UPDATE is not carried out until update. This means that all updates are carried out immediately in their own tables and do not have to be contained in 'update task' in function modules. For performance reasons, you should not re-read the tables or carry out any time-consuming routines at this point.
    You should always call up MB_DOCUMENT_BEFORE_UPDATE before MB_DOCUMENT_UPDATE, particularly if time is a critical factor when posting the material documents. The method MB_DOCUMENT_UPDATE is processed after the FI document numbers are called. As a result, no other FI documents can be posted until this document is completely updated.
    hope this helps...
    Thanks & Regards
    Kishore

  • User Exit on Material Save in MM01/MM02 (31I)

    Hi,
    Does anyone know of a user exit that gets triggered upon material save in MM01/MM02 in 31I? I see there is one exit MGA00001, but it is purely for checking the field values in 31I. The same exit has different interface in 46C version and can be used to update the material master data. I need to update the additional EANs (table MEAN) on the material master in 31I version.
    Thanks,
    Prayarna

    HI,
    Just execute this report , the input parameter for this report is the  transaction code,Enter the transaction code you will get the user exit available for the particular transaction.
    If you find my answer suitable pelase reward me with suitable points.
    REPORT Z_USEREXIT .
    TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    TABLES : 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 OBLIGATORY.
    SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
    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 = '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.
    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.
    Regards,
    Irfan Hussain

Maybe you are looking for

  • HP Mini 110-1013TU

    Greetings! I recently bought the mentioned netbook and have some hardware-related questions. S/N: CNU9253KQ5 P/N: VB703PA#UUF Does an 800Mhz RAM compatible with this unit? What is the motherboad of this unit, what is it's specs (the motherboard). I n

  • Using Chinese Characters?

    Good afternoon - I would like to use the Chinese characters found on the Mac with Illustrator, but when I type them in they just come up as regular Roman characters. How do I get the program to use the actual Chinese Glyphs? Thanks!

  • How to delete profiles?

    i only can create new profiles but how i can delete a profile (nokia x6) ? thank you friendly regards Solved! Go to Solution.

  • Help, cannot download software updates after HD erased!

    Hello community, Back story: I'm an ISM major, so I'm typically pretty good with computers. I've also played with some torrents and I understand the risks that come with them but I'm someone who does my research before downloading. Well, I have Leopa

  • Create installer file to install AIR and my application

    I want to create an installer file that will package the AIR runtime along with my AIR application and install both for the user.  I would also like this installer file to install the Java runtime and a Java application that my AIR app will interact