US 12,229,112 B2
Efficiently managing changes to master data
Satish Kumar Kara, Bangalore (IN)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Apr. 28, 2022, as Appl. No. 17/732,168.
Prior Publication US 2023/0350871 A1, Nov. 2, 2023
Int. Cl. G06F 7/00 (2006.01); G06F 16/23 (2019.01); G06F 16/242 (2019.01); G06F 16/2453 (2019.01); G06F 17/00 (2019.01)
CPC G06F 16/2365 (2019.01) [G06F 16/2358 (2019.01); G06F 16/2379 (2019.01); G06F 16/242 (2019.01); G06F 16/24532 (2019.01)] 17 Claims
OG exemplary drawing
 
1. A non-transitory machine-readable medium storing a program executable by at least one processing unit of a device, the program comprising sets of instructions for:
receiving an update comprising a set of entities for updating a set of master data stored on a set of storages, wherein the set of master data comprises data corresponding to one or more business entities shared across a plurality of applications, the set of storages not storing transactional application data for the plurality of applications, the update comprising one or more parent entities associated with one or more child entities, wherein child entities are stored in separate tables than the parent entities, and wherein each child entity has only one parent entity;
determining, for each parent entity in the set of entities in the update, whether the parent entity and one or more child entities of each parent entity in the update exists in the set of master data stored on the set of storages by:
generating a single query for determining, for each parent entity in the set of entities in the update, whether the parent entity exists in the set of master data stored on the set of storages,
executing the single query to retrieve a result set for the single query from the set of storages, and
based on the result set for the single query, indicating, for each parent entity in the set of entities in the update, whether to update the parent entity using an update operation or using an insert operation,
based on the determinations, modifying the set of master data stored on the set of storages with the set of entities, the modifying comprising
wherein when a particular parent entity in the update does not exist in the set of data stores, generating and executing a first set of queries to insert the particular parent entity and one or more particular child entities of the particular parent entity to the set of storages, and
wherein when a particular parent entity in the update does exist, the single query compares a first value associated with the particular parent entity in the update with a second value associated with the particular parent entity in the set of storages,
wherein when the first and second values differ, generating and executing a second set of queries for updating each parent entity in the set of entities in the set of master data stored on the set of storages, and when the first value is a same value as the second value, the first value is ignored and no update is performed.