We tried implementing a requirement to clear off the standard address fields that we were populating in contacts screen , on clearing off of the account field by system.
For this, we used method DO_PREPARE_OUTPUT of class
In this method, we are initializing(clearing off) the address fieldslike STREET, HOUSE_NO etc...during the next BOL modify call,
the method CL_BUIL_ADDRESS->MODIFY is called and here, we see that
above address fields have changed and hence the API BUPA_ADDRESS_CHANGE
is called and duplicates are again determined and added to the
collection. This happens everytime when the Contact screen is loaded
even if address details are not actually changed.
So when the next BOL modify is triggered (either during press of Enter
or change in other address fields) the duplicate result gets invalidatedand hence this exception of data incosistency.
If we bypass these statements , then this exception of data incosistency
does not occur.
Any alternatvie methods or approaches to achieve the same would be highly appreciated.