cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Start routine vs Field level Routine-performance issue

former_member196080
Participant
0 Likes
738

Hi Experts,

I've scenario wherein I've to update 4 char fields by looking up DSO values in transformation.

Characteristics are A B C D

Info-objects A B C D mapping is available in DSO so before updating this value in cube for these IOS I need to look master data table for Sales Org text

Since I need to look at sales text , therefore I can not straightway read by rule type "read from DSO" because I need to match text first from text table with char IO A at DSO.

for this  I populated the internal tables with master data value and DSO values and have data ready at start routine level for all my transformation need.

The next step i've done is that ,in transformation at every rule type-I mean individual rule type(routine) for characteristics I'm using read statement to read internal tables for master data and DSO to update individual characteristics value based on matching.

Like for A separate read(2 read statements one for reading DSO and one for MD ) statements at individual rule type in transformation

for B  separate read(2 read statements one for reading DSO and one for MD ) statements at individual rule type in transformation

for C  separate read(2 read statements one for reading DSO and one for MD ) statements at individual rule type in transformation

for D   separate read(2 read statements one for reading DSO and one for MD ) statements at individual rule type in transformation

Now the thing is code is working fine but I realized the performance of the transformation degraded significantly.

So my question is ,Is this the right way to do this or is there any other way to achive good performance?

May be updating all the fields at once ,rather then, running  two read statements at one individual char routine in transformation for all chars?

Pls help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Rubane,

can you check as to where exactly its taking by Debugging...

Is it in the start Routine or is it in the Read. ? based on that we can optimize the code.

  • Are u doing Sorting of Records.
  • Are u doing binary Search.
  • Are u picking the data from P table of masters with Version as A.
  • Are u doing Select * or Select Single or Select Particular fields.

We can also check with an ABAPer and he should be able to ZERO in on the code issues.

We can also use it in the End routine..at records will be processed once for all.

rgds

SVU


Former Member
0 Likes

Hi,

Open the DTP log and observe where the load is taking time - is it in the start routine or in the field routines?

You can get a little improvement by moving the field routines into an End routine. That is also more maintainable.

I suspect some of your performance hit is due to the text lookup too. Try to see if there is a workaround which can avoid looking up based on text.

Regards,

Suhas

former_member196080
Participant
0 Likes

Hi Suhas,

it looks like the time its taking in rules ,transformation rules level.

can you give some examples ,how to do at end routine level that way it will be helpful?

Thx

Former Member
0 Likes

Hi,

Mainly you have to move the code from the field routine to the End routine.

For instance, in the End routine you'd write:

LOOP AT RESULT_PACKAGE ASSIGNING <result_fields>.

READ TABLE <<similar read stmt as the one currently used in the field routine>>

<result_fields>-fieldname = work_area_of_the_above_itab-fieldname.

ENDLOOP.