Skip to Content
0
Apr 05, 2016 at 07:04 PM

How to handle deleted records from source system

466 Views

Hi there.

Give me please best practice how to handle delta, when some records are deleted in source system without using full load.

The basic case is:


I have first PSA req with such data:

0REF_DOC_NR 0REF_DOC_IT 0AMOUNT DOC001 001 150 DOC001 002 200 DOC001 003 250 DOC002 001 111 DOC002 002 222 DOC002 003 333

I load first request from psa to dso with the same structure (CHA are keys) then to cube.

Then customer delete item002 for doc001 in source system, delta extractor takes just changed doc001, so the second psa is:

0REF_DOC_NR 0REF_DOC_IT 0AMOUNT DOC001 001 500 DOC001 003 600

I want to update doc1 with new values, delete item 002 and save doc2

my solution is first to load second psa with recordmode 'd' to dso then to cube (it will delete doc1 from cube totally), then load psa directly to cube (it will add two items),

the second solution is to correct psa request: select all docs from psa, append it in startroutine with recordmode 'd' before records in psa and then load it to dso (it will delete all doc1 while activation), then to cube from change log.

the third solution is an abap program that compares 00 and 40 table in DSO, maintain records in 40 table and then load data to cube.

What is best practice to load data, when some records are deleted in source system?

Thank you a lot!