looking for a 'cancel and replace' update mode for an ODS

Question: I have read (almost) all the forum without finding an answer, so here is my question. We use BW 3.5, and we update an ODS from an external flat file.
In the flat file, we have 'order header' lines, followed by 'order items' lines (just like in R/3 tables).
When in the file an order is modified, and a line is suppressed, we need to have the ODS updated by having this same item line also suppressed....but we can't ...

First period :
Ext file contains
ORDER 1
ITEM 1
ITEM 2
ORDER2 .....

==> this is created in the ODS just the same whatever the update

Second period :
Ext file contains
ORDER 1
ITEM 1
ORDER2 .....

==> item 2 is still in the ODS, whatever the update method.

How can we have the item 2 automatically suppressed in the ODS ?

Thank you

eric

Answer:
The only way I can see is a full dump and reload of the ODS each time which means you have to reload all the orders - this is not really an option.

If you could pass in an indicator for the deleted item then you could use 0recordmode to delete the second item. For that to work you'd need to pass data like:

First period :
Ext file contains
ORDER 1
ITEM 1 ' '
ITEM 2 ' '
ORDER2 .....

==> this is created in the ODS just the same whatever the update

Second period :
Ext file contains
ORDER 1
ITEM 1 ' '
ITEM 2 'X' <<- pass this to 0RECORDMODE
ORDER2 .....

==> item 2 will be passed with the appropriate recordmode and the ODS will automatically delete that record from the ODS.

There is a BWExpert article that talks about recordmode and how to use it. The July/Aug '04 issue.

Design Better Custom Extractors for ODS Delta Loads
by Shreekant Shiralkar and Bharat Patel, BW Systems Managers, Bharat Petroleum, India

A better understanding of the role the "ROCANCEL" field plays in R/3 and the corresponding "0RECORDMODE" InfoObject in BW allows you to design better delta load solutions. The authors introduce "ROCANCEL" and "0RECORDMODE" and describe a custom extractor they created for processing these values.

Answer:
This may be possible using transparent table and abap logic. You need before image and after image, which you can create using transparent table.

1. Write a interface to load the file data to transparent table . The table should have a indicator flag. It is blank.
2. Load the data to ODS.
3. Next month, before loading the data to transparent table, update the flag to 'X' for all records for the order in the file, and update the flag to blank for the new record.
4. Now you have records with 'X' and blank for the order.

It should work .. is'nt it?

I have implemented a BW solution this way, but it should work.
give a try and let us know.

4. Update the flag to blank for
Copyright ?2007 - 2008 www.jt77.com