MV45AFZB User Exit; FORM userexit_check_vbap

Hi experts,
I have implemented a user exit in MV45AFZB, the requirement is that when I change the sales order quantity of a line item for example previous quantity is 2000 kg and I change it to current quantity 1000kg, during debug mode i need to know the previous quantity 2000kg of that particular sales order item I changed. I looked at YVBAP but it is empty. Any inputs is appreciated.
Thanks.

Hi Mawi,
For this function : you have enhancement spots. click on spiral icon, goto edit enhancement- show implesit enhancements
then cursor will take you some enhancement spots, here you can find for vbap_old and vbap_new structures.
if it is useful, points please.
Thank you
srinu

Similar Messages

  • User Exit "FORM USEREXIT_AVAILABILITY_IN" in RV03VFZZ

    Hello Experts,
    Is there a way to find out what global data (fields, variables) are available for me to view/change in this user exit?  I'm new to exits mods, please let me know how would I go about in getting this info.  Thanks.

    We can change other fields also and We can't change the field US_ATPPR as it is the importing parameter.
    For example:
    You can change any entry in the Internal table MDVEX which is the "Availability check result" internal table. 
    The flag US_ATPPR is kind of the Importing parameter to the Subroutine, not the CHANGING. You can use this flag to determine your course of action. Like
    * US_ATPPR: ATP or forecast check (if blank) 
    IF US_ATPPR is INITIAL.
    *  do something
    ELSE.
    *  do something
    ENDIF.
    Regards,
    Naimesh Patel

  • MV45AFZB  user exit

    Hi, All
    <b>we are using FORM USEREXIT_CHECK_VBAK USING US_DIALOG in MV45AFZB  to set incomplete status for a sales order if the credit card data is not maintianed, we are using for specific payment terms, the code is working and it sets the incomplete status but it is not updating VBUV table can any one help,
    here is the code</b>
    IF ( SY-TCODE  = 'VA01' OR SY-TCODE = 'VA02' ).
        IF XVBAK-VKORG = '1234'.
            IF XVBKD-ZTERM = 'O879'.
              IF (  XVBAK-RPLNR = '0' OR  XVBAK-RPLNR = SPACE ).
                  CLEAR XVBUV.
                  XVBUV-MANDT   = SY-MANDT.
                  XVBUV-VBELN   = XVBAK-VBELN.
                  XVBUV-TBNAM   = vbak
                  XVBUV-FDNAM   = RPLNR
                  XVBUV-FEHGR   = 'Q?'.( CONFIG)
                  XVBUV-STATG   = '04'.
                  XVBUV-UPDKZ   = 'X'.
                  APPEND XVBUV.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
    <b>THE CODE WORKS BUT VBUV IS NOT UPDATING EVEN AFTER THE SALES ORDER IS SAVED.</b>

    Hi,
    Welcome to SDN.
    Please try this.
    IF ( XVBAK-RPLNR = '0' OR XVBAK-RPLNR = SPACE ).
      CLEAR XVBUV.
      XVBUV-MANDT = SY-MANDT.
      XVBUV-VBELN = XVBAK-VBELN.
      XVBUV-TBNAM = vbak
      XVBUV-FDNAM = RPLNR
      XVBUV-FEHGR = 'Q?'.( CONFIG)
      XVBUV-STATG = '04'.
      XVBUV-UPDKZ = 'U'.                       "Change here
    APPEND XVBUV.
    ENDIF.
    Regards,
    Ferry Lianto

  • 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 to check whether chapter id for Material and Plant combination is maintained while creating sales order

    Hello all,
    my requirement is, system should give error message while creating sales order, if chapter ID is not maintained for a material and plant combination.
    please suggest the user exit.

    Hi
    CASE 1 : All Plants are excisable.
    In Material master , Foreign Trade data tab-  mentioned Control code field mandatory. ( i.e nothing but Chapter ID)
    CASE 2 : Few Plants are excisable
    In the Case 2 you need to go for Enhancement
    Program Name : MV45AFZB 
    User Exit:            USEREXIT_CHECK_VBAP ( Item Level Check )
    By using above user exit you write a logic with the help of ABAPer
    Plant and Chapter ID combination table : J_1IMTCHID

  • Change Confirmed Qty in Sales Order User exit/ATP User exit

    HI
    We have a requirement to change the ATP Qty for certain meterials & Order Types  duing sales Order User exit(FORM USEREXIT_MOVE_FIELD_TO_VBEP.? ) or ATP User exit.( ATP...OUT?).
    Is this ok to update the XVBEP in FORM USEREXIT_MOVE_FIELD_TO_VBEP of MV45AFZZ ?
    Our requirement will be like this, for one order type ZSAL( and for certain Materials)  we need to reserve 4 qty, if any order comes with 10 qty and the confimed qty is only 6( total available stock at present) , then we should only confirm  2 qty for the other order type( For Non ZSAL Order Type), and reserve the 4 QTY for ZSAL Order Type.
    If there are multiple schedule lines for an Item, we need to reduce the qty equally( as possible) from all schdule lines.
    i.e. date1 qty 4
         date2 qty 6,
    in  this case we should confirm  Date1 QTY 2, date2 qty 4, so that the remaining 4 will be reserved for ZSAL Order type.
    Whats the Best way to achieve this ?
    Edited by: agrud agrud on Sep 8, 2011 4:01 AM

    Hi Agrud,
    Did you check the possibilities with configuration.If it is not possible with configuration then you can use that exit.Before i used this but only to display not to change any thing.
    Regards,
    Madhu.

  • Need User Exits for Creation of Delivery and for Posting Goods Issue

    Hi,
    I need User Exits for
    Creation of Delivery
    Posting Goods Issue
    I need to make some checks regarding customer license expiration and if checks fail, I need to stop Creation of Delivery and Posting Goods Issue.
    Thanks in advance,
    Will reward,
    Mindaugas

    In the delivery you can use userexit USEREXIT_SAVE_DOCUMENT_PREPARE to make your checks and send an error message to the user in case they fail.
    You can find this user exit (form routine) in include MV50AFZ1.
    Hope that helps,
    Michael

  • Updating VBAP line information in user exit when using VA02

    HI All
      I am trying to update the values of VBAP-CHARG in user exit form USEREXIT_SAVE_DOCUMENT for all line items. But i am unable to update the values though it gets reflected in xvbap.
    Kindly help me in this.
    thanks and regards
    shilpa

    Hello Shilpa,
    At the point where this userexit is called the data has already been sent to the database (in update task) hence any changes you do to the internal tables are not reflected on the database. If you want to change the data of the internal tables e.g. xvbap use the userexit USEREXIT_SAVE_DOCUMENT_PREPARE instead. This is called before the data is posted.
    Regards,
    Michael

  • Raising error messages in user exit..

    hi,
    i have my code in sales order user exit FORM USEREXIT_SAVE_DOCUMENT.
    the code needs to check for a condition and if that fails i do not want to allow the user to save the sales order, rather do the change as i expect.
    i can display the message using my message class, right ? but then how to prevent further action of saving the sales order ?
    thks

    After you give the error message, set the FCODE to 'ENT1'.
    Like:
            message e398(00) with
                    'Some error occured. Press enter.'.
            fcode = 'ENT1'.
    Regards,
    Naimesh Patel

  • User exit at  MIGO transaction

    Hi experts, I hope your doing well,
    I am looking for an user exit in order to capture information at the good receipt level, for example at header text.
    and also,other user exit to capture information at the batch level (in this case I would like to link any batch with a number).
    Could you help me? in both cases in the MIGO transaction
    Thanks in advance,
    which of these?
    MBCF0002 Customer function exit: Segment text in material doc. item
    MBCF0005 Material document item for goods receipt/issue slip
    MBCF0006 Customer function for WBS element
    MBCF0007 Customer function exit: Updating a reservation
    MBCF0009 Filling the storage location field
    MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011 Read From RESB and RKPF For Print List in MB26
    MBCFC003 Maintenance of batch master data for goods movements
    MBCFC004 Maintenance of batch specifications for goods movements
    Ignacio

    Hi
    For batch level below are the exits
    User Exits
    Form CHARGE_VORSCHLAGEN
               Propose batch using CFC
              CUSTOMER-FUNCTION '010'
    Form UMCHARGE_VORSCHLAGEN
               Propose transfer batch using CFC
              CUSTOMER-FUNCTION '010'
    have tried the FM MIGO_CUST_FIELDS_GENERATE for own fields

  • Reg:user-exits

    hi to all ,
    iam new to user-exits.i had seen some user-exits.
    in which some are like FUNCTION EXIT_SAPMV45A_002,
    FORM USEREXIT_FIELD_MODIFICATION.so what is the difference between them
    are there any more exits.
    with regards
    satish

    Hi,
    1)
    For the FUNCTION EXIT_SAPMV45A_002, you require a project in CMOD with the enhancement in it..Then the project should be activated in order to execute the code give in the FM..
    For FM FUNCTION EXIT_SAPMV45A_002..You don't require an access key.
    2) For user exit FORM USEREXIT_FIELD_MODIFICATION. You don't require a project in CMOD..You require an access key to modify the program.
    Thanks,
    Naren

  • User exit prepare invoice

    Hi developers,
    I would like to create a new warning message ( type I ) which pops-up right before I fill-in an invoice (transaction VF01). The trigger is a check on a specific date (VBRK- FKDAT).
    I have found something similar to what I need, namely MV45AFZZ, but such a user exit controls sales’ orders.
    Do you know a user exit suitable for billing documents?
    Thank you
    Domenico

    Hello Domenico,
    Check out the user-exit, <b>'RV60AFZZ'</b> and <b>'RV60AFZC'.</b>
    The sequence of execution of both these user-exit forms are as follows:
    USEREXIT_FILL_VBRK_VBRP - INCLUDE RV60AFZC
    USEREXIT_NUMBER_RANGE_INV_DATE - INCLUDE RV60AFZC
    USEREXIT_PRICING_PREPARE_TKOMK - INCLUDE RV60AFZZ
    USEREXIT_PRICING_PREPARE_TKOMP - INCLUDE RV60AFZZ
    Regards,
    Gauravjit.
    Reward points if the solution is helpful

  • Why SAP has provided the VOFM routines even though we do have User-Exits?

    Hi Experts,
    Pls. let me clarify about,
    1) What is the difference between VOFM routines and User-Exits?
    2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
    3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
    thanq

    Do be careful about asking questions that sound like interview questions...
    > 1) What is the difference between VOFM routines and User-Exits?
    VOFM are type of user exit.
    >
    > 2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
    >
    Historical.  They were created before BADIs and CMOD user exits were invented.  The other "old" user exits in SD are the user exit forms.
    > 3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
    >
    Only SD.
    > thanq
    You're welcome.

  • User-exit in va01(real time problem)

    Hi Experts,
    suppose that while creating a sales order i have 4 material in it.
    now what i want that if the price(kbetr) of any material is below 50 then it should give a error message that 'price for this material is below 50' and that sales order can't be created.but if we delete that material from the sales order or there is no material whose value is less then 50 then we can save it.
    Please help me on this issue.which user-exit should i use for it.
    it give be much better if any one1 can provide me the code do it plus the name of the user-exit.
    please help me out its very urgent.
    necessary points will be awarded,
    Thanxs In Advance,

    i m trying to check the price for some conditions for every material. if any of the price is less then 50 Rs the it should gimme an error message that the SO can't be  created.
    i am writing code in this user-exit
      FORM USEREXIT_SAVE_DOCUMENT_PREPARE 
    and the code is
    data val type i.
      SELECT KNUMH  FROM A501 INTO WA_ITEM-KNUMH WHERE MATNR = VBAP-MATNR
                                                       AND   WERKS = VBAP-WERKS
                                                       and kschl = 'ZCPR'
                                                       and AUART_SD = vbak-AUART
                                                       and kunwe = vbak-kunnr.
           SELECT SINGLE kschl KBETR FROM KONp INTO (kschl ,KBETR ) WHERE KNUMH = WA_ITEM-KNUMH.
    val = kbetr / 100.
      CASE KSCHL.
        WHEN 'ZCPR'.
        if ( val >= 50 ).
          message 'sales order created' type 'S'.
        else.
        message 'sales order cant be created' type 'E'.
          endif.
        ENDCASE.
                ENDSELECT.
    but this is only checking for the last material only.
    what change should i make that it will check all material in the sales order instead of the last one

  • Default quantity on sales order - Via user-exit, Badi...

    Hallo everybody,
    do you know if it is possible to put a default quantity on a position of a sales order?
    That is: user insert material code, does not input any quantity --> default 1Pc..
    Thank you very much!
    Edited by: Mike Farina on Jan 6, 2008 8:38 PM
    Edited by: Mike Farina on Jan 6, 2008 8:57 PM
    Please help me.... points, points, points...

    Hi,
    In program MV45AFZZ use the user exit :
    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    there write simple code like this.
    IF vbap-kwmeng IS INITIAL.
    vbap-kwmeng = '1'.
    ENDIF.
    Rewards points if helpful.
    Regards,
    Srinivas Ch

Maybe you are looking for

  • How do install windows hard drive (from dead pc) into boot camp partition

    My Windows 7 desktop died recently, so I took the opportunity to buy a Mac Mini (latest version as of Feb 2012) as a replacement.  I want to transfer  the Windows 7 installation (from the dead PC) including all applications, accounts, settings, user

  • Problem using iTunes restore to transfer library to new PC

    I have used iTunes 8 to back up my entire library to 5 DVDs following the instructions at http://support.apple.com/kb/HT1382 When I insert the DVDs in my new PC I get the option in iTunes to restore from the DVD's - which I do. However about 50% of m

  • How do I duplicate a photo and move ONLY 1 copy to a new folder?

    I am going nuts. After making a duplicate version of photo, I want to move the copy to a different file such that the photo can be in 2 locations. i.e. one copy in the original location, and then 1 copy in a separate location to be used for another p

  • Fetching internal table values in a Form

    Hi, In a function module, in table interface i have declared a table. In source code this table gets values. In source code one perform statement is there. In that form, this table is not present. How can i get this table values in that form? Ezhil.

  • HTML document feedback to java

    hi, I am trying to load a HTML document into JEditorPane (for viewing only). The HTML document contains a TextField and a Button, is there a way to notify my application whenever the Button is pressed? Thank You!