Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit MV45AFZZ

0 Kudos

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..

1 ACCEPTED SOLUTION

eduardo_hinojosa
Active Contributor
0 Kudos

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

4 REPLIES 4

eduardo_hinojosa
Active Contributor
0 Kudos

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

former_member209920
Active Participant
0 Kudos

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

former_member209119
Active Participant
0 Kudos

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.

0 Kudos

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.