Oracle9iAS InterConnect Adapter for SAP R/3 Installation and User's Guide Release 2 (9.0.2) Part Number A95438-01 |
|
Remote Function Call is a feature of SAP R/3 that allows function modules to be invoked locally or remotely. This chapter describes how the SAP adapter may be integrated with SAP R/3 Remote Function Call.
This chapter discusses the following topics:
A function module is a unit of functionality in SAP. Remote Function Call is a feature of R/3 that allows you to invoke function modules remotely. This allows the R/3 system to be integrated with other systems. The interface of every function is maintained by the SAP system in its data dictionary. A key concept in Remote Function Call is the Remote Function Call Program ID. This is a symbolic ID associated with an end point that services Remote Function Calls. The receiving server first needs to register the ID with the calling SAP system. Users in the SAP system may now invoke a call to a function at this Remote Function Call destination.
The following two sections describe the interaction between the SAP adapter and R/3 Remote Function Call.
To make your SAP adapter application act as a client calling a Remote Function Call interface, you must define a subscribed event or an implemented procedure in your application. It is preferable to use implemented procedures for this application. Triggering of your event/procedure fires a call to the underlying SAP Remote Function Call interface.
Before you can define these events or procedures, you need to do is to set up a default login into the R/3 system.
To make your SAP adapter application act as a server implementing a Remote Function Call interface, you must define a published event or an invoked procedure in your application. For use with Remote Function Call, an invoked procedure is preferred. A call to this Remote Function Call interface triggers your event/procedure and causes an appropriate message to be sent to the SAP adapter hub.
The following configuration parameters must set using the Configuration Editor for working with Remote Function Call.
This section describes default login parameters for R/3.
Default Login to R/3 allows you to program your development application to automatically connect to R/3 servers.
Default Login to R/3 authenticates a user's runtime credentials. This group only appears under a user-defined profile. All the parameters on this page are identical to those that appear when logging into R/3 for a regular session.
Default login to R/3 needs to be set.
In an unoptimized SAP environment, the Remote Function Call table retrieval is slow. To build the Remote Function Call namespace, R/3 downloads three separate tables: area
, groups
, and functions
. Of the three tables, only the function tables contain any relationship about which group and area it belongs to. The areas and groups tables contain extra areas and groups that do not belong to the function. The groups table contains more than 5,000 entries, while the final usable groups are around 700 entries. The browser, working back from the function table, removes the unused groups and areas. Accessing a local R/3 system takes around 5 to 6 seconds for all the tables to be built. However, remotely accessing an R/3 system could take up 4 to 5 minutes.
To reduce the time spent downloading information at development time, functions are provided that allow selective retrieval of areas, groups, and functions. In support of lookup-on-demand for the groups and the areas, the SAP adapter has two custom function modules: one to retrieve the areas and the second to download groups for a specific area.
If you decide not to upload the browsing enhancement functions, the retrieval preloads the table. While preloading the Remote Function Call table is time consuming on a remote R/3 system, it provides advantages for local system since the whole table is prebuilt one time. For this reason, a registry setting key RFCTablePreloadEnabled
is added in the FM Setting area. Selecting this function prebuilds the tables despite the existence of Control Broker custom functions.
At runtime, the area and groups tables are not required and these two processes can be skipped to optimize the download process. On a local R/3 system, the preloading of the function table is fast. However, on a remote R/3 system, the preloading of the function table takes time for the table to completely download. To enhance the performance, the runtime use of preload or lookup-on-demand are based on either populating the preloaded table or using the setting TablePreloadEnabled
.
Although long group names exist (starting from version 4.0) the native Remote Function Call function (that retrieves the list of functions from a long name group) does not differentiate between itself and a short name version that matches the first part of its name. If you query for functions belonging to a short name group, or a long name group which matches a short name group's name, the returned function list is a union of both groups' functions.
The SAP adapter can build the groups table with the short name groups or long names. The short name groups are preferred as they also call functions from the long name group. R/3 release 4.5 has the proper support for long name group and no longer returns the functions that belong to the groups that have the same short format name.
To enhance your Remote Function Call Function Module Remote browsing, the SAP adapter includes the text files for Z_RFC_GET_AREAS
(areas.asc
) and Z_RFC_GET_GROUPS
(ginstall_directorySAPALE_Filesroups3x.asc
or groups4x.asc
) in the install_directory/oai/9.0.2/sap/rfc_files
directory.
The function modules must be in the same function group (usually custom built) and the global data (shared by the entire function group) must contain the following statement:
tables:tfdir, taplt, tlibt
Use the following steps to create the ZMAS
function group.
ZMAS
.
The Create object catalog entry dialog displays.
Z_RFC_GET_AREAS
and Z_RFC_GET_GROUPS
.
Use the following steps to create the Z_RFC_GET_AREAS
function module.
The Function Library: Initial Screen dialog displays.
Z_RFC_GET_AREAS
, in the Function module field and click Create.
Attributes
Import/Export Parameter Interface
Table Parameters/Exceptions Interface
Documentation
Table 5-3 describes attributes classifications.
Classification |
Function Group: |
ZMAS |
---|---|---|
NA |
Application: |
Z |
NA |
ShortText: |
Retrieve areas for remote callable Remote Function Call functions |
Processing type |
Remote Function Call supported |
|
NA |
Immediate Start |
|
Table 5-4 describes table parameters.
Table Parameters | Ref. Structure | Short Text |
---|---|---|
AREAS |
TAPLT |
Lot of areas and descriptions |
Figure 5-1 displays the Z_RFC_GET_GROUPS
function module display. Enter the following values:
Text description of the illustration rfcdocumentationareas.gif
Use the following steps to upload the function module source code:
install_directory/oai/9.0.2/sap/rfc_files/areas.asc
.
Use the following steps to create the Z_RFC_GET_GROUPS
function module.
The Function Library: Initial Screen dialog displays.
Z_RFC_GET_GROUPS
, in the Function module field.
Attributes
Import/Export Parameter Interface
Table Parameters/Exceptions Interface
Documentation
Table 5-5 describes attributes definitions.
Figure 5-2 displays the Z_RFC_GET_GROUPS
import and export parameters.
Text description of the illustration rfcimportexposrtgroups.gif
Import parameter | Reference field | Proposal | Optional | Short Text |
---|---|---|---|---|
|
RS38L-APPL |
|
|
Get all Groups |
|
RS38L-APPL |
SPACE |
X |
Area Name |
Figure 5-3 displays the Remote Function Call parameters group.
Text description of the illustration rfctableparamsgroups.gif
Table Parameters | Ref. Structure | Short Text |
---|---|---|
|
RFCGROUP |
Table of Groups and their descriptions |
|
|
|
|
|
No Group was Found according to the Criteria |
Use the following steps to upload the function module source code:
R/3 Version 3.x
install_directory/oai/9.0.2/sap/rfc_files/groups3x.asc
- OR -
R/3 Version 4.x
install_directory/oai/9.0.2/sap/rfc_files/groups4x.asc
Use the following steps to set global data:
function-pool zmas.MESSAGE-ID ..
,
and insert the following:
tables:tfdir, taplt, tlib
t.
It is recommended that you remove all tables you insert in an R/3 system so that in the future you can create tables for this sample. For example, to remove ZORDERS
and ZCOMMISS
tables, you must first erase the function groups and the function modules.
To erase function groups and modules:
Z_ACCNT_DEPT
function group.
The Change Function Group dialog displays.
Z_ACCNT_DEPT
in the Function group field and click the check mark.
The Delete Function: Group: Delete Function dialog displays. It shows the two function modules belonging to the group.
Z_COMMISS_ADD
and the Z_COMMISS_UPDATE
function modules.
After erasing the function groups and modules, erase a table using the SAPGUI with the following steps:
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|