Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Start routine in update rules

Hi friends. I need your help. I have got two ODS. The first ODS_1 has planning data of material from R/3 only, and the second ODS_2 has planning data of material from flat files and gets some positions from the ODS_1. However, I must change several position of some materials and sum their quantities from ODS_1 for one (defined in the correspondence table). I do it in start routine in update rule.

for example:

-


extractor SAP R/3 > infopackages

-


> ODS_1:

kraftliner_1 = 10

kraftliner_2 = 20

kraftliner_3 = 30

-


infopackages >

-


ODS_2:

kraftliner = 60

Now about the problem. If the size of package is large (greater then defined in tr. RSCUSTV6) then it will be divided into several packages. In this case I can't use the start routine, because material may be in different packages. Can I get access to all data for replace meterial? Thanks advance.

Former Member
Former Member replied

Hi there,

Forget about the size and the packages!!

You're doing it wrong. I faced similar problems.

Here's how i usually solve it:

1. ODS 1 you load you data and activate it.

2. In the ODS 2 when you're loading your data you'll in your start routine search inside the active table of your ODS 1, after all your ODS 1 after activate has all the records inside a flat table, so you can search one record for ODS 1 into all other records of ODS 2. If in another package you'll find the same material you'll again search for the same material in your start routine code inside ODS 2, you'll do the same summations and since you have an ODS (ODS 2) you'll have overwrite for the same key, this will overwrite the same value again.

Example:

ODS_1:

kraftliner_1 = 10

kraftliner_2 = 20

kraftliner_3 = 30

Activate ODS_1, table active /BIC/AODS_100

ODS_2:

package 1:

kraftliner = search table /BIC/AODS_100 for kraftliner* and sum it;

package 2:

...

...

...

package 23 (same kraftliner):

kraftliner = search table /BIC/AODS_100 for kraftliner* and sum it;

This will overwrite the value 60 already written in package 1, no problem.

Hope this helps,

Diogo.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question