Wednesday, March 18, 2020

DTP reads different data than LISTCUBE

I came across a situation when DTP I created was pulling different data set comparing to t-code LISTCUBE. I wanted to validate data that the DTP was pulling as source for my custom ABAP login in BW transformation. To do this I opened t-code LISTCUBE and entered a same selection as my DTP’s filter was using. To my surprise, I got different data sets in the DTP and in the LISTCUBE. I started to debug the load and found out even more odd thing. In one of master data characteristics used in the source of the DTP, the data was not populated in none of the records pulled by the DTP. Whereas in the LISTCUBE the same characteristics the data was populated.

First thing that I tried was to run some tests for the affected characteristics in t-code RSRV. In particular, it was test called “Compare size of P tables/Q tables with X tables/Y tables” which can be found under All Elementary Tests -> Master Data. Error that was detected by this test was following:

15:00:06 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: Tables /BIC/PRZZZ, /BIC/XRZZZ are not consistent: 50.004 deviation(s)
15:00:06 on 17.03.2020: Test run for user XXX completed


From the error, it was obvious that I have inconsistencies between P (Master Data Table) and X (Attribute SID Table) table of master data characteristics (RZZZ). In fact, in the P table, there were records but there were no records in X table of the characteristics. I tried to use “Correct Error” function available in the RSTV t-code however; it was not possible to repair the error.  

Second thing I tired was ABAP program RSDMD_CHECKPRG_ALL. There are couple of tests available in this program. Most of them are available as well in the RSRV. As this program has also REPAIR function, I tried to apply it. 


However, I was again unsuccessful with it. The program when it ran on foreground dumped and while running on background there was following error:   

Message text                                                                                            
Error in BW:
Characteristic RZZZ: Checking all SID values in the X and Y table
Characteristic RZZZ: Checking table /BIC/XRZZZ
Characteristic RZZZ: Checking consistency between tables /BIC/XRZZZ and /BIC/PRZZZ
Characteristic RZZZ: Errors found during this test
Characteristic RZZZ: 1.403.304 values from table /BIC/PRZZZ do not exist in table /BIC/XRZZZ
Characteristic RZZZ: Following data records have errors (max 50 displayed):
             Characteristic RZZZ: Checking SID values for characteristic/attribute RZZZ


Question remained. How to fill X table - attribute SID table of the IO? In the t-code RSD1 – Characteristics maintenance there is one option. It is available via menu Extras ->Database Table -> Fill Attribute SID Table. While running this the X table was populated and tests in the RSRV or in the RSDMD_CHECKPRG_ALL report were positive w/o any issues. The functionality “Fill Attribute SID Table” available in RSD1 is also available via FM RSDRX_FILL_INITIAL_XYTABLE. Once all corrected my DTP was puling same data set as the LISTCUBE and data values in specific characteristics were not missing any more in the load.

20:35:34 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: No errors found in this test
20:35:34 on 17.03.2020: Test run for user XXX completed
20:36:41 o'clock on 17.03.2020: Start test run for user XXX
Compare sizes of P or Q and X or Y tables for characteristic RZZZ
Characteristic RZZZ: Consistency check between P and X, Q and Y tables
Characteristic RZZZ: No errors found in this test
Compare characteristic values in SID/P/and Q tables for characteristic RZZZ
Characteristic RZZZ: Check for all values existing in P, Q and SID tables
Characteristic RZZZ: No errors found in this test
20:36:41 on 17.03.2020: Test run for user XXX completed

No comments: