cancel
Showing results for 
Search instead for 
Did you mean: 

Start Routine and Variables

Former Member
0 Kudos

Hii All

A couple of questions for you gurus.

a) Am I right in thinking that the start routine is called once for each data package (BI 7).

b) Is it also truethat all variables including globals and internal tables are re-initialised for each data package ?

Thanx

Asif

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Guys,

It is right that start routine is called once for each data package.

But variables and interal tables are not re-initialized for each data package.

Value in variable is retained and can be used for further data packages.

For that you can use a counter. Usage will be like this

IF counter is INITIAL.

Put your logic.

Counter = 1.

ENDIF.

In this way, you can do the calculation common for all data packages.

The only problem with this is when packages are loaded in parallel.

To avoid this, do the serial processing. To achieve that, In DTP

Goto > Settings for Batch Manager > Number of Processes 1

I hope the given information is helpful.

Regards,

Gaurav

UmaArjunan
Active Participant
0 Kudos

Thanks Agarwal !!!

When i change the DTP settings, Number of Processes as 1 and data package size is 3 . It is giving the correct count of all the data records for all the data pacakges.

When i do a count in the paralle processing Number of Processes as 3 or more. then i m not getting the correct count. it gets lost or overwritten somewhere.

Though we acheive the result using this settings serially , will it not affect the perfomance while execuing the DTP . of course in terms of time, i guess it would be more.. correct me if i am wrong.

can't we acheive the same results in parallel process of records... ?

Former Member
0 Kudos

Serial processing will have impact on performance in terms of time.

I am not very sure how can we achieve the same results with parallel processing because it will depend on the requirement and you will have to put some logic accordingly.

If you can let us know some details about what are you trying to achieve, will try to help you out.

Regards,

Gaurav

UmaArjunan
Active Participant
0 Kudos

Hi Gaurav,

I had already posted my thread in SDN.

.

Please reply to my thread above for the requirement.. and help me to solve the issue if you have any idea.

I already suggested your solution approach, since i will affect the loading time (serialization )... i m still working on the issue to resolve it

Former Member
0 Kudos

Yes. Your observation is wright. Start routine is called for each data package. The variables declared globally gets re-initialized for every package.

regards,

Venkat.S

Former Member
0 Kudos

Is there any way of stopping the variables from being re-initialised ?

FCI
Active Contributor
0 Kudos

Yes, save their content somewhere (in a specific table, in the memory etc.). But as the packages can run in parallel, that can be tricky...

Regards,

Fred

Former Member
0 Kudos

try STATICS to declare your variables

regards

Sanjyot

UmaArjunan
Active Participant
0 Kudos

Hi Asif,

I tried to save the contents to the ABAP memory and retreived in the routine. . But as you say, the packages are running parallely, it is not givine the correct no of records in all the pacakges at the end . But serially debugging produces the correct output. Do you have any idea to get it ?