Skip to Content
0
Jun 13, 2022 at 11:02 AM

Delete and uploading serial numbers in Contract in User Exit

31 Views Last edit Jun 13, 2022 at 11:58 AM 3 rev

Hi,

After doing PGI, at user exit MV50AFZ1 (USEREXIT_SAVE_DOCUMENT_PREPARE) I need to delete a serial number from the contract and add one instead.

I am using SM SERNR_DEL_FROM_AU & SERNR_ADD_TO_AU (with SERIAL_LISTE_POST_AU after each one of them).

Because I don't want to use commit at the user exit, I cannot accomplish it.

Just the delete FM worked.

I thought to build a custom FM with 3 FM (SERNR_ADD_TO_AU & SERIAL_LISTE_POST_AU BAPI_transaction_commit) and call it in update task.

All the code happens within a loop, I am not sure if it will work.

I anyone faced a similar problem before (updating from user exit be two FM's)?

Thanks!

Eitan