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

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

  • Use CREATE_TEXT on VA01 user exits

    Hi,
    I need to write item text using FM CREATE_TEXT in VA01 user exits. The FM required VBELN and I don't have when creating order.
    How can I create item text in VA01 user exits ?
    Thanks,
    Quincy

    Hi,
    i have a similar requirement where i need to copy custom populated fields of vbap table into item->text->item notes tab.
    i tried with both create_text and save_text. but i couldn't see the item in the item->texts->item notes.
    here is my code:
    CONCATENATE vbap-zzrelid vbap-zzsorg2 vbap-zzsorg3
                  vbap-zzsorg4 vbap-zzsorg5 vbap-zzsorg6
                  vbap-zzsorg7 vbap-zzsorg8 vbap-zzsorg9
                  vbap-zzsorg10 INTO gt_textname.
      gt_textobject-tdid  = c_0002.
      gt_textobject-tdname     = gt_textname.
    gt_textobject-tdobject   = c_vbbp.
      gt_textobject-tdspras    = sy-langu.
      APPEND gt_textobject.
      CONCATENATE 'relationship Owner:' vbap-zzrelid INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 2 :' vbap-zzsorg2 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 3 :' vbap-zzsorg3 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 4 :' vbap-zzsorg4 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 5 :' vbap-zzsorg5 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 6 :' vbap-zzsorg6 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 7 :' vbap-zzsorg7 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 8 :' vbap-zzsorg8 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 9 :' vbap-zzsorg9 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
      CONCATENATE 'sales org 10 :' vbap-zzsorg10 INTO gt_text-tdline
      SEPARATED BY space.
      APPEND gt_text.
    CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            header          = gt_textobject
            savemode_direct = 'X'
          TABLES
            lines    = gt_text
          EXCEPTIONS
            id       = 1
            language = 2
            name     = 3
            object   = 4
            OTHERS   = 5.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    kindly resolve the problem with the above code.
    Thanks,
    Preethi.

  • 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

  • VA01 user exit at line item with partner address

    I need a user exit for VA01 that is at the line item level.  The catch is I also need access to the partner address data.  I have found userexit_pricing_prepare_tkomk (include MV45AFZZ) but that doesn't give you the "instance" address information (the address data that is specific to that order, after being changed).  It only gives you the address number for the partner's default address.
    Does anybody know if such an exit exists?
    Regards,
    Aaron

    Hi Aaron,
    I had a similar requirement Long back & This was my code I written. Hope this helps you.
    *  Extract and Update field for partner-id - Goods Supplying vendor
      CLEAR TKOMK-Y_GSVN.
      PERFORM XVBPA_LESEN(SAPFV45K) USING 'WL'  VBAP-POSNR SY-TABIX.
      IF XVBPA-UPDKZ <> 'D'.
        TKOMK-Y_GSVN = XVBPA-LIFNR.
      ENDIF.
      PERFORM XVBPA_LESEN(SAPFV45K) USING 'ZP'  VBAP-POSNR SY-TABIX.
      IF XVBPA-UPDKZ <> 'D'.
        TKOMK-BSART = 'ZIN'.
        SELECT SINGLE LAND1 FROM LFA1 INTO TKOMK-Y_COMM_CTY  WHERE LIFNR = XVBPA-LIFNR.
      ENDIF.
    FORM XVBPA_LESEN USING US_PARVW US_POSNR US_TABIX.
    DATA: DA_VBADR   TYPE   VBADR.
    DATA: DA_VBPA    LIKE   XVBPA.
    CLEAR DA_VBPA.
    READ TABLE XVBPA INDEX 1 INTO DA_VBPA TRANSPORTING VBELN.
    XVBPAKEY-MANDT = VBAK-MANDT.
    XVBPAKEY-VBELN = DA_VBPA-VBELN.
    XVBPAKEY-PARVW = US_PARVW.
    XVBPAKEY-POSNR = US_POSNR.
    READ TABLE XVBPA WITH KEY XVBPAKEY.
    IF SY-SUBRC > 0.
       XVBPAKEY-POSNR = POSNR_LOW.
       READ TABLE XVBPA WITH KEY XVBPAKEY.
    ENDIF.
    IF SY-SUBRC > 0.
      CLEAR XVBPA.
      IF  US_PARVW = 'WE'.
        CLEAR KUWEV.
      ENDIF.
      IF  US_PARVW = 'RG'.
        CLEAR KURGV.
      ENDIF.
    ENDIF.
    US_TABIX = SY-TABIX.
    * CAM is not activated
    IF ZAV_FLAG IS INITIAL.
      IF NOT XVBPA-ADRNR IS INITIAL.
        CLEAR XVBADR.
        XVBADR-ADRNR = XVBPA-ADRNR.
        READ TABLE XVBADR.
        IF SY-SUBRC > 0.
          CLEAR XVBADR.
        ENDIF.
      ENDIF.
    * CAM is activated
      ELSE.
    *if there is an address
        IF NOT XVBPA-ADRNR IS INITIAL.
    *clear address data
          CLEAR XVBADR.
    *try to read address in internal table XVBADR
          READ TABLE XVBADR WITH KEY ADRNR = XVBPA-ADRNR  ADRNP = XVBPA-ADRNP.
    *if address is not in internal table XVBADR
          IF SY-SUBRC NE 0.
    *read address in CAM tables
       CALL FUNCTION 'SD_ADDRESS_GET'
          EXPORTING
            FIF_ADDRESS_NUMBER    = XVBPA-ADRNR
            FIF_PERSONAL_NUMBER   = XVBPA-ADRNP
            FIF_ADDRESS_INDICATOR = XVBPA-ADRDA
          IMPORTING
            FES_ADDRESS           = DA_VBADR
          EXCEPTIONS
            OTHERS                = 4.
            IF SY-SUBRC EQ 0.
              MOVE-CORRESPONDING DA_VBADR TO XVBADR.
              APPEND XVBADR.
            ELSE.
              CLEAR XVBADR.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.
    Thanks & Regards,
    Dileep .C

  • Calling a screen in VA01 user exits

    hi friends,
    based on certain condition i neet to call custom module pool program from SD user exits in VA01.
    Please suggest.. Pop up with values as in table control will also be OK..
    thanks

    Hi,
    You need to create a custom module pool and call its screen on a suitable place. It is not clear what exactly is your problem.
    There are more possibilities:
    1.) You do not know how to create a module-pool
    2.) You do not know how to call its screen in popup
    3.) You do not know where to place your code for calling your screen
    Solutions:
    1.) Check chapter Dialog Programs: Overview in [BC - ABAP Programming|http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCABA/BCABA.pdf]
    2.) Check chapter Calling Modal Dialog Boxes in [BC - ABAP Programming|http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCABA/BCABA.pdf]
    3.) Look at subroutines in include MV45AFZZ and find the one that You are looking for. You can also check [User Exits In Sales Document Processing|http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm]
    If You need something more, be more specific.
    Regards,
    Adrian

  • VA01 User exit

    Hi
    I have requirement to load values from a certain custom table into Sales Order Header & item data additional screens when I create the order by reference to quotation...
    So for this reason I need to find a User Exit or BADI which will trigger before I enter into VA01 screen or after I click the create with reference button...
    I was able to find the BADI BADI_SD_SALES_ITEM but it cannot modify the fields of VBAP
    Please help me find the user exit which can modify the fields of VBAK and VBAP...

    Grame,
    than you can use Include(Exit)MV45AFZZ and form
    FORM USEREXIT_MOVE_FIELD_TO_VBAK      
    and
    FORM USEREXIT_MOVE_FIELD_TO_VBAP
    code should be like in above perform:
    vbak-zzfield = xxxx-zzfield2.
    VBAP-zzfield = xxxx-zzfield2.
    Amit.

  • VA01 user-exit to modify net price of line item...

    Hello Experts,
    Is there a user-exit to modify the net price value of a line item upon 'ENTERING' in
    VA01 transaction?
    Hope you can help me guys. Thank you and take care!

    Hi,
    The user exits and badis for va01 tcode:
    Enhancement/ Business Add-in Description
    Enhancement
    V45L0001
    SD component supplier processing (customer enhancements)
    V45E0002
    Data transfer in procurement elements (PRreq., assembly)
    V45E0001
    Update the purchase order from the sales order
    V45A0004
    Copy packing proposal
    V45A0003
    Collector for customer function modulpool MV45A
    V45A0002
    Predefine sold-to party in sales document
    V45A0001
    Determine alternative articles for product selection
    SDTRM001
    Reschedule schedule lines without a new ATP check
    V60F0001
    SD Billing plan (customer enhancement) diff. to billing plan
    V46H0001
    SD Customer functions for resource-related billing
    V45W0001
    SD Service Management: Forward Contract Data to Item
    V45S0004
    Effectivity type in sales order
    V45S0003
    RP-relevance for incomplete configuration
    V45S0001
    Update sales document from configuration
    V45P0001
    SD customer function for cross-company code sales
    Business Add-in
    BADI_SD_SCH_GETWAGFZ
    Scheduling Agreement: Read WAGFZ from S073
    BADI_SD_V46H0001
    SD Customer functions for resource-related billing
    Pls. reward if useful...

  • Doubt In VA01 User Exit........

    Hi,
            we are using <b>sap4.7.</b> In VA01 ( sales Order ) we have a tab called <b>additional data B</b>. where we can write our own user exit coding.
             my doubt is where can i find <b>user exit</b> <b>enhancement</b>. i tried in <b>smod t.code</b> but i am not able to find. can any one tell me the enhancement name if you already done.
    thank you,
    Regards,
    Saravanan.

    Check out this documentation.....
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    Under user exits>user exits in sales>user exits in sales document processing
    Regards,
    Rich Heilman

  • 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

  • VA01 user exit , update value

    hi..
    I need to copy a value in header to, item level, that is after highlighting the lineitem goto --> item --> more functions --> additional data A --> Material Grp 4
    this should occur at the sales order creation stage..
    I tried in USEREXIT_SAVE_DOCUMENT the following but this doesn't seem to work.. Any ideas pls ? thanks
    loop at xvbap.
    xvbap-mvgr4 = vbak-j_3akvgr7.
    modify xvbap.
    endloop.

    Hi,
    U'll get all user exits in MV45AFZZ.
    try USEREXIT_FIELD_MODIFICATION .
    I've used it to modify some fields & its working.

  • 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

Maybe you are looking for

  • Once in a while motor spins fast unable to find index

    The problem with my motion controller is that sometimes can not find home/index  My theory is that if home count is only one count behind the current count  motor goes forward and winds up very fast for about 360 degrees and after that motor drive ge

  • Acrobat 8.0 Pro

    Printer Advanced settings missing color management option. What happened and how do we get it back? Desperate - Thanks

  • HT2305 Apple Software Update

    I have an apple software update, it will not open at all, wont uninstall, wont repair nothing, what do i do because i cant even download it again as you have no options to do so, i need to install iTunes but it wont install without the apple software

  • Error -5000 and Importing

    First off, how in the world do you import a video with this software? I've never been more frustrated. I'm starting with .3g2 files (from my phone), and I've tried converting to H.264 MP4 and M4V files and converting to DV from Quicktime Pro. iMovie

  • HP Photosmart D7160

    I bought an HP photosmart D7160 a week and a half ago. There is no driver for it--it isn't in the list of drivers that come with macbooks, the one on the cd doesn't work. HP has support for macs that is about as helpful as trying to solve an algebra