cancel
Showing results for 
Search instead for 
Did you mean: 

How to update nast table from USEREXIT_SAVE_DOCUMENT_PREPARE ?

babu_gavi
Explorer
0 Kudos
878

Hi friends,

i want to update nast from USEREXIT_SAVE_DOCUMENT_PREPARE using FM :

RV_MESSAGE_UPDATE_SINGLE.

i. NAST not updating until and unless using the COMMIT WORK after FM. (in enhancements we cant use our own Commit Work ) .

ii. because of my commit work , some other tables also updating unwantedly.i want to avoid those.

help me on it any other way to do the update NAST from user exit.

Accepted Solutions (0)

Answers (1)

Answers (1)

rameez_khan
Active Participant
0 Kudos

Just call the code in exit without commit work. Later SAP's commit work will get triggered and your FM will be called in update task.

Also do you have any specific requirements to update table before sales order save ?

Can you please explain what are you trying to achieve.??

babu_gavi
Explorer
0 Kudos

Hi Rameez,

thanks For your response with good info.As per my requirement.

i want to send mail to customer whenever SO items status changed in VA02 transaction. and also have to update nast-vstat ( with value 1).because of that status only customer will come to know that mail was processed.

if i will not update the nast in exit, sap will update/create entry in nast with status 0 only.for email processed SO's nast-vstat should be 1 as per requirement.