I'm doing delta loads first to an ODS and then to an InfoCube. I was wondering if it's possible to insert new records in in the update routine (in the DATA_PACKAGE) in the update rules, between the ODS and the InfoCube, when the number of records are 0.
Or does the update routine never get executed when the number of records is equal to 0.
Thanks in advance,
How r u ?
Its a tough concept.... still i will place my idea....
I believe it is not possible to insert a new record into the data package,
-We could see any data package will come with this much number of records are in that particular data package.
-using a program it could be made possible to update the ODS tables and then try loading the deltas.
Data modification is possible, but Data addition ??? have to work on it man
+91 98403 47141
Here is an example of how to do it:
Though, the program will not go into the loop. You may just give values to the structure fields and append them to data_package.
As stated by Weidong, you can add records.
In this case, as soon as your Update Rule starts executing, use this type of COde:
data_package-infoobject = "Your Value:
You can add the above statement in a loop. Make sure the append data_package is within hte loop too.
If you have a particular code you need, ask us and we will provide it to you.
the rightsolution is creating a start routine with internal table to load and elaborate your data.
Check this example code
data: begin of data_package1 occurs 0.
include structure /BIC/.....
data: recno like sy-tabix,
end of data_package1.
$$ end of global - insert your declaration only before this line -
The follow definition is new in the BW3.x
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/......
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
data_package1 = DATA_PACKAGE.
LOOP at data_package1.
select * from /BI0/.....
where ..... = DATA_PACKAGE1-(field of interest)
and OBJVERS = 'A'.
Data_package1 = /BI0/(fieldof interest)
DATA_PACKAGE = data_package1.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
Hope it helps