05-14-2013 7:10 AM
Dear Expert,
I am writing my code in user exit MV45AFZZ for T-code VA41 ( Contract Creation ). Now the thing is I want to hit the database table
on the basis of values I am getting in the user exit and I am getting 2 work areas at run time during enhancement being called in VA41 namely
vbak and
xvbak
Now I am confused that which work area should i use to fetch the entries from from the database table i.e. which work area's field should I pass in the database table to get the data from the table.
Please Guide..
05-14-2013 8:44 AM
Hi
See SAP Note 178328 - Problems due to incorrect user exits inv SD. XVBAK and YVBAK are defined as VBAKVB, and they are managed to control de change of documents. YVBAK is the data as in the data base, XVBAK after the changes by the user. Read carefully the recommendations by SAP in the note 178328.
I hope this helps you
Regards
Eduardo
05-14-2013 8:44 AM
Hi
See SAP Note 178328 - Problems due to incorrect user exits inv SD. XVBAK and YVBAK are defined as VBAKVB, and they are managed to control de change of documents. YVBAK is the data as in the data base, XVBAK after the changes by the user. Read carefully the recommendations by SAP in the note 178328.
I hope this helps you
Regards
Eduardo
05-14-2013 8:44 AM
Hi,
as per your requirement, most probably you should use work area VBAK. But the best thing would be to analyze the values populated in both the work areas during debugging when you execute your scenario.
It will give you a clear picture which work area you should use.
Regards
Manu B
05-14-2013 9:13 AM
Hi,
Let me give you a scenario to understand VBAK and XVBAK.
Suppose you have changed some thing in /va41 and click on SAVE, during save lets assume that enhancement MV45AFZZ is triggered.
In this case VBAK will have old data and XVBAK will have changed data at runtime which hasn't been saved into database yet.
Now check your requirement and take the decision, which table you should refer..VBAK or XVBAK.
05-14-2013 1:26 PM
Hi Mahesh,
As per my understanding
VBAK work area will have old data and XVBAK work area will have latest data entered by the user on the screen and which is not yet saved in the DB tables. Based on the requirement you can use which ever work area you need for fetching the data.
Thanks,
KC.