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: 

help

Former Member
0 Kudos

can anyone guide for remote function calls..the exact use of keeping task command..and recive results command..help will be highly appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

thanks for ur help..i need to recive results by importing a type ref to a class....how do i do that. as it dsoesnt allow a type ref to since its rfc..could anyone help urgently

12 REPLIES 12

Former Member
0 Kudos

Hi..

This means ,RFC Function Modules can be call or access from outside of the R/3 system. Whether it be another R/3 system, a legasy system or what ever. RFC Function modules are just like any other function module except that it can be called remotely. BAPIs are just RFC enabled function modules that perform some business logic.

There are different kind of RFCs like Parallel RFC, Transactional RFC(tRFC), Queued RFC(qRFC).

1. Asynchronous RFC with Load Balancing (Parallel RFC)

You can use this RFC type to program parallel RFC calls. The resources are checked and assigned as far as the set quotas allow.

The required ABAP language element is:

IN BACKGROUND TASK

This ABAP command flags the function module func for asynchronous processing. The module is not executed immediately. The data transferred with EXPORTING or TABLES is placed in a database table. A COMMIT WORK then triggers the function module. There are various cases:

· The data is updated. In this case the function module is executed within the update following the V1 phase, usually even on a different server.

· The data is not updated. In this case the function module is executed in the same work process.

3. qRfc can be inbound qRfc or Outbound qRFC

Cheers...

Afsal

Former Member
0 Kudos

thanks for ur help..i need to recive results by importing a type ref to a class....how do i do that. as it dsoesnt allow a type ref to since its rfc..could anyone help urgently

0 Kudos

What rfc function module are you referring to?

Regards,

Rich Heilman

0 Kudos

i am referrifn to a class method which gets the data in tabukar format

0 Kudos

I see your problem here as the system will not allow you to pass a "TYPE REF TO" if the function module is set as RFC enabled. Maybe if you give me some background of your requirment, we could find a different way of doing it.

Regards,

Rich Heilman

0 Kudos

yes u r rt it is rfc enabled..my requirement is to get a table fromt e fucntion which is derived by a mehod of a class....it gives an illegal reference when called thro a prgm..could u help us.

0 Kudos

Is it a custom RFC function module? If not, what is the name of the function module. What class/method is being used?

Regards,

Rich Heilman

0 Kudos

CL_RSR_DATA_SET

0 Kudos

This class does not exist in my system. My version are you on. Can answer my previous questions as well as give some overview of what you need to do?

Regards,

Rich Heilman

0 Kudos

I don't see why you would need to pass the reference to R_DATASET back outside of the function module. Get the data out of the object and put it in a internal table then send the internal table back out of the function module via a TABLES parameter.

Regards,

Rich Heilman

0 Kudos

Here is a quick program that I just did that calls an RFC and brings a table back. This works great in my system. The tables parameter EPSDO is a typed like a structure in the ABAP dictionary. This is what you will need to do. Create a structure for your ITAB and the use it in the TABLES parameter.



report zrich_0002.

data: iepsdo type table of zepsdo with header line.
data: session(1) type c.
parameters: p_vbeln type vbak-vbeln.

call function 'Z_EP_GET_SDDOC_OVERVIEW' starting new task 'TEST'
       performing return_info on end of task
  exporting
       vbeln            = p_vbeln
  exceptions
         communication_failure = 1
         system_failure        = 2
         resource_failure      = 3.

wait until session = 'X'.

check sy-subrc = 0.

*---------------------------------------------------------------------*
*       FORM RETURN_INFO                                              *
*---------------------------------------------------------------------*
form return_info using taskname.

  receive results from function 'Z_EP_GET_SDDOC_OVERVIEW'
   tables epsdo = iepsdo
    exceptions
      communication_failure = 1
      system_failure        = 2.

  session = 'X'.

endform.

Regards,

Rich Heilman