cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VA01 payment terms input field value not getting retained in enhancement for transaction

kavmp49
Participant
0 Kudos
378

When creating order in VA01, we are entering payment terms in the input and when the enhancement MV45AFZZ is analyzed in the debugger, the value of the payment terms from the user input for the field vbkd-zterm is not getting retained. instead the sap master data value is getting populated in vbkd-zterm and processed. How do I get the user entered zterm value in my enhancement scope?

 

Thanks in advance!!

View Entire Topic
Lakshmipathi
SAP Champion
SAP Champion
0 Kudos

Right now your problem isn’t really “how to skip the overwrite” — it’s “how to even see what the user typed before the overwrite happens.” In VA01/VA02, the payment terms field (VBKD-ZTERM) is filled from partner master data during partner determination and header/item data population. That logic runs before most of the MV45AFZZ user exits, so by the time you hit your enhancement, the manual value is gone.

In order to capture the manual value, in USEREXIT_MOVE_FIELD_TO_VBKD (MV45AFZZ), you have both:

  • XVBKD = current values from the screen
  • YVBKD = old values before the change

If you place your logic before you call any master‑data overwrite, you can compare the code. The trick is to run this in a point where XVBKD still has the screen value.

I can recommend the below debugging tips to pinpoint the overwrite

  • In VA01, enter your manual ZTERM.
  • Set a breakpoint on VBKD-ZTERM in the debugger (watchpoint: when value changes).
  • Step through — you’ll see exactly which form/FM overwrites it (often VBKD_FUELLEN).
  • Place your capture logic just before that call in the flow.
kavmp49
Participant
0 Kudos
I have identified the form (vbdk-zterm_pruefen in SAPFV45K) where the value can be obtained from but the BADI I found at the scope was BADI_SD_SALES_ITEM which is available only for internal use. And could not find any other exit that can serve the required purpose to retain the zterm value. Can I use any other exit to export the variable to memory and later import the value in my MV45AFZZ enhancement? If so, what enhancement option can I use? Please provide your inputs! Thanks in advance