Skip to Content

SAVE OUT to overwrite UserExit

Hi Experts,

I am using a user exit (Move field to VBKD in MV45AFZZ) to default a field (lets say ZTERM) in table VBKD in Sales Order, which overwrites what is determined from Master data.

Because of this the user cannot overwrite what is defaulted by user exit. This user exit works only in create mode VA01. This doesnÂ’t work in VA02 change mode. Therefore if user wants to change this field, they have to save order and then go in change mode and change this zterm. This may lead to errors as user may forget to change zterm.

Is there anyway to handle this. Say if the data was entered by user then do not overwrite. Or any other user exit that is called before the screen appears and not called after hitting save.


- Ron

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jun 28, 2007 at 07:31 PM

    Rich: Yes I want to have flexibility to overwrite what User Exit fills in.

    I have checked w/ a breakpoint, this userexit is called 3 times

    1.Before we reach VA01 main screen

    2.when this field is changed and enter is hit

    3.when SAVE is hit.

    Seshu: As we are overwriting already before reaching the VA01 screen will the value be initial ? I dont; think so. Any thoughts on this ?

    Thanks !!

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Ron, I think you may need to set a global flag and check it, or set a value in session memory using EXPORT/IMPORT. Anyway, you need to set and check a flag.

      In this case, we are checking this global flag, and if it is intiial(meaning the first time) then set the default value which should override the material master setting, then next time thru, the default will not be set because the global_field is now set to "X". Make sence?

      if global_field = space.
        field = 'Default Value'.
        global_field = 'X'.


      RIch Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2007 at 02:41 PM

    check before passing the vdefault value -

    if the value is initial.

    then move


    do not move




    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 28, 2007 at 02:42 PM

    So the material master fills the field, then your user exit overwrites, then you want to allow the user to change it in VA01?


    RIch Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 28, 2007 at 09:23 PM

    Rich: Thanks for your idea. I have 2 more Qs on this.

    1. <i><b>if global_field = space.</b></i> Is this a SAP standard statement or we need to define this field or any other requirements for this field?

    2. Each time VA01 is used will this field global_field reset to space (initial)?

    If so then when first time this UE is called it will default (user exit fills in) and then we set it to X and user exit skips next 2 times in Va01.

    Thanks again for the info.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.