Configuring RFC data transfer

The Remote Function Call (RFC) is the proprietary protocol from SAP used to exchange data with the SAP systems. The ABAP Extract stage acts as an external system by connecting to an RFC Destination configured on the SAP system. The stage can either use an existing Destination or create a new one automatically.

About this task

You must create an IBM® InfoSphere® DataStage® and QualityStage®job with the ABAP extraction stage and configure RFC as the data transfer method. Every ABAP Extract stage that uses the RFC data transfer method must be configured to use a unique RFC Destination. Configuring the RFC Destination automatically is a preferred option when compared to the manual creation. However, if the SAP account used in the stage does not have the necessary SAP authorizations, the Destination must be created manually before the job is run. For more information, contact your SAP administrator. There are two types of RFC, namely, transactional RFC (tRFC) and queued RFC (qRFC). In the tRFC method, the packets might not arrive in the order they were sent. In the qRFC method, packets arrive in the order in which they were sent as this method uses queues. The ABAP Extract stage also provides the option to run the ABAP program on the SAP system as a background process, which enables additional features such as using a variant to provide runtime parameters.

Starting from version 8.0.0.2, ABAP Extract Stage also supports Background Remote Function Call (bgRFC) as RFC Data Transfer Method. By using bgRFC, data can be transferred to DataStage either once in any order (transactional, tRFC) or once in the order of creation (queue, qRFC). As of now, ABAP Extract stage supports only bgRFC with tRFC (and not with qRFC). bgRFC is available with SAP NetWeaver 2004s (SAP Basis 7.0). Hence this option should only be used in ABAP Extract Stage when you are designing your job for SAP ECC 6.0 and onwards.

For information about how to confirm the Program ID and Destination Name are unique, see technote 1966231.

For information about the per-requisite steps to use bgRFC, see technote 2000523.

Procedure

  1. Double-click the ABAP stage to open the stage editor.
  2. Select the Output tab.
  3. Select the Data Transfer Method tab.
  4. Select RFC from the Data Transfer Method option.
  5. You can specify the SAP gateway host and gateway service details in the following two ways:
    1. You can manually edit and provide the SAP gateway host and service details in stage GUI.
    2. From SAP Pack version 8.1 onwards, ABAP stage provides dynamic gateway functionality. With this functionality stage run time will dynamically decide the gateway host and service to be used for registering RFC server for RFC data transfer. For non-load balanced connections, this will select the Gateway and the default Gateway Service on the Application Server configured in SAP Connection used. For load balanced connections, it will select the Gateway and the default Gateway Service on the Application Server used for the master node. This Application Server will be selected by the Message Server according to the settings in the SAP landscape (usually the least busy application server).

      To use this feature, you must select Use Dynamic Gateway check box in stage GUI. This is the default option when designing new jobs.

      This functionality works only for automatic creation of RFC destination hence once the user selects the option, Use Dynamic Gateway, the Create RFC destination automatically feature will also be selected automatically after prompting a warning message.

      However, this option can still be unselected and proceed with default or manually provided gateway details by editing in the respective fields. This is useful in cases where the standalone gateway server need to be used for data transfer.

  6. Specify the RFC Destination and the program ID to be used for the Destination.
    Notes:
    • If you choose to create the Destination automatically, the stage editor suggests a unique name and program ID.
    • The RFC Destination Name is an all-uppercase field (due to SAP requirements). The Program ID is a case sensitive field.
  7. To use qRFC, select the Use qRFC check box, and then specify the qRFC queue name to use.
    Note: In version 8.0.0.2, bgRFC with qRFC is not supported. Hence in version 8.0.0.2, if the Use bgRFC check box is already selected, it automatically gets unchecked and disabled.
  8. To use tRFC, select the Delete leftover LUWs check box to clean up any leftover Logical Units of Work on the Destination before the job is run.
    Selecting this option ensures that the data transfer can start immediately and prevents the jobs from waiting indefinitely. In bgRFC data transfer, this option ensures cleanup of remaining bgRFC units associated with the destination, before executing the job.
  9. To use bgRFC, select the Use bgRFC check box. By default, this uses tRFC. Starting from version 8.0.0.3, it also supports qRFC. To use bgRFC with qRFC, you need to select both the check boxes, Use bgRFC and Use qRFC.
  10. Select the Create RFC Destination automatically check box to automatically create the RFC Destination.
    Note: If you do not select this option, then you must manually create the RFC Destination. For more information, see Creating the RFC destination manually.
    1. If you choose to create RFC destination automatically, you can select Delete existing RFC destination option to ensure the destination is deleted and re-created before it is used for data transfer for the current job run.

      Note that irrespective of choosing this option, the automatically created destination is deleted from SAP system after the data transfer is done to DataStage, and before the job execution is completed.

      In the case of tRFC or qRFC, the call to delete RFC destination is synchronous call to SAP. Hence once it is requested from job run-time to delete destination, it is deleted in SAP immediately or with some time delay. Job run-time provides the deletion status before it gets completed.

      However, in case of bgRFC data transfer, stage run-time can only request to delete bgRFC destination to SAP but it does not delete bgRFC destination until the bgRFC units that are associated with the destination are processed or deleted. Hence when you choose bgRFC, the job run-time always requests to delete bgRFC destination through a background program. The job continues to complete without waiting for the deletion status of the destination.

      For all subsequent job execution with bgRFC, job run-time always tries to reuse the existing bgRFC destination. In case, a request for the delete is already submitted to SAP (for the previous execution), the current run-time cancels that request by aborting the related background process. Hence Delete existing RFC destination option is always disabled for bgRFC.

    2. (Optional) If you selected tRFC, then, specify values for Suppress background jobs, Number of retries, and Retry interval fields. Since these options are not applicable for bgRFC destination, they are disabled in case you select Use bgRFC.
    3. Starting from version 8.0.0.2, you can specify the RFC Destination description for the RFC Destination which is created automatically from DataStage. By default, RFC Destination name is copied as the description; however you can change it as required. The RFC Destination description editor is enabled only when you choose Create RFC destination automatically. The RFC Destination description editor is disabled for those RFC Destination descriptions which are already created in SAP and used in stage by providing the name. Currently for such cases, the Destination description will not be retrieved from SAP and shown in this editor. Also as the editor is disabled, you cannot modify the description of RFC Destination from DataStage.
  11. For a detailed guide on setting up Secure Network Communications (SNC), see technote 2004893. To use SNC:
    1. In version 8.0 and prior, select the Security check box and specify the SNC attributes such as library, name, a quality to use. SNC feature is only supported for the runtime.
    2. In version 8.1 and later, the SNC settings are available in the connection properties in DataStage Administrator for SAP. SNC is now available for both runtime and design time.
    Note: Jobs designed in the version 8.0 and prior using SNC settings at stage level are still supported during runtime, provided the stage is not edited in version 8.1. If you decide to edit the stage properties, you must transfer SNC settings that are previously defined at stage level to the runtime SNC settings for the SAP Connection using DataStage Administrator for SAP. For more details, see section S3 in technote 2014632 section S3. Migrating SNC configured jobs.
  12. (Optional) Configure the background process options.

Troubleshooting

For steps to resolve runtime issues, see technote 1647413.