cancel
Showing results for 
Search instead for 
Did you mean: 

How to process the delta records in SAP Datasphere?

Mandar_Damle
Participant
0 Kudos
368

Hello Experts,

How can the delta records be processed in SAP Datasphere?

E.g. I need to create a flag with a value = Y based on the sales order and the customer. So, there are two scenarios.

1. If the sales order is new then the flag is Y. If it is an existing sales order then we clear the flag.

2. If the sales order is an existing one but if the customer is changed, the flag is Y.

Now, in BW I can have the already loaded data into one internal table with the work area and check if the sales order is new/old or if the customer is changed or the same by looping the result_package and reading the internal table within the loop and then accordingly process the delta records with the appropriate flag value.

How do you achieve the same functionality in SAP Datasphere?

Above scenario in table form -

Sales OrderCustomerDateFlag 
SO1234C12347-Aug-24YNew Record
SO1234C12348-Aug-24 Clear Flag
SO1234C12349-Aug-24 Clear Flag
SO4567C45677-Aug-24YNew Record
SO4567C45678-Aug-24 Clear Flag
SO4567C23459-Aug-24YCustomer Changed so flag is Y

Thanks!

Regards,

Mandar Damle

View Entire Topic
Martin_Kuma
Active Participant

Hi Mandar, 

I would create new DSP "table" table, for the delta. Load always the new delta into the "delta" table.

Process the table with a SQL views where you join the "delta" table with the "main" table - the view joins the SOs, and the matches will be unflagged. Create a second view with almost the same logic, but you join SOs and Customers. This way you re-flag the second condition. 

but, ... why do you need this? You could use ODP and thus have delta generated for you. Depends on the CDS view you are using of course. If it supports delta (generic or CDC)

IF it is full only, you can create generic-like delta in DSP: https://community.sap.com/t5/technology-blogs-by-members/sap-datasphere-delta-extraction/ba-p/136993...

 

Cheers,

Martin

Mandar_Damle
Participant
0 Kudos
Hello Martin, I understood the logic you have mentioned. It is not complex but seems a bit lengthier compared to BW. Nonetheless thanks for detailing it out! Moreover, the source is CDS view with delta enabled so it is not an issue, but flag should be created; considering the data loaded in the past. So, it can be done only on DSP side and not in the CDS view. Thanks again for your quick response! Regards, Mandar Damle