cancel
Showing results for 
Search instead for 
Did you mean: 

Routines Help

Former Member
0 Kudos

Hi,

I have his question in general for Update routines and Start routines....If in an update routine for a infoobject, i have to read from an external ODS table to find a value, do i have to first load the table in the Start routine??? what are the general steps to do this. For example- in the update routine for a date field, i am trying to find if there is a matching document number from the infopackage with new delta and an external ODS table \bic\AZXXX, then i get the date field from that ODS table and populate it into my infoobject......... ANy input will be appreciated please.........

Message was edited by: southie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Reading a table in a start routine to an internal table can help performance quite a bit for loads with a lot of transactions. By reading a table in a start routine to an internal table, a single DB query is run that accesses the DB and loads the data to an internal table in the server's memory.

An update rule that reads a DB table must run a DB query once for each transaction so for 100,000 transactions, that is 100,000 SQL queries that must be run, but if the data has already been loaded to an internal table by the start routine, it will be read from memory and avoid having to hit the DB.

If the transaction volume is very small, probably no big deal to just read th DB table in the Update rule. Another important consideration is how much data you need to load to the internal table. The internal table consumes server memory and if you try to load to much data to an internal table, the load will fail as the server will run of memory.

If you search on "internal table" in the BI or Basis forums you should get a few hits for sample code. Reading to an internal table is a very standard practice.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

My 2 cents:

To read active ODS data use /BIC/A<ODSNAME>00 table. For delta read a change log.

Best regards,

Eugene

Former Member
0 Kudos

Hi,

On basis of performance point:

1) Include <i>'my infoobject'</i> in the Communication structure also. But do not assign any field from DS to this in Transfer rules.

2) In start routine take the data from ODS table \bic\AZXXX, for all entries of data package, to an internal table.

3) Now, in the same routine find out the vlaue for <i>'my infoobject'</i> from the above internal table as you mentioned logic.And modify the Data package.Here you have to use loop statement on Data pacakge.

4) In update rule assign the cubes'<i>my infoobject</i> to Communication Structure's'<i>my infoobject</i>.

With rgds,

Anil Kumar Sharma .P

Kindly assign the points, if it helps you.

Former Member
0 Kudos

Hi southie,

ididn't get your problem properly.., can you explain a little briefly.., i will try to help out to you...

Regards

Swetha