Tuesday, February 16, 2016

Delta Management

Types of Delta

There are different types of delta available

ABR - Complete Delta with Deletion Flag Via Delta Queue
After Before Reverse - Here for every change, there is a Before and After image generated and deletions are captured in Reverse Image.
These can be loaded directly to a cube or DSO.
In cube it is only summation and here, for every change we get a -ve and +ve value.
An after image shows the status after the change, a before image shows the status before the change with a negative sign and the reverse image also shows the negative sign next to the record while indicating it for deletion

For say a quantity is 10 initially and loaded to cube, next time if it changes to 8, we get two records.
Record Mode | 'X' | Before image | -10
Record Mode | '  '  | After image | 8


AIE - After Images Via Extractor
Only the after images flow to BW. For the same example, when the change occurs only one record flows into BW
Value 8.
It cannot be loaded to cube directly as in cube there is only Summation and the value becomes 10+8 = 18.
These extractors need to have a DSO with 'overwrite' feature and 10 gets replaced with 8. There records can further be loaded to cube where dso generates before and after images for cube to handle.

RecordMode | ROCANCEL

ROCANCEL
This is a default field in all datasoures which work on delta - ABR.
Whenever a change occurs, system generates 2 records
ROCANCEL = 'X' -- Old record
ROCANCEL = ' '   -- New record
ROCANCEL = 'R  -- Deleted record

Mapping of ROCANCEL and 0RECORDMODE
For example, your PSA has one PO with 2 line items 10 and 20. Line 10 comes with a change , so there is 'X' record with Old values and ' ' record with  with New values. Line 20 is deleted in source, so Line 20 comes with 'R' image.

ROCANCEL is mapped to 0RECORDMODE in the DSO
This is mostly the way the mapping is done.
ROCANCEL is mapped to RECORDMODE in Technical Rule Group.
Once the DTP is run, you get the PO with 2 Lines - Line 10 with after image value and Line 20 with R to the NEW Data table.
When activated, only Line 10 is added to the DSO. Line 20 is deleted.

0RECORDMODE is blank constant.
Both PO Lines items flow to New Data and then up on activation both lines are available in DSO. you would not know that the entry is deleted in the source. 
In this scenario, what you are making RECORDMODE as BLANK , so when data is being loaded to the DSO, it does not know what kind of record you are loading to the DSO and treats all records as new records and just overwrites them.

0RECORDMODE = 'R'
This is used when you want to delete entries from DSO. If you want to do delete some data using transformation, make 0RECORDMODE = 'R'. So what ever record passes through the transformation is considered as Reverse Image and when loaded to the DSO and activated will get deleted.



Extra Notes : ROCANCEL | RECORDMODE


Pulling Delta to BW
Steps : 
  • Run the V3 jobs in the source ( Either manually / or the standard V3 jobs ). This is only for Queued Delta.
  • Check LBWQ entries. Once the V3 jobs run, all the data move from LBWQ to RSA7.
  • Run the infopackage to pull data from RSA7 to BW.
RSA7
As you know delta entries to BW are pulled from RSA7 queue. But, sometimes, even when changes are done in PE system, when you pull delta, the new changes donot get pulled to BW. Thats because, these changes didnot come to RSA7 yet.

LBWQ
When changes happen in the source system, they get written to LBWQ .The delta entries, for the datasources of mode 'Queued Delta' get accumulated in LBWQ of the corresponsing queue . Each application component has a different Q. Below is a picture of LBWQ tcode


LBWE V3 Jobs
The way data comes to LBWQ is that, there will be V3 jobs running in the system, which help move the data from LBWQ to RSA7.The V3 jobs are scheduled to run every 15 mins or 30 mins depending on the company. Along with the scheduled job, we can also run the V3 jobs directly from LBWE - Job Control. Below are the V3 jobs in the system.
 1  RMBWV311         
 2  RMBWV312         
 3  RMBWV313         
 4  RMBWV302           
 5  RMBWV303            


No comments:

Post a Comment