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: 

Call function STARTING NEW TASK

ronaldo_aparecido
Contributor
0 Kudos

Hi Gurus

I have a RFC with destination SAP_ECC I will add "starting new task" the group name is 'interfaces'.

How I can do This .Any example?

What I would write in Destination?  SAP_ECC or INTERFACES How I can Do this?

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

     STARTING NEW TASK v_taskname1

     DESTINATION IN GROUP INTERFACES  (or SAP_ECC?)

     PERFORMING z_return_info ON END OF TASK

       EXPORTING

         username       = wa_finaluser-bname

*      importing

*        logondata       = wa_infousercabecmod-logondata

*        address        = wa_infousercabecmod-address

*        company        = wa_infousercabecmod-company

*        islocked       = wa_infousercabecmod-islocked

       TABLES

         profiles       = it_bapiprofiles

         activitygroups = it_activitygroups

         addtel         = it_addtel.


Thanks.

1 ACCEPTED SOLUTION

antoniovaz
Participant
0 Kudos

Hi Ronaldo,

Check this link: CALL FUNCTION - STARTING NEW TASK (SAP Library - Components of SAP Communication Technology)

If you want to use a RFC logon group defined in the RZ12 transaction you should use the syntax destination in group <logon_group>

If you only want to execute the RFC in a specific destination, configured in the SM59, you should use

destinarion <destination_name>

Hope this clarifies.

7 REPLIES 7

antoniovaz
Participant
0 Kudos

Hi Ronaldo,

Check this link: CALL FUNCTION - STARTING NEW TASK (SAP Library - Components of SAP Communication Technology)

If you want to use a RFC logon group defined in the RZ12 transaction you should use the syntax destination in group <logon_group>

If you only want to execute the RFC in a specific destination, configured in the SM59, you should use

destinarion <destination_name>

Hope this clarifies.

0 Kudos

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

     STARTING NEW TASK v_taskname1

     DESTINATION IN SAP_ECC

     PERFORMING z_return_info ON END OF TASK

       EXPORTING

         username       = wa_finaluser-bname

*      importing

*        logondata       = wa_infousercabecmod-logondata

*        address        = wa_infousercabecmod-address

*        company        = wa_infousercabecmod-company

*        islocked       = wa_infousercabecmod-islocked

       TABLES

         profiles       = it_bapiprofiles

         activitygroups = it_activitygroups

         addtel         = it_addtel.




Cheers,

Prakash

0 Kudos

Hi Antonio.

But if i use destination in group <logon_group> how the system will understand that is to go to the SAP_ECC?

Thanks For Help.

0 Kudos

Ronaldo,

From my point of view these two are the usages:

Scenario 1 - You want to execute only on a specific destination

Usage: destinarion <destination_name>

Scenario 2 - You have a landscape composed by 3 application servers and you want to configure a RFC logon group (or also known as server group) using only 2 application servers.

Usage: destination in group <logon_group>

Now I don't think that it makes sense using both scenarios because if you have the destination then it is already pointing to the expected endpoint.

If you don't have a specific destination but you want to execute in any of the servers that belong to the Logon Group you use the scenario 2. The Logon Group or Server Group is often used (among others probably) for parallel processing tasks (refer to Defining RFC Groups for Parallel-Processed Jobs (SAP Library - Background Processing)), on which you specify a group of servers with specific usage details (% of free work processes and so on). This is used for load balancing purposes while executing background tasks.

Resuming: I believe that if you do have a destination to be used then proceed with the Scenario 1.

0 Kudos

Now I don't think that it makes sense using both scenarios because if you have the destination then it is already pointing to the expected endpoint.

As a matter of fact you cannot mix them together

IN GROUP is an addition to the DESTINATION construct and should be used when you plan to use RFC server groups within the current AppServer (generally for parallel processing).

BR,

Suhas

0 Kudos

You should use destination only for RFC case. Server groups to be used in case you want ot perform some parallel procesisng

Nabheet

0 Kudos

Suhas,

That was a bad choice of words, reading my sentence could lead you to think that they complement but in fact they don't (as you already stated)

Thanks for pointing that out.

Regards,

António Vaz