on 09-01-2020 4:50 PM
Hi All,
I have a requirement where I need to update a custom table while changing the sales order with latest CDHDR change number for the current performing changes in SO.
In order to achieve this , I have created an implicit enhancement at a place where CDHDR got updated with latest change number and i have called a custom function module to update my Custom table with the above latest change number in update task.
Query:
If in case , Sales order is changed and saved successfully but Custom table is not updated,
How to handle this scenario and also how to update the custom table with those missed entries ?.
Please let me know if this scenario be handled by any approach.
Did you check in SM13 for error during udpate, an update module MUST raise an Abort message in case of failure to trigger rollback.
UPDATE xxxxx FROM TABLE xxxxx.
IF NOT sy-subrc IS INITIAL.
MESSAGE a001 WITH 'XXXXX'.
ENDIF.
If you added your code in a V1 (SE37: Start immed) update module, then the error during insertion in your customer table would have rollbacked every change.
But, it seems you put your code in a change document module (CDHDR/CDPOS reference) Check if this one is a V2 (SE37: Start delayed) update module (as change document and statistics update modules are usually defined) In this case an error would not rollback updates from previously executed V1 update modules.
Hint: Look at online help for Error Handling for Bundled Updates
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since SO update & custom table update are happening in same UPDATE TASK, for any reason if custom table update fails, immediately RAISE same or similar EXCEPTION the FM which is updating the SO raises,so ALL (ztable & so) or NONE will be updated. UPDATE TASK will be aborted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.