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: 

Update reason for rejection filed at item level while saving in VA01

Former Member
0 Kudos

Dear Experts,


I need to update reason for rejection field (VBAP-ABGRU) while saving sales order in VA01 tcode.

For this i implemented user exit  (USEREXIT_SAVE_DOCUMENT in include MV45AFZZ)  .

This code is implemented in SAP EHP 7.

Code is below :

IF SY-TCODE EQ 'VA01'.

loop at xvbap into fs_vbap.
fs_vbap
-abgru = 'Z1'.

MODIFY xvbap FROM fs_vbap TRANSPORTING ABGRU

endloop.

It is updating in xvbap table but it is not updating in VBAP table.

The same code i implemented in sap EHP4 version it is working fine,

What is the problem in ehp7 and please help me in this.



1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Arun,

If you want to update any fields(means changing) , it has to be done in exit USEREXIT_SAVE_DOCUMENT_PREPARE. The changes you make in USEREXIT_SAVE_DOCUMENT wont reflect in table.

So , once try with USEREXIT_SAVE_DOCUMENT_PREPARE and let me know.

Regards,

CA

2 REPLIES 2

Former Member
0 Kudos

Hi Arun,

If you want to update any fields(means changing) , it has to be done in exit USEREXIT_SAVE_DOCUMENT_PREPARE. The changes you make in USEREXIT_SAVE_DOCUMENT wont reflect in table.

So , once try with USEREXIT_SAVE_DOCUMENT_PREPARE and let me know.

Regards,

CA

kabil_g
Active Participant
0 Kudos

Try these

Declare

   data:wa_vbap TYPE vbap.



wa_vbap-abgru = 'Z1'.

MODIFY vbap FROM wa_vbap TRANSPORTING ABGRU.