Application Development and Automation 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: 
Read only

BAPI_QUALNOT_MODIFY_DATA

Former Member
0 Likes
1,419

I have a task where I am attempting to call BAPI_QUALNOT_MODIFY_DATA from USEREXIT_SAVE_DOCUMENT in SAPMV45A. I have 1 or more notifications associated with a line item and need to update the material on the notifucation header in some cases when the material number on the line item (vbap-matnr) changes. I am executing BAPI_QUALNOT_MODIFY_DATA and subsequently BAPI_QUALNOT_SAVE. Is there a way I can tell SAPMV45A to execute the BAPI_TRANSACTION_COMMIT? I don't think a should execute the BAPI_TRANSACTION_COMMIT from within USEREXIT_SAVE_DOCUMENT. Any advice how to do this?

4 REPLIES 4
Read only

jayesh_gupta
Active Participant
0 Likes
1,058

Hi,

You can use BAPI_TRANSACTION_COMMIT with Parameter WAIT = 'X' in the user exit. When WAIT parameter is set, COMMIT WORK takes place at the end of transaction.

For more details refer F1 Help for ABAP statement COMMIT WORK AND WAIT. The WAIT parameter of BAPI_TRANSACTION_COMMIT also does the same function.

Regards,

Jayesh

Read only

0 Likes
1,058

Thanks Jayesh for your response, but I don't believe you are correct in how the COMMIT WORK AND WAIT actually processes. The AND WAIT option does not delay the COMMIT WORK but instead prevents further processing of the subsequent code until all asynchronous processing of the update bapi is complete. Even so, I tried implementing the BAPI_TRANSACTION_COMMIT with the WAIT parameter = 'X'. The user exit code terminated at the COMMIT WORK AND WAIT command.

Read only

0 Likes
1,058

Acutally, I don't think this is a commit issue but rather an issue with BAPI_QUALNOT_MODIFY_DATA not doing the update. Has anyone tried changing the material number on the Service Notification Header? I am passing in NUMBER = 'Service Notification No.', NOTIFHEADER-MATERIAL = 'New Matnr" and NOTIFHEADER-MATERIAL_X-MATERIAL = 'X'. Are there certain instances where you cannot change the material number on a Service Notification? I am not getting anything in the Return parameter and my material is not being changed.

Read only

0 Likes
1,058

Applied SAP note 1351425 to resolve this issue.