cancel
Showing results for 
Search instead for 
Did you mean: 

Need to run start routine only once

Former Member
0 Kudos

I understand that for every data package from ODS to Cube, the start routine is run. But I need to run it only once. Is there anyway to achieve this? As the programming logic doesn't really do anything to the data package, I don't need it to be in the start routine. But as I populate a database table using that routine, which in turn is used in update routines, I need to kick it off before the load from ODS to cube happens. I think an ABAP routine variant can be kicked off in process chains. Did anyone use the variant and know how to kick off the routine? Do I have to write this logic in a function module and then kick it off using ABAP variant in Process chains?

I would prefer a way to limit my start routine to run once for every data load rather than kicking it off through process chain. Can someone discuss which is a good approach and how I go about it? Thanks for your inputs.

Sam

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sameer,

In order to have single data package in start routine, you need to first check the number of records for each load. Accordingly set the maximum number of record and data packet in infopackage.

Path is Infopackage->Scheduler->DataS. Default Data Trasfer.

Give the total number of records in each load as maximum and packet size as 1.

It will help.

Regards,

Aditya

Former Member
0 Kudos

Follow alexandro..That will be really helpful..

Former Member
0 Kudos

We cannot declare a variable of type static in Start Routine. Static can be used only in Forms or FMs.

Former Member
0 Kudos

Hi Sameer,

you can also use a STATIC variable in your start routine. With this variable you can determine if its the first execution of the start routine.

the code in your start routine could be:

STATICS: initialize(1).

IF initialize <> 'X'.

<i>* your code ...</i>

initialize = 'X'.

ENDIF.

Hope it helps.

regards

Alex

Former Member
0 Kudos

Hi Sameer,

Let me recap you req. You want to populate a database table in your start routine and need to do it once for a load.

There is no possible way to limit the no. of times a Start routine is run, but you can find some worksaround.

Is there anyway you can identify that your DB table is updated with new records, i.e.

1> You delete and refill table every time

2> You have some kind of time stamps.

If one of the above case is true, then you can use that as a check in the Start routine to limit the no. of times the DB table is being populated.

Regards,

Sree