Skip to Content

How to handle deleted records from source system

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!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Apr 08, 2016 at 03:46 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 22, 2016 at 04:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded