Symptom
You have implemented Business Add-In (BAdI) CalculationProcedureForTaxes and are getting a dump or no response during ABSL script execution.
Environment
- SAP Business ByDesign
- SAP Cloud Applications Studio
Reproducing the Issue
Prerequisites:
- You have an AfterModify script that updates values relevant for Tax Calculation.
- You have retrieve, query or association calls during execution of CalculateTax ABSL script.
During normal business processes, the AfterModify is triggered.
Cause
In PDI framework, for any retrieve, query or association calls, MODIFY_FROM_BUFFER is always called for non-ESF2 Business Objects (BOs). The proxy buffer is independent of a particular BO and contains all the BO information provided to the buffer. Once the AfterModify determination call is over, it calls the MODIFY_FROM_BUFFER method again where it will read the changed data, modify this data and finally update the buffer after the modification is completed.
When a modification is pushed to the application before the modification is completely flushed, the BAdI CalculationProcedureForTaxes is triggered. Inside this BAdI, you have retrieve, query or navigate by association ABSL code for a BO calling the MODIFY_FROM_BUFFER. As the previous changes are still not updated in the buffer, it tries to send the same modification resulting in an update conflict.
This conflict between AfterModify and "within" modify (BAdI) is a limitation with the system architecture.
Resolution
Both these application exits cannot be used in parallel with the present system architecture. You need to make changes accordingly to ensure that you do not trigger CalculateTax from an AfterModify.
Keywords
PDI, SDK, MODIFY_FROM_BUFFER, buffer, CalculateTax, AfterModify, application exit, non-ESF2 , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem