Application Development 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: 

how to use servergroup?

Former Member
0 Kudos

Hi all,

I have seen how to create a servergroup in Tx RZ12 joining servers into a group and leaving free Workprocesses (for other users).

Now I want to execute a program in parallel using this server group and I do not know how.

(How) Can I use a servergroup executing a standard program? and/or using a self;written program?

I would appreciate if someone could geive me examples/explanation.

Thanks in advance

Thomas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Prabhu,

I think this fm is used to check the free Workprocesses of the servergroup.

My question was how can I use servergroups for

a) standard reports/programs

b) customer reports/programs

with reference to a):

is there an option in an standard program where I can select the servergroup to be used?

what have I to implement in my programs if I want them to be executed by a servergroup?

Perhaps someone can explain this to me???

Thanks,

Thomas

4 REPLIES 4

Former Member
0 Kudos

check this FM

* Optional call to SBPT_INITIALIZE to check the
* group in which parallel processing is to take place.
* Could be used to optimize sizing of work packets
* work / WP_AVAILABLE).
*
  call function 'SPBT_INITIALIZE'
  exporting
  group_name = group                 "Name of group to check
  importing
  max_pbt_wps = wp_total             "Total number of dialog work
                                     "processes available in group
                                     "for parallel processing
  free_pbt_wps = wp_available        "Number of work processes
                                     "available in group for
                                     "parallel processing at this
                                     "moment
  exceptions
  invalid_group_name = 1             "Incorrect group name; RFC
                                     "group not defined. See
                                     "transaction RZ12
  internal_error = 2                 "R/3 System error; see the
                                     "system log (transaction
                                     "SM21) for diagnostic info
  pbt_env_already_initialized = 3    "Function module may be
                                     "called only once; is called
                                     "automatically by R/3 if you
                                     "do not call before starting
                                     "parallel processing
  currently_no_resources_avail = 4   "No dialog work processes
                                     "in the group are available;
                                     "they are busy or server load
                                     "is too high
  no_pbt_resources_found = 5         "No servers in the group
                                     "met the criteria of
                                     "two work processes defined.
  cant_init_different_pbt_groups = 6 "You have already initialized
                                     "one group and have now tried
                                     "initialize a different group.
  others = 7..

regards

Prabhu

Former Member
0 Kudos

Hi Prabhu,

I think this fm is used to check the free Workprocesses of the servergroup.

My question was how can I use servergroups for

a) standard reports/programs

b) customer reports/programs

with reference to a):

is there an option in an standard program where I can select the servergroup to be used?

what have I to implement in my programs if I want them to be executed by a servergroup?

Perhaps someone can explain this to me???

Thanks,

Thomas

0 Kudos

Hi Thomas,

In fact inside reports/programs it is not possible, but to run these programs on a specific server or servergroup, you must create a batchtask (via transaction SM36) .

Within the transaction SM36 you can supply the server or servergroup in the field Exec. Target.

The program/report will run there if sufficient BTC processes are available.

The solution of Prabhu works in combination with RFC enabled function modules and BAPI's.

You could make an RFC enabled function module of your own that will SUBMIT the report/program in question. Then from another program (or function module) call your RFC enabled function module with a destination SERVERGROUP or RFC DESTINATION or SERVER.

View the function module SRM_RFC_SUBMIT_REPORT (on a CRM or SRM system).

Regards,

Rob.

Former Member
0 Kudos

Hi Rob,

that was the info I was looking for.

Thanks,

Thomas