cancel
Showing results for 
Search instead for 
Did you mean: 

delta update for deleted records

Former Member
0 Kudos

Hi,

I use delta update for my data. As destination I use ODS object and this ODS contains two keys: key1 and key2. On step of preparing data for extraction, key2 is lost(we can't determine it) - key1 is known only.

I'm finding a way how to update ODS by deleted records('D' update mode) if this records contain only key1 value(key2 is empty). I need to delete all records with key1 only, key2 is not important for this update.

Is it possible to set key2 some BW specific value, which will be accepted as equal for old key2 values ?

Or some other standart ways are known for this situation ?

Thanks in advance,

Fiodar.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I would use the update rules to read the active data table of the ODS. There you can read all the key2 values for a given key1.

If you get one row with key1 filled and key2 = '*' (for example you could split it into multiple records, one per key2. A sample coding might look like:


LOOP AT DATA_PACKAGE into l_d_data_package.
  IF key2 = '*'.
    DELETE DATA_PACKAGE.
    SELECT * FROM /BIC/AMY_ODS00 INTO l_d_my_ods
      WHERE key1 = l_d_data_package-key1.    
      l_d_data_package-key2 = l_d_my_ods-key2.
      append l_d_data_package to DATA_PACKAGE.  
    ENDSELECT.
  ENDIF.  
ENDLOOP.

Best regards

Dirk