Siebel Connector for SAP R/3 > BAPI Interfaces > BAPI Integration >

Receive tRFC Calls from SAP

A transactional RFC call from SAP uses only an inbound interface to the Siebel application. The EAI SAP BAPI Receiver (tRFC) service is used for this type of communication with SAP. To use the EAI SAP BAPI Receiver (tRFC) service with a workflow read Creating Workflows. This section provides additional information on the configuration and usage of the tRFC BAPI Receiver. The tRFC BAPI Receiver can be used with the EAI Queue for data recoverability. For more information, read EAI Queue.

tRFC BAPI Receiver Usage

The tRFC BAPI Receiver is used for two purposes:

  • Receiving and dispatching transactional RFC calls from SAP
  • Receiving and dispatching IDOCs from SAP
Receiving tRFC Calls

When the tRFC Receiver receives an RFC call from SAP, it dispatches the information it receives in the form of a BAPI Input Integration Object to a workflow. The workflow can be defined in two ways:

  1. The Workflow User Property on the BAPI Input Integration Object definition in Siebel Tools can be set to the workflow name. When this type of BAPI Integration Object is received, it is sent to this workflow. The workflow name must be set using Siebel Tools and the changed integration object must be compiled into the Siebel .srf file.
  2. The workflow name may be set in the ProcessName user property of the EAI SAP BAPI Workflow Service business service. If the workflow name is set here, BAPIs received from SAP are sent to this workflow. The workflow name in the integration objects is ignored.

The list of BAPI Input Integration Objects that the receiver can create must be defined in the User Properties: RfcFunctionIntObjnn where nn represents numbers from 01 to 50. For example if the BAPI receiver needs to be configured to receive two function calls from SAP, you would need to add two User Properties, RfcFunctionIntObj01 and RfcFunctionIntObj02 to the EAI SAP BAPI Receiver (tRFC) business service. The values of these user properties would be the BAPI Input Integration Object names for the integration objects representing the RFC calls to the Siebel application.

To implement the tRFC call from SAP to a Siebel workflow

  1. Define the function call interface in SAP under transaction SE37.

    The function may or may not have ABAP source code, because the function implementation is within a Siebel workflow, not in SAP.

  2. Activate the function.
  3. Using the BAPI Input Integration Object Wizard in Siebel Tools, capture the function interface as a BAPI Input Integration Object.
  4. Add the name of the workflow you wish to invoke when the tRFC call is made to the Siebel application to:
    • The workflow user property of the new integration object


    • The ProcessName user property of the EAI SAP BAPI workflow service if all tRFC calls are routed to the same workflow.
  5. Add the integration object name to the Business Service definition for the EAI SAP BAPI Receiver (tRFC) by adding a user property of the form, RfcFunctionIntObjnn, as previously mentioned.
  6. Compile these changes into your .srf file.
  7. Using the Siebel client, create the workflow you named in Step 4.
  8. Create the ABAP code in SAP to invoke the function in the Siebel application.

    Call the function IN BACKGROUND TASK with your external logical system name as the DESTINATION. Follow the call with a COMMIT WORK statement.

       DESTINATION Logical System name
       . . .

    NOTE:  SAP allows you to make multiple calls prior to the COMMIT WORK statement. This causes SAP to place multiple tRFC calls in the same transaction. The tRFC BAPI Receiver does not currently support this. If you need to make multiple calls prior to the COMMIT WORK, you must use the modifier AS SEPARATE UNIT to cause each BAPI call to be made within a separate transaction.

  9. Start the Siebel Server and the BAPIRcvr component using your new .srf file.

    Make sure that you followed all setup procedures described in Chapter 2 and tested the connectivity of the tRFC BAPI receiver.

  10. Execute your new ABAP code in SAP to make the function call to the new Siebel Workflow.
Receiving IDOC calls

When the tRFC Receiver receives an IDOC from SAP, it passes the information it receives through the EAI SAP IDOC Workflow Processor business service. This business service transforms the raw data into an IDOC Integration object and invokes a workflow. The name of the IDOC Integration Object you are using must be defined in a user property on the EAI SAP IDOC Adapter business service. The workflow you want to invoke may be defined in two ways. For information on how to define your workflow and IDOC Integration Object, read IDOC Workflow Processor Configuration.

tRFC BAPI Receiver Configuration

The EAI SAP BAPI Receiver (tRFC) business service is called by the background Component BAPIRcvr repeatedly to check for tRFC calls from SAP. When a call is received, this business service dispatches the received call to a service which invokes a workflow. IDOCs can be received from SAP in this manner also. For more information on IDOCs received through the EAI SAP BAPI Receiver (tRFC) service read Receiving IDOCs from SAP.

Table 26 summarizes the User Properties and Component Parameters that may be set to control its behavior. Those variables that may be set as component parameters must be set for the BAPIRcvr component.

Table 26.  tRFC BAPI Receiver Configuration Options
User Prop
Comp Param
Valid Values





SAP Destination - references a TYPE=R entry in the saprfc.ini file.





Business Service to dispatch RFC calls received. This must be a service based on CSSWfEngine.





Business service method to call in SAPBAPIDispatchService.





Business service to dispatch IDOCs received.





Business Service method to call in SAPIDOCDispatchService.




Integer value in seconds

The business service repeats this cycle: Wait for input from SAP to return to the Siebel application to check for shutdown. The SAPSleepTime is the time spent waiting for input from SAP.

Suggested time is 60 seconds. Shorter time periods can cause performance problems.




"WriteNone", "WriteAlways", "WriteBeforeErr", "WriteOnErr"

Indicates usage of EAI Queue. If value is "WriteNone", queue is not being used. Read EAI Queue.




"true" or "false"

If true, entries are deleted from the EAI Queue upon completion. Read EAI Queue.




XML queuing service name

Provides the name of the Business Service that handles the interface to the EAI Queue. Read EAI Queue.




EAI Queue name

Provides the name of the EAI queue being used to store queue entries created by this service. Read EAI Queue.





Name of BAPI Input Integration Object that can be accepted by the tRFC Receiver. Read the following note.




Value from Transcode Encoding drop-down list

Siebel code page name for SAP code page.

SAPIgnoreCharSetConv Errors



True or False

Default is False. If True, code page conversion errors are handled by substitution of the question mark(?) character in place of an unrecognized character.

NOTE:  There may be up to 50 user properties defined with a name of the form, RfcFunctionIntObjnn, such as RfcFunctionIntObj01, RfcFunctionIntObj02, RfcFunctionIntObj03, and so on. Each of these user properties would contain the name of a BAPI Input Integration Object that can be accepted by the tRFC BAPI Receiver.

Siebel Connector for SAP R/3