Efficient update rule / start routines

Question: Hello All,

I've got what for good ABAPers will be a very easy question.

In some update rules for an infocube, I am reading the contents of a master data table. Unfortunately, the read isn't a straightforward "pick-up" of a master data attribute (i.e using option "Master data attribute of...". The fill is dependent on what is in my communication. Not a problem.

But, I have a couple of questions.

1. The master data table has about 100,000 entries. Would it be sensible to pass the contents of the master data table into an internal table and read from there?

2. The InfoObject I am reading from is compounded. So it has a key. What is the best code to use in order to recognise this key? For example, if I was reading the 0COSTCENTER master data table, how would I best use the 0CO_AREA (compunded) key.

Thanks and regards

Webster

Answer:
Hi,

The question of buffering data in internal tables or reading the database directly is a tradeoff between performance, complexity and managability. Reading a master data table into an internal table with a hashed index takes only a moment and will perform better. However, more coding is required and the more complex solution makes it harder to maintain.

An alternative is to use the standard function module RSAU_READ_MASTERDATA. As far as I remeber it creates an internal table with hashed indexes automatically and thereby gives you better performance than repeated select statements against the database.

Regarding the combination of the compounds, use concatenate.

I hope these comments helped.

Cheers

bonde
_________________
______________________________
Jorgen Bonde Rasmussen
jbrasmussen@mail.dk

Answer:
Thank very much for this - very helpful.

Excuse the stupid question, but how would I use the concatenation?

Suppose I am reading from the cost center table, how would I concatenate the controlling area. Would it be:

concatenate /BI0/MCOSTCENTER-co_area /BI0/MCOSTCENTER-costcenter WA_COMP ??

And, if so, how do I then fill my internal table / use the concatenated object to read the right record (quickly).

Apologies again.

Webster
Copyright ?2007 - 2008 www.jt77.com