BEA Logo BEA eLink Adapter for R/3 ALE Release 1.5

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   eLink Adapter for R/3 ALE Doc Home   |   eLink Adapter for R/3 ALE User's Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Configuring ALE Integration

 

This topic describes how to configure your BEA eLink Adapter for R/3 ALE installation for integration with SAP Application Linking and Embedding (ALE) technology. It includes the following main sections:

Using BEA eLink Adapter for R/3 ALE, TUXEDO applications can exchange SAP Intermediate Documents (IDOCs) with R/3 systems. See Chapter 2, "Integrating with ALE," in this guide for more information about ALE integration.

Configuring the ALE eLink to R/3 Server

The following topics describe how to configure the ALE eLink to R/3 server:

In addition, see the following topics for further configuration instructions:

ALE eLink to R/3 is a TUXEDO server that submits IDOC packets to R/3 via tRFC. ALE eLink to R/3 receives IDOC packets forwarded from a TUXEDO queue, encodes the IDOC data for R/3, and submits the message to R/3 via tRFC. See "Processing eLink to R/3 IDOCs" in Chapter 2, "Integrating with ALE," in this guide for more information about ALE eLink to R/3.

Configuring the UBB File for ALE eLink to R/3

ALE eLink to R/3 is a standard TUXEDO server that is defined in the UBB file. You must configure this file to specify the server group, server, environment file, and services associated with the ALE eLink to R/3 server. See Appendix A, "Sample cr3_ale.ubb File," for a listing of the sample UBB file that comes with BEA eLink Adapter for R/3 ALE.

Defining the Server Group

First define the server group (such as CR3) to which the ALE eLink to R/3 belongs, as described in TUXEDO Initialization File.

Defining the ALE eLink to R/3 Server and Environment File

In the SERVERS section of your UBB file, define the ALE eLink to R/3 server, specifying its server group and server ID, as shown in the following example:

cr3alein
SRVGRP=CR3 SRVID=3

Define the environment file for the ALE eLink to R/3 Server, as shown in the following example:

          ENVFILE="cr3alein.env"

Defining ALE eLink to R/3 Services

In the SERVICES section of your UBB file, define the CR3_SUBMIT and CR3_IDOC_IN services, as shown in the following example:

CR3_SUBMIT
CR3_IDOC_IN

Setting Environment Variables for ALE eLink to R/3

The ALE eLink to R/3 server requires environment variables that specify connection information and the behavior of the server to R/3. These environment variables are defined in an environment file that is specified in the UBB file as the ENVFILE parameter for the server.

Environment Variables for ALE eLink to R/3

Configure the required and optional environment variables for ALE eLink to R/3 as shown in Table 6-1:

Table 6-1 Environment Variables for the ALE eLink to R/3 Server

Category / Variable

Set To

Description

Connecting To R/3

CR3_DESTINATION

System Name

Destination in the sideinfo that defines the R/3 application server to connect to. Default is undefined. Required.

CR3_CLIENT

Client Number

R/3 login client number. Default is undefined. Required.

CR3_USER

User

R/3 login user. Default is undefined. The user must be of type CPIC. Required.

CR3_PASSWORD

Password

R/3 login user password. Default is undefined. Required.

CR3_LANGUAGE

E

R/3 login language. Default is E for English. Required.

SIDE_INFO

Path and File

Full path to the sideinfo file. Required.

Managing the TID File

CR3_ALEIN_TID_FILE

Path and File

Full path and filename for the ALE eLink to R/3 TID file, without the .tid file extension. Required.

CR3_ALEIN_TID_PER_IDOC

Y or N

Specify "Y" to split IDOC packets containing multiple IDOCs and pass them as individual IDOCs to R/3. Specify "N" (the default) to pass multiple IDOCs to R/3 in one batch. Optional.

Managing Queues

CR3_ALEIN_IDOCIN_QUEUE

Queue Name

Name of the queue for messages containing processed IDOCs and their corresponding TIDs. By default, should be set to CR3_IDOC_IN. TMQFORWARD dequeues messages from this queue and forwards them to the CR3_IDOC_IN service for submission to R/3. Required.

CR3_ALEIN_IDOCIN_QUEUE_SPACE

Queue Space

Queue space that contains the CR3_IDOC_IN queue. Required.

CR3_ALEIN_ERROR_QUEUE

Queue Name

Name of the queue for messages containing IDOCs that the CR3_SUBMIT has received and rejected due to IDOC format or consistency errors. By default, should be set to CR3_ERROR. Required.

CR3_ALEIN_ERROR_QUEUE_SPACE

Queue Space

Queue space that contains the CR3_ERROR_QUEUE. Required.

Logging

CR3_ALEIN_PRINT_OPTION

F

Default output is to the TUXEDO USERLOG. You can write logging and tracing output to the file specified in CR3_ALEIN_PRINT_FILE by setting this environment variable to "F". Optional.

CR3_ALEIN_PRINT_FILE

Path and File

Specifies the full path and file for logging and tracing output if CR3_ALEIN_PRINT_OPTION is set to "F". Optional.

CR3_ALEIN_TRACE

Y or N

Specify "Y" to include detailed trace information in the log output. Optional.

Sample Environment File for ALE eLink to R/3 (cr3alein.env)

BEA eLink Adapter for R/3 ALE provides a semi-configured TUXEDO environment file (cr3alein.env) for use with ALE eLink to R/3. You should create a separate environment file for each ALE eLink to R/3 server specified in the cr3_ale.ubb configuration file.

Note the settings in the sample cr3alein.env file:

Listing 6-1 Sample Environment File (cr3alein.env)


CR3_DESTINATION=<R/3 system name>
CR3_CLIENT=<R/3 client id>
CR3_USER=<R/3 user>
CR3_PASSWORD=<R/3 password>
CR3_LANGUAGE=E
CR3_ALEIN_TID_FILE=<your eLink app directory>\cr3alein
CR3_ALEIN_TID_PER_IDOC=N
CR3_ALEIN_IDOCIN_QUEUE=CR3_IDOC_IN
CR3_ALEIN_IDOCIN_QUEUE_SPACE=QSPACE
CR3_ALEIN_ERROR_QUEUE=CR3_ERRQUE
CR3_ALEIN_ERROR_QUEUE_SPACE=QSPACE
CR3_ALEIN_PRINT_OPTION=F
CR3_ALEIN_PRINT_FILE=<your eLink app directory>\cr3alein.log
CR3_ALEIN_TRACE=Y


Note: You can use any directory for the eLink application directory. However, it is recommended that you use the same directory as the TUXEDO APPDIR.

Setting Up the eLink to R/3 Connection to R/3

To set up the eLink to R/3 connection to R/3, you must set environment variables and configure the sideinfo file. See Chapter 7, "Configuring R/3 Connections" for instructions.

Configuring Queues for ALE eLink to R/3

ALE eLink to R/3 requires that you set up two TUXEDO queues, CR3_ALE_ERROR_QUEUE, and CR3_ALE_IDOC_IN_QUEUE. See "Setting Up Queues for eLink to R/3 IDOCs" later in this topic for instructions.

Specifying the TID File for ALE eLink to R/3

ALE eLink to R/3 uses a TID file to log TIDs that it has already processed to guarantee that it delivers an IDOC packet to R/3 once and only once. You must specify the path and file name of the TID file (without an extension) in the CR3_ALEIN_TID_FILE environment variable, as shown in the following example:

CR3_ALEIN_TID_FILE=<your eLink app directory>\cr3alein

Upon start-up, if ALE eLink to R/3 does not find a TID file in the specified location, it creates one automatically. See "Configuring the TID File Manager" for information about configuring and administering the TID file.

Splitting eLink to R/3 IDOC Packets Containing Multiple IDOCs

By default, ALE eLink to R/3 passes an IDOC message containing multiple IDOCs to R/3 in a single packet. You can configure ALE eLink to R/3 to split IDOC messages containing multiple IDOCs into individual IDOC messages, each with its own TID. For example, if an IDOC message contains six IDOCs, ALE eLink to R/3 can create six IDOC separate packets, each containing a single IDOC and associated with a unique TID.

To split eLink to R/3 IDOC packets, set the CR3_ALEIN_TID_PER_IDOC environment variable to "Y", as shown in the following example:

CR3_ALEIN_TID_PER_IDOC=Y

See "Splitting eLink to R/3 IDOC Packets" in Chapter 2, "Integrating with ALE," in this guide for more information.

Configuring Logging for ALE eLink to R/3

By default, ALE eLink to R/3 writes logging output to the TUXEDO USERLOG. You can set the CR3_ALEIN_PRINT_OPTION environment variable to "F" to send output to a log file. If sending output to a file, you must specify its name and location in the CR3_ALEIN_PRINT_FILE environment variable.

You can also include trace information in the log by setting the CR3_ALEIN_TRACE environment variable to "Y". You exclude trace information by omitting this environment variable or setting it to "N".

The following example sets logging options for ALE eLink to R/3:

CR3_ALEIN_PRINT_OPTION=F
CR3_ALEIN_PRINT_FILE=<your eLink app directory>\cr3alein.log
CR3_ALEIN_TRACE=Y

Configuring Load Balancing for eLink to R/3 IDOCs

Multiple instances of ALE eLink to R/3 can log onto R/3 and submit eLink to R/3 IDOCs for processing. For deployments that involve high volumes of eLink to R/3 IDOCs, you can enhance system performance by balancing the load across multiple instances of ALE eLink to R/3.

Use TUXEDO's load balancing capabilities to manage the number of ALE eLink to R/3 instances running. See your BEA TUXEDO documentation regarding TUXEDO administrative tools for more information.

Note: Each instance of ALE eLink to R/3 requires a separate R/3 login, so be sure to tune the number of concurrent instances to optimize system performance without requiring excessive R/3 resources. Instances can log in using the same user name and password.

Configuring the ALE R/3 to eLink Client

The following topics describe how to configure the ALE R/3 to eLink client:

See "Setting Up Queues for R/3 to eLink IDOCs" later in this topic for configuration instructions.

ALE R/3 to eLink is a TUXEDO client that connects to R/3 by using the register mode; receives R/3 to eLink IDOC packets from R/3 via Transactional RFC (tRFC); encodes each IDOC packet to an FML32 message buffer; and queues the IDOC message into a TUXEDO queue for subsequent processing. See "Processing R/3 to eLink IDOCs" in Chapter 2, "Integrating with ALE," in this guide for more information about ALE R/3 to eLink.

Starting the ALE R/3 to eLink Client

You start ALE R/3 to eLink with a startup script that specifies environment variables and command line options.

Using the Startup Script for ALE R/3 to eLink

ALE R/3 to eLink is started with a script that defines a number of environment variables used to control the behavior of the server. BEA eLink Adapter for R/3 ALE provides a sample ALE R/3 to eLink startup program that is partially configured:

Command Line Options for ALE R/3 to eLink

To connect to R/3, you specify the following command line options to the cr3aleout command:

cr3aleout -a program-id -g gateway_host_name -x gateway_service_name

where program-id , gateway_host_name, and gateway_service_name are the appropriate values for your R/3 environment, as shown in the following example:

cr3aleout -a bea.cr3.beadoc1.ale -g hpsap -x sapgw00

These parameters are required to register with the SAP Gateway. The program-id must match a program ID that has already been configured for the specified gateway service on the specified R/3 host so that the ALE Subsystem can send IDOC packets to the correct ALE R/3 to eLink instance. See Configuring R/3 Connections, for more information about these start-up options.

Note: The cr3aleout command resides in the \adapters\sapr3_ale\bin subdirectory of your BEA eLink Adapter for R/3 ALE installation directory.

Setting Environment Variables for ALE R/3 to eLink

You can configure the following required and optional environment variables for ALE R/3 to eLink:

Table 6-2 Environment Variables for the ALE R/3 to eLink Client

Variable

Set To

Description

Configuring IDOC Routing

CR3_ALE_DEFAULT_TARGET_ID

Data-dependent routing (DDR) value

Default data-dependent routing value that is encoded in the CR3_TARGET_ID field in the FML32 message (if it is not specified in the destination map file). This value matches the field ID configured in the ROUTING section of the cr3_ale.ubb configuration file. To use DDR, the server group to receive the IDOC must also be configured. This environment variable must be defined even if it is a dummy value that is not defined in cr3_ale.ubb. Required.

CR3_ALEOUT_DEST_MAP_FILE

File Name

Destination map file specifies the mapping between R/3 to eLink IDOCs and the destination queue. Optional.

Splitting IDOC Packets

CR3_ALE_DEFAULT_IDOC_SPLIT

Y or N

If no destination map file is specified, then specifies whether IDOC packets containing multiple IDOCs are passed either together in a single message or split into separate IDOC packets, with one IDOC per message. Optional.

Configuring Queues

CR3_ALE_TARGET_QUEUE

Queue

Name of the default target TUXEDO queue. Used if no destination map file is specified or if no matching entry is found for the IDOC in the destination map file. Required.

CR3_ALE_TARGET_QUEUE_SPACE

Queue Space

Name of the TUXEDO queue space containing the default target queue. Required.

Configuring the TID Log File

CR3_ALEOUT_TID_FILE

Path and File Name

Name and location of the TID file. The file name must not include an extension. Required.

Logging Options

CR3_ALEOUT_PRINT_OPTION

S or F

Default output is to the TUXEDO USERLOG. Optional.

You can write logging and tracing output to file or stdout using these settings:

  • "S" sends output to stdout.

  • "F" sends output to the file specified in CR3_ALEOUT_PRINT_FILE.

CR3_ALEOUT_PRINT_FILE

Path and File

Specifies the full path and file for logging and tracing output if CR3_ALEOUT_PRINT_OPTION is set to "F". Optional.

CR3_ALEOUT_TRACE

Y of N

Specify "Y" to include detailed trace information in the log output. Optional.

These environment variables are defined in the server startup program.

Sample Startup Script for ALE R/3 to eLink (cr3aleout.bat)

The following sample Windows NT startup script specifies TUXEDO and ALE R/3 to eLink settings:

Listing 6-2 Sample Startup Script (cr3aleout.bat)


set CR3_BIN=<your eLink install directory>\adapters\sapr3_ale\bin
set TUXDIR=<your Tuxedo directory>
set APPDIR=<your eLink app directory>
set PATH=%TUXDIR%\bin;%APPDIR%;%PATH%
set TUXCONFIG=%APPDIR%\tuxconfig
set TLOGDEVICE=<your eLink app directory>\TLOG
set QMCONFIG=<your eLink app directory>\QUE
set FIELDTBLS32=cr3_ale.fml
set FLDTBLDIR32=<your eLink app directory>;<your Tuxedo directory>\udataobj
set CR3_ALE_TARGET_QUEUE=CR3_SUBMIT
set CR3_ALE_TARGET_QUEUE_SPACE=QSPACE
rem set CR3_MERCATOR_FV_IN=Y
set CR3_ALE_DEFAULT_TARGET_ID=CR3_ERROR
set CR3_ALE_DEFAULT_IDOC_SPLIT=N
rem set CR3_ALEOUT_DEST_MAP_FILE=<your eLink app directory>\cr3aleout.map
set CR3_ALEOUT_TID_FILE=<your eLink app directory>\cr3aleout
set CR3_ALEOUT_PRINT_OPTION=S
set CR3_ALEOUT_TRACE=Y
set CR3_ALEOUT_DUMP_IDOC_BUFFER=N
set CR3_ALEOUT_DUMP_IDOC_FML_BUFFER=N
%CR3_BIN%\cr3aleout.exe -a <your.program.id> -g <R/3 system> -x sapgw00


Note: This example applies to Windows NT. For Unix startup scripts, use the setenv command for the C shell or the export command for the Bourne or Korn shells.

Configuring Queues for ALE R/3 to eLink

ALE R/3 to eLink requires that you set up at least one default TUXEDO queue and additional queues as needed. See "Setting Up Queues for R/3 to eLink IDOCs" later in this topic for instructions.

Setting the Default Data-Dependent Routing Value

You can configure the default data-dependent routing (DDR) value that ALE R/3 to eLink assigns to each IDOC message (in the CR3_TARGET_ID field) that it queues. See your TUXEDO documentation for more information about data-dependent routing.

Note: To use DDR, the DDR value must match the field ID configured in the ROUTING section of the cr3_ale.ubb configuration file.

The following example sets the CR3_ALE_DEFAULT_TARGET_ID environment variable to a DDR value:

set CR3_ALE_DEFAULT_TARGET_ID=DDR_VALUE

See "Setting Data-Dependent Routing Values in the Map File" later in this topic and "Managing Data-Dependent Routing" in Chapter 2, "Integrating with ALE," in this guide for more information.

Configuring a Destination Map File

You can configure ALE R/3 to eLink to use a destination map file so that ALE R/3 to eLink can queue IDOC messages into different target queues, manage data-dependent routing, and group similar IDOC messages into larger IDOC messages. ALE R/3 to eLink makes routing and grouping decisions about individual IDOCs according to two settings specified in an IDOC's control record: the logical system ID of the target R/3 system and the IDOC message type. If a destination map file is used, ALE R/3 to eLink automatically splits IDOC packets containing multiple IDOCs into separate IDOC messages, with each message containing a single IDOC.

Structure of the Destination Map File

The destination map file is an ASCII text file. Each line denotes a separate entry and consists of the columns shown in Table 6-3:

Table 6-3 Columns in the Destination Map File

#

Column

Length

Description

1

RCVPRN

10

Logical System ID of the target R/3 logical system. If the logical system ID is fewer than ten characters long, you must pad spaces at the end until its length is ten characters.

2

MESTYP

6

Message type specified in the IDOC. If the message type is less than six characters long, you must pad spaces at the end until its length is six characters.

3

Compress

1

Compress (Y or N). Starting position is column 18. If Compress=Y, then ALE R/3 to eLink concatenates IDOC packets with matching logical system and IDOC message type values into a single IDOC message in the queue. If Compress=N, then ALE R/3 to eLink keeps the IDOCs in individual IDOC messages.

4

TargetId

variable

Data-dependent routing (DDR) value. Starting position is column 20. The value is encoded in the FML field CR3_TARGET_ID for use with DDR.

5

QueueSpace

variable

Name of the destination queue space for the IDOC message.

6

QueueName

variable

Name of the destination queue for the IDOC message.

Sample Destination Map File

The following is a sample destination map file:

Listing 6-3 Sample Destination Map File


LOGSYS1    MATMAS N DDR_VALUE_1 QSPACE1 QUEUE1
LOGSYS2 MATMAS Y DDR_VALUE_2 QSPACE1 QUEUE2
LOGSYS3 DEBMAS N DDR_VALUE_3 QSPACE2 QUEUE3
LOGSYS4 CREMAS Y DDR_VALUE_4 QSPACE3 QUEUE4


Setting the CR3_ALEOUT_DEST_MAP_FILE Environment Variable

To use a destination map file, you must specify its name and location in the CR3_ALEOUT_DEST_MAP_FILE environment variable, as shown in the following example:

set CR3_ALEOUT_DEST_MAP_FILE=your eLink app directory\cr3aleout.map

Specifying Default Target Queue Spaces and Queue Names in the Map File

You use the QueueSpace and QueueName columns in the destination map file to associate an IDOC with a destination TUXEDO queue space and queue. If an entry in the destination map file matches the logical system ID of the target R/3 system and the IDOC message type specified in an IDOC's control record, then ALE R/3 to eLink queues the IDOC into the specified queue space and queue name. If no matching entry is found in the destination map file, then ALE R/3 to eLink queues the IDOC message into the default queue space and queue, which are defined in the CR3_ALE_TARGET_QUEUE_SPACE and CR3_ALE_TARGET_QUEUE environment variables.

Note: You must create the default queue and any individual queues before processing R/3 to eLink IDOCs. See "Setting Up Queues for R/3 to eLink IDOCs" later in this topic for information.

Setting Data-Dependent Routing Values in the Map File

You use the TargetId column in the destination map file to associate an IDOC with a data-dependent routing value. If an entry in the destination map file matches the logical system ID of the target R/3 system and the IDOC message type specified in an IDOC's control record, then ALE R/3 to eLink encodes the specified TargetId value in the CR3_TARGET_ID FML32 field of the IDOC message. If no matching entry is found in the destination map file, then ALE R/3 to eLink encodes the default DDR value, which is defined in the CR3_ALE_DEFAULT_TARGET_ID environment variable. See "Setting the Default Data-Dependent Routing Value" earlier in this topic for more information.

Note: To use DDR, the DDR value must match the field ID configured in the ROUTING section of the cr3_ale.ubb configuration file.

Compressing R/3 to eLink IDOCs

You use the Compress column in the destination map file to combine IDOC messages with matching logical system IDs and IDOC message types into an IDOC message containing multiple IDOCs. If an entry in the destination map file matches the logical system ID of the target R/3 system and the IDOC message type specified in an IDOC's control record, and if the Compress column is "Y", then ALE R/3 to eLink aggregates the entry in the destination map file with other matching IDOCs in a single, larger IDOC message that it then queues into the appropriate target queue. If the Compress column is "N", then ALE R/3 to eLink queues each IDOC message separately.

Splitting R/3 to eLink IDOC Packets

If no destination map file is specified, you can configure ALE R/3 to eLink to split IDOC packets containing multiple IDOCs into separate IDOC messages, each containing a single IDOC. By default, ALE R/3 to eLink queues the entire IDOC packet. If you set the CR3_ALE_DEFAULT_IDOC_SPLIT environment variable to "Y", ALE R/3 to eLink will split the IDOC packet into individual IDOC packets. See "Splitting R/3 to eLink IDOC Packets Into Individual IDOCs" in Chapter 2, "Integrating with ALE," in this guide for more information.

Specifying the TID File for ALE R/3 to eLink

ALE R/3 to eLink uses a TID file to log TIDs that it has already processed to guarantee that it queues an IDOC packet from R/3 once and only once. You must specify the path and file name of the TID file (without an extension) in the CR3_ALEOUT_TID_FILE environment variable, as shown in the following example (Windows NT):

CR3_ALEOUT_TID_FILE=<your eLink app directory>\cr3aleout

Upon start-up, if ALE R/3 to eLink does not find a TID file in the specified location, it creates one automatically. See "Configuring the TID File Manager" later in this topic for information about configuring and administering the TID file.

Configuring Logging for ALE R/3 to eLink

By default, ALE R/3 to eLink writes logging and tracing output to the TUXEDO USERLOG. You can set the CR3_ALEOUT_PRINT_OPTION environment variable to "S" to send output to stdout, or you can set it to "F" to send output to a log file. If your are sending output to a file, you must specify its name and location in the CR3_ALEOUT_PRINT_FILE environment variable.

You can also include trace information in the log by setting the CR3_ALEOUT_TRACE environment variable to "Y". You exclude trace information by omitting this environment variable or setting it to "N".

The following example from a startup script file (Windows NT) sets logging options for ALE R/3 to eLink:

set CR3_ALEOUT_PRINT_OPTION=S
set CR3_ALEOUT_TRACE=Y

Configuring Load Balancing for R/3 to eLink

Multiple instances of ALE R/3 to eLink can register using the same program ID. For deployments that involve high volumes of R/3 to eLink IDOC packets, you can enhance system performance by balancing the load across multiple instances of ALE R/3 to eLink. Instances that register under the same program ID must also share the same TID file.

To run multiple instances of ALE R/3 to eLink, specify the shared TID file (set the CR3_ALEOUT_TID_FILE environment variable), and then run the cr3aleout command multiple times. The following example launches three instances of ALE R/3 to eLink using the program ID bea.cr3.beadoc1.ale:

Listing 6-4 Sample Commands Launching Multiple ALE R/3 to eLink Instances


set CR3_BIN=<your eLink install directory>\adapters\sapr3_ale\bin
CR3_ALEOUT_TID_FILE=<your eLink app directory>\cr3aleout
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.ale -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.ale -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.ale -g hpsap -x sapgw00


Note: Instances of ALE R/3 to eLink that share the same TID file should all be launched on the same machine.

See "Load Balancing High Volumes of R/3 to eLink IDOCs" in Chapter 2, "Integrating with ALE," of this guide.

Configuring Multiple Program IDs

If R/3 is configured to send R/3 to eLink IDOCs to different program IDs, you can configure ALE R/3 to eLink to handle these IDOCs by running multiple instances of ALE R/3 to eLink using different program IDs. You must make sure that all instances sharing the same program ID also share the same TID file, and that all instances sharing the same TID file also share the same program ID. Instances that register under different program IDs must not share the same TID file.

The following example launches three instances of ALE R/3 to eLink using the program ID bea.cr3.beadoc1.aleX and three other instances of ALE R/3 to eLink using the program ID bea.cr3.beadoc1.aleY :

Listing 6-5 Sample Commands Launching Multiple ALE R/3 to eLink Instances


set CR3_BIN=<your eLink install directory>\adapters\sapr3_ale\bin
CR3_ALEOUT_TID_FILE=<your eLink app directory>\cr3aleoutX
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleX -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleX -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleX -g hpsap -x sapgw00
CR3_ALEOUT_TID_FILE=<your eLink app directory>\cr3aleoutY
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleY -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleY -g hpsap -x sapgw00
%CR3_BIN%\cr3aleout.exe -a bea.cr3.beadoc1.aleY -g hpsap -x sapgw00


Note: Instances of ALE R/3 to eLink that share the same TID file should all be launched on the same machine.

See "Registering Multiple Program IDs" in Chapter 2, "Integrating with ALE," in this guide for more information.

Configuring Queues

The following topics describe how to create and configure TUXEDO queues for ALE processing:

TUXEDO Queues

You must set up queues for both ALE eLink to R/3 and ALE R/3 to eLink. You need to create and configure the Server Group (TMS_QM), Message Queue Server (TMQUEUE) and Message Forwarding Server (TMQFORWARD). See the /Q Guide in your BEA TUXEDO documentation for more information about TUXEDO queues.

Setting Up Queues for eLink to R/3 IDOCs

ALE eLink to R/3 uses the following queues:

Queue Name

Description

CR3_SUBMIT

IDOC submit queue. Handles IDOC packets that a TUXEDO application or other application has submitted to the CR3_SUBMIT service for processing.

CR3_ERROR

IDOC error queue. Handles invalid IDOC packets that have failed validation by the CR3_SUBMIT service.

CR3_IDOC_IN

IDOC eLink to R/3 queue. Handles IDOC packets that the CR3_SUBMIT service has validated, assigned a TID, and queued. TMQFORWARD forwards each IDOC packet to the CR3_IDOC_IN service for submission to R/3.

Use the TUXEDO Queue manager administration utility (qmadmin) to create these queue spaces and queues. See the /Q Guide in your BEA TUXEDO documentation for instructions.

Defining the TMQUEUE and TMQFORWARD Servers in the UBB File

In the SERVERS section of your UBB file, define the TMQUEUE and TMQFORWARD servers:

Listing 6-6 Sample SERVERS Section of UBB File


TMQUEUE
SRVGRP=QUE SRVID=1
CLOPT="-s QSPACE:TMQUEUE -- "
TMQFORWARD
SRVGRP=QUE SRVID=2
CLOPT=" -- -i 10 -q CR3_IDOC_IN,CR3_SUBMIT"


Setting Environment Variables

After creating the error and eLink to R/3 queue spaces and queues, specify their names in environment variables:

Listing 6-7 Setting Environment Variables for Queues


SET CR3_ALEIN_IDOCIN_QUEUE=CR3_IDOC_IN
SET CR3_ALEIN_IDOCIN_QUEUE_SPACE=QSPACE
SET CR3_ALEIN_ERROR_QUEUE=CR3_ERROR
SET CR3_ALEIN_ERROR_QUEUE_SPACE=QSPACE


See Table 6-1, "Environment Variables for the ALE eLink to R/3 Server," earlier in this topic for a description of these environment variables.

Setting Up Queues for R/3 to eLink IDOCs

ALE R/3 to eLink can queue R/3 to eLink IDOC messages into one or more queues. At a minimum, you must create at least one default queue. If you are using a destination map file to queue IDOC messages to multiple queues, you must create all the target queues, including the default queue.

Use the TUXEDO Queue manager administration utility (qmadmin) to create these queue spaces and queues. See the /Q Guide in your BEA TUXEDO documentation for instructions.

After creating the R/3 to eLink queues, specify the default queue space and queue name in environment variables, as shown the following example:

set CR3_ALE_TARGET_QUEUE=CR3_SUBMIT
set CR3_ALE_TARGET_QUEUE_SPACE=QSPACE

See Table 6-2, "Environment Variables for the ALE R/3 to eLink Client," earlier in this topic for a description of these environment variables.

Configuring the TID File Manager

The following topics describe the TID File Manager, a command line utility that manages the size of the TID file in the run-time environment:

Command Line Options

The TID File Manager uses the command line options shown in Table 6-4:

Table 6-4 Command Line Options for the TID File Manager

Option

Description

-h or -?

Help text that describes each option.

-f

Name of the TID file (path is optional). Required.

-n

Number of lines to keep in the TID file. Default is 10 lines. If the date (-d) option is also specified, this setting overrides the date setting. The TID File Manager retains at least this number of lines in the original TID file.

-t

Frequency (in seconds) with which the TID File Manager periodically checks the TID file. Default is 60 seconds. If this option is omitted, then the TID File Manager runs once and exits. If this option is specified, the TID File Manager keeps running. Optional.

-d

Last save date. The TID File Manager removes any CONFIRMED entries that are older than the specified date. Valid date formats include:

  • Jan/1/2000

  • 2000,1,jan

  • "1 JAN 2000"

Running the TID File Manager

To run the TID File Manager, enter the following command:

cr3tidmanager -f FileName [OptionalParameters]

where FileName is required and OptionalParameters include any of the other options in Table 6-4, "Command Line Options for the TID File Manager," on page 6-23.

Note: You must run a separate TID File Manager for each TID file used by instances of ALE eLink to R/3 and ALE R/3 to eLink.

How the TID File Manager Works

Upon startup, the TID File Manager does the following:

Because the TID File Manager locks the file while editing, be careful to specify a large enough frequency to contain the file size without slowing run-time performance.