08-08-2020 3:33 PM
Hi Gurus,
I have a requirement where we are hiring Employees using Decoupled Framework. The data load is huge and parallel processing is implemented. The employee is hired when all the incoming infotypes are successfully updated in buffer before calling the flush method. Every Pernr is mapped to a unique Identification in PA0185. Single Identification number cannot be assigned to two pernrs. So i have to issue an error message if new employee is to be hired with already saved identification number. Issue is when updating data in parallel batches if the same data is present in two batches/tasks and both data get updated successfully because select query on PA0185 does not return any record for both of new hires till the database commit is done.
Any idea how to resolve the issue.
08-10-2020 5:12 AM
You will need to move the (final) check of "whether to create a new record and the insert of that record" to an 'outer' function that knows it all. But it all might also depend on how you currently set up your parallel processes and how much you are willing to change those.
So, there are at least these three options:
If you want to find out more about the three options, read the following community threads, research the mentioned SAP functions and come back with further questions if you still have some:
08-09-2020 7:20 AM
As soon as one batch does a commit, the other batch which reads the updated tables reads the committed data (the up-to-date data). Exceptions:
08-10-2020 5:12 AM
You will need to move the (final) check of "whether to create a new record and the insert of that record" to an 'outer' function that knows it all. But it all might also depend on how you currently set up your parallel processes and how much you are willing to change those.
So, there are at least these three options:
If you want to find out more about the three options, read the following community threads, research the mentioned SAP functions and come back with further questions if you still have some:
08-10-2020 3:14 PM
Thanks Michael. This is very helpful . Will try out these option and update the post