cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle deleted records from source system

evgeniypotseluev
Explorer
0 Kudos

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_NR0REF_DOC_IT0AMOUNT
DOC001001150
DOC001002200
DOC001003250
DOC002001111
DOC002002222
DOC002003333

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_NR0REF_DOC_IT0AMOUNT
DOC001001500
DOC001003600

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I would suggest a self lookup in such a scenario. For the delta records which come a self lookup should be done on the same DSO for the Document no. The line which is not found should be updated with a flag D. And should be taken care in subsequent loads.


Regards,

Anupama

FCI
Active Contributor
0 Kudos

Hi Evgeniy,

Your scenarios will only worked if your dataSource always sends all the items of your document (even if only one item is modified).

Is it really the case ?

Regards,

Frederic

evgeniypotseluev
Explorer
0 Kudos

Hi Frederic.

In my case user can delete item, but cannot delete document. When user delete item, document change time is changed, so i can fetch only changed documents, then i need to delete changed document in adso and fetch again all items of it.

Former Member
0 Kudos

Hi,

What if for a document one line item is deleted and other items are not changed, then also do you get that document in delta?