Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
02-Sep-09
Kaavian Systems
02-Sep-09
Kaavian Systems
The
gateway
and
ICM
are
interfaces
for
02-Sep-09
Kaavian Systems
02-Sep-09
Kaavian Systems
02-Sep-09
Kaavian Systems
RFC Functions
02-Sep-09
Kaavian Systems
Synchronous RFC
It is the most common type of RFC used and is ideal
when you need the results of a function module
immediately after its execution.
Pre-requisite : The RFC client and the RFC server
must be available at the time the call is made.
The sRFC call is passed immediately to the target
system, and the caller program is halted until the
response of the RFM is received.
02-Sep-09
Kaavian Systems
Synchronous RFC
Sometimes we want to call a remote function from
within the same system. This function can run either
as a remote or a local call, depending on the CALL
FUNCTION statement.
CALL FUNCTION...DESTINATION = NONE
02-Sep-09
Kaavian Systems
Locally
as
particular,
if
for
the
normal
call
function
leaves
some
modules.
In
EXPORTING
02-Sep-09
Kaavian Systems
Synchronous RFC
02-Sep-09
Kaavian Systems
10
Asynchronous RFC
Asynchronous RFC is a great option when you want
to improve the performance of your ABAP program.
By having the system call one or more function
modules in parallel rather than force your program
to wait for the results.
The process in which the aRFC does not return
parameters is referred as aRFC without response.
Handling the results of function call is referred as
aRFC with response.
02-Sep-09
Kaavian Systems
11
Asynchronous RFC
Asynchronous RFC without response
Syntax
CALL FUNCTION My_first_func
STARTING NEW TASK 'my first task'
DESTINATION 'myfirstdestination'
EXPORTING...
TABLES..
02-Sep-09
Kaavian Systems
12
Asynchronous RFC
Asynchronous RFC with response
Syntax
CALL FUNCTION My_first_func
STARTING NEW TASK 'my first task'
PERFORMING <call back form> ON END OF TASK
DESTINATION 'myfirstdestination'
EXPORTING...
TABLES..
WAIT UNTIL <logical_exxpression>
FORM <Call back form>
02-Sep-09
Kaavian Systems
13
Parallel RFC
Parallel RFC (pRFC) is an extension of aRFC. It is
particularly useful when you plan to make a large
number of RFC calls.
It allows you to specify a group of application
servers on which to execute the RFC calls ,instead
of just a single RFC destination.
It can alert you to raise an exception when non of
the servers in the group has sufficient resources.
02-Sep-09
Kaavian Systems
14
Parallel RFC
Syntax
CALL FUNCTION 'MY_FUNC
STARTING NEW TASK 'new_task
DESTINATION IN GROUP 'mygroup
EXPORTING..
TABLES..
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
RESOURCE_FAILURE = 3.
02-Sep-09
Kaavian Systems
15
Parallel RFC
Parallel RFC function
02-Sep-09
Kaavian Systems
16
Transactional RFC
02-Sep-09
Kaavian Systems
17
Transactional RFC
Syntax
CALL FUNCTION <Remote Function>
IN BACKGROUND TASK<Options>
Options
Destination <DEST>
Exporting <P1 = F1> Tables <p1 = itab >
COMMIT WORK.
Note :
The call function statement returns immediately
always succeeding with sy-subrc = 0. The system
assigns a unique ID known as transactional ID
02-Sep-09
Kaavian Systems
18
Transactional RFC
Table ARFCSSTATE
Fields : Host id, Process id, Destination id, Name
of remote function module,
Transaction id,
Status of call etc.
Table ARFCSDATA
Fields : Host id, Process id, Destination id,
Transaction, Data etc.
02-Sep-09
Kaavian Systems
19
Transactional RFC
02-Sep-09
Kaavian Systems
20
Queued RFC
02-Sep-09
Kaavian Systems
21
Queued RFC
qRFC Example
02-Sep-09
Kaavian Systems
22
Queued RFC
Function modules
TRFC_SET_QUEUE_NAME : For the queue name
to be passed.
TRFC_GET_QUEUE_INFO : To read the current
contents of one or all the queues of the table
TRFCQUOUT.
TRFC_QOUT_STOP : To stop processing one or more
queues.
TRFC_QOUT_RESTART : To continue processing
02-Sep-09
Kaavian Systems
23
RFC Interface
In the SAP System, the ability to call remote
function is provided by the Remote Function Call
interface system (RFC). RFC allows for remote calls
between two SAP Systems (R/3 or R/2), or between an
SAP System and a non-SAP System.
RFC consists of the following interfaces:
A calling interface for ABAP programs
CALL FUNCTION...DESTINATION Statement
02-Sep-09
Kaavian Systems
24
RFC Interface
Calling interfaces for non-SAP programs
When either the caller or the called partner is a nonABAP program, it must be programmed to play the
other partner in an RFC communication.
To help implement RFC partner programs in non-SAP
Systems,
SAP
provides
External
Interfaces.
ABAP
02-Sep-09
Kaavian Systems
25
Systems
R/3
Systems
may
establish
trusted
02-Sep-09
Kaavian Systems
26
The
system
profile
parameter
02-Sep-09
Kaavian Systems
27
Reference
The
learning
material
contained
in
this
PowerPoint
Presentation is prepared with the help of http://help.sap.com/
and sap press book. All rights reserved by SAP AG.
Unless otherwise specifically stated, this learning material is
intended for the sole purpose of class room session, internal use
and for knowledge transfer to the Consultants.
However, for detailed information on this learning material,
http://help.sap.com / sap press book may be referred.
Kaavian is not liable for any legal liability or responsibility for
the accuracy, completeness or usefulness of any information
disclosed in these learning materials.
No portion of the learning materials
shall be modified,
reproduced or transmitted in any form by any means, whether
by electronic, photocopier or otherwise without the written
permission of Kaavian. In no event shall Kaavian be liable for
any damage whatsoever resulting in any action arising in
connection with the use of learning material.
02-Sep-09
Kaavian Systems
28
THANK YOU
02-Sep-09
Kaavian Systems