Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Can I CALL FUNCTION 'SPBT_INITIALIZE' many times ?

Former Member
0 Likes
2,855

Hi ABAP Expert,

I need your advise whether is recommended to calling FUNCTION 'SPBT_INITIALIZE' to get updated information regarding available background process for parallel processing in ABAP.

Because if i just call this program 1 time at the beginning and the report running quite long, the information is not updated anymore.

Please advise.

Thank you in advance

Fernand.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,587

Hi,

It is not advised to call that module more times.If u call it for more times u will get exception SPBT_INITIALIZE - pbt_env_already_initialized error

Hi ABAP Expert,

I need your advise whether is recommended to calling FUNCTION 'SPBT_INITIALIZE' to get updated information regarding available background process for parallel processing in ABAP.

Because if i just call this program 1 time at the beginning and the report running quite long, the information is not updated anymore.

Please advise.

Thank you in advance

Fernand.

3 REPLIES 3
Read only

Former Member
0 Likes
1,587

Hi Fernand,

In function module HRCCE_EXT_EMP_ATTR_CE, SAP has called SPBT_GET_CURR_RESOURCE_INFO if the pbt is already initialized.

So, I believe you can use the same to achieve it.

Hope it helps.

Sujay

Read only

Former Member
0 Likes
1,588

Hi,

It is not advised to call that module more times.If u call it for more times u will get exception SPBT_INITIALIZE - pbt_env_already_initialized error

Read only

Former Member
0 Likes
1,587

Hi

what you can do is create form and perform

write your code for that FM in Form part and use perform wherever in your program you want to use.

whenever the perform will be triggered it will go to the form part where you are calling the FM.

I hope this way you can use it multiple time without calling it every time from pattern.

But I am not sure whether it is a good approach or not?

thanks

Lalit Gupta