Setting up an RFC server
Perform several procedures to configure your SAP RFC server.
This section walks you through creating a user and an RFC destination, as well as configuring the RFC server and the services files.
Creating an SAP user
You can either create a dialog user or a technical user. However, it is recommended that you create a technical user as their password does not expire.
Procedure
- rights to make RFC calls, at least the Authorization
check for RFC Access role
- rights to access the authorization objects of any IDoc
Creating an RFC Destination
Before you begin
Before proceeding with the following steps, make sure that an SAP user has been created to connect with Talend Jobs and Talend SAP RFC Server.
Procedure
Results
If all parameters are configured correctly, you should get a similar screen as shown below. This shows that a Talend Job using the tSAPIDocReceiver component is now ready to receive IDocs.
Configuring the RFC server
Set up the sapjco3.jar file and add it to your Talend installation folder.
Procedure
Configuring the tsap-rfc-server.properties file
The configuration file tsap-rfc-server.properties for Talend SAP RFC Server is located under the $TSAPS_HOME/conf directory (where $TSAPS_HOME corresponds to the directory where the Talend SAP RFC Server has been installed). This file consists of seven sections. Before starting Talend SAP RFC Server, you can configure the file to enable some additional features of the server according to your needs.
- Talend SAP RFC Server doesn't support the SAP cluster configuration.
- Any change of the configuration file requires a restart of the Talend SAP RFC Server.
Before the sections
#destination_name=RFC destination
: Sets the RFC destination. You need to set this parameter when the RFC destination differs from its program ID. With this parameter enabled, the value of this parameter is used as the import parameter IV_RFC_DESTINATION of BAPI /CMT/TLND_TABLE_JOIN_STREAM. Otherwise, the program ID (jco.server.progid) is used as the import parameter.
Feature section
The Feature section details the connection information to enable functionalities involving the Talend SAP RFC Server.
#feature.idoc.enabled
: Enables the IDoc feature.
#feature.idoc.transactional
: Enables the transactional management feature.
- Reports the entire transaction as a failure to SAP when a message does not get delivered to the JMS broker.
- Automatically reconnects to the remote JMS broker.
#feature.idoc.transactionAbortTimeOut
: Refers to the timeout value in milliseconds.
#feature.bw_source_system.enabled
: Enables the BW source system feature.
#feature.streaming.enabled
: Enables the streaming mode features (requires a remote connection to a Kafka cluster)
#feature.streaming.timeout
: Refers to the timeout value for the streaming to start.
#feature.idoc.mock.enabled
: Replaces the IDoc receiver with a mock producing an IDoc package every five seconds.
#feature.streaming.threadCount
: The number of threads for data extraction. The default is 2.
#feature.streaming.topic.partitionCount
: Kafka topic partition count. The default is 2.
#feature.streaming.topic.replicationFactor
: Kafka topic replication factor. The default is 1.
#feature.streaming.threadCount
, #feature.streaming.topic.partitionCount
, and #feature.streaming.topic.replicationFactor
parameters are effective only if you have installed the R2020-08 Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator.SAP JCO server section
-
jco.server.gwhost
andjco.server.gwserv
are required -
jco.server.progid
serves as the identifier for IDOC on the gateway and as the destination in the SAP system -
jco.server.connection_count
refers to the number of connections that is registered at the gateway -
jco.server.worker_thread_count
refers to the number of threads that can be used by the JCOServer instance -
jco.server.worker_thread_min_count
refers to the number of threads that are kept running by the JCOServer instance -
jco.server.trace
is not needed, but can be useful for debugging
# jco.server.gwhost
: SAP gateway host on which the RFC server should be registered (mandatory).
# jco.server.gwserv
: SAP gateway service, i.e. the port used for the registration (mandatory).
# jco.server.progid
: Identifier for IDoc on the gateway and as the destination in the SAP system.
# jco.server.connection_count
: Number of connections registered at the gateway.
# jco.server.worker_thread_count
: Number of threads that can be used by the JCOServer instance.
# jco.server.worker_thread_min_count
: Number of threads that are kept running by the JCOServer instance.
# jco.server.trace
: Enables or disables the RFC trace, this is useful for debugging.
SAP JCO client section
The SAP JCO client section includes the connection information to the SAP ABAP server. You need all the options provided and you can use the credentials of the user with RFC call rights.
Set the password in clear text, which is then overwritten with the # number sign value when the Talend SAP RFC Server starts.
JMS broker section
The JMS Broker section sets up the interaction with the embedded or remote JMS broker.
To enable user authentication, you need to uncomment the following three parameters and set their values. If you don't enable user authentication, the tSAPIDocReceiver component or the tSAPDataSourceReceiver component can also connect to Talend SAP RFC Server without setting the value for their user and password fields.
#jms.login.config=conf/user-authentication/login.config
: File system directory containing JAAS authentication configuration.
#jms.login.username
: JAAS username used to authenticate a publisher or sender.
#jms.login.password
: JAAS password used to authenticate a publisher or sender.
To enable the SSL transport mechanism, copy the key store file for SSL to the $TSAPS_HOME/conf folder. Then uncomment the following two parameters (the path to the key store file and the password for the key store file) in the configuration file and set their values
#jms.login.configDomain=tsaps-domain
: Domain of JAAS authentication configuration to use.
#jms.ssl.keystore.path
: The path to a key store for SSL.
#jms.ssl.keystore.password
: A password for a key store for SSL.
#jms.durable.queue.replicate
: Whether JMS messages should be replicated in durable queues.
#jms.durable.queue.retentionPeriod
: Retention period for JMS messages in durable queues in milliseconds (by default: 7 days).
Embedded broker section
The Embedded Broker section details the connection information of the used embedded JMS broker. If you use an external JMS broker, these values are commented out. The following lists the settings:
#jms.bindAddress
: The host address and port (ex: tcp://localhost:61616) for the JMS broker to listen for incoming connections.
#jms.persistent
: Whether JMS messages are persisted or not. This way, the Talend SAP RFC Server keeps a copy of all IDocs received in queues named after the IDoc. This is meant to serve the tSAPIDocsReceiver component in batch mode. When the receiver runs, it collects all IDocs stored in the durable queues since the last time it ran.
By default, messages are kept in the queues for up to seven days. You can change the retention period by uncommenting this parameter in the configuration file and updating its value to meet your own requirement.
#jms.dataDirectory
: File system location used by the JMS broker to persist data.
#jms.useJmx
: Sets whether or not the Broker's services should be exposed into JMX or not.
Remote broker section
The Remote Broker section details the connection information to a remote or external broker. If you use an embedded broker, this section is commented out. The following lists the settings:
#jms.broker.url
: When active, connects to a remote broker instead of an embedded one.
#jms.reconnect.interval
: Interval between reconnections attempts.
#rfc.server.remote.broker.url
: URLs of the brokers for failover. Broker URLs need to be provided in this form: rfc.server.remote.broker.url=failover:(tcp://ip_address1:port_number1,tcp://ip_address2:port_number2, ...)
.
rfc.server.remote.broker.url
parameter is effective only if you have installed the R2021-01 RFC server update or a later one delivered by Talend. For more information, check with your administrator.Kafka section
The Kafka section details the Kafka connection information needed to use the streaming mode feature. It also contains settings for configuring an Azure eventhub as a Kafka cluster.
-
kafka.bootstrap.servers={YOUR.EVENTHUBS.FQDN}:9093
-
kafka.security.protocol=SASL_SSL
-
kafka.sasl.mechanism=PLAIN
-
kafka.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="{YOUR.EVENTHUBS.CONNECTION.STRING}";
For information about configuring an Azure eventhub as a Kafaka cluster, go to Quickstart: Data streaming with Event Hubs using the Kafka protocol.
kafka.bootstrap.servers=<kafka_setting>
: List of host and port pairs that are the addresses of the Kafka brokers.
Configuring the services file
In the SAP configuration, you can see that the host name is specified. However, it is not true for the port because the port is in a standard range and must be specified in the services file on the client machine.
You can find the services file in:
- Windows: C:\\Windows\System32\\drivers\etc\services
- Linux or Unix-based systems: /etc/services
Procedure
Configuring your machine
To run SAP RFC Jobs in the Talend Studio, copy the sapjco3.dll file to the executable path in your machine.
Procedure
- Go to the %PATH% environment on your machine.
- For Windows users, paste the sapjco3.dll file to the C:\\Windows\System32 directory.
Starting or stopping the RFC server
You can manually start or stop the RFC server by running the scripts or batch files in the bin directory.
Procedure
Verifying the connection to the SAP RFC system
Check if Talend Studio has successfully connected to the SAP RFC system.
Procedure
- Logon to the SAP GUI.
- Go to the transaction SM59.
- Select the RFC destination from the list of TCP/IP connections. This displays a window with information about the RFC destination.
- Click Connection Test.
Debugging
The SAP RFC server receives the IDocs and places these into the JMS topic. One IDoc type results to one topic.
If the embedded JMS broker is used, the topics are not visible. To check what data is stored and to see if messages are received from SAP or consumed by the Job, you need to configure an SAP RFC server that uses an external JMS broker.
The topics are named TALEND.IDOCS.<IDoc Type>. These are set by the consuming Job and the <IDoc Type> that matches the type configured in the tSAPIDocReceiver component.
#Enable/disable RFC trace (1=on or 0=off)
jco.server.trace=1
The following shows you that a .trc file is written to the top-level directory: