[Table of Contents] [Index] [Previous] [Next] Configuring ALE Integration

# Configuring ALE Integration

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

- Configuring the ALE Inbound Server

- Configuring the ALE Outbound Client

- Configuring Queues

- Configuring the TID File Manager

  Note: You need to complete the tasks in this chapter only if you require application integration with ALE.

Using BEA eLink Adapter for R/3, TUXEDO applications can exchange SAP Intermediate Documents (IDOCs) with R/3 systems. See Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information about ALE integration.

## Configuring the ALE Inbound Server

This section describes how to configure the ALE Inbound server. It includes the following topics:

- Configuring the UBB File for ALE Inbound

- Setting Environment Variables for ALE Inbound

- Configuring Load Balancing for Inbound IDOCs

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

- Setting Up Queues for Inbound IDOCs

- Configuring Inbound Connections in Configuring R/3 Connections

ALE Inbound is a TUXEDO server that submits IDOC packets to R/3 via tRFC. ALE Inbound 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 Inbound IDOCs in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information about ALE Inbound.

### Configuring the UBB File for ALE Inbound

ALE Inbound 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 Inbound server. See Sample cr3.ubb File for a listing of the sample UBB file that comes with BEA eLink Adapter for R/3.

#### Defining the Server Group

You must first define the server group (such as CR3) to which the ALE Inbound belongs, as described in TUXEDO Initialization File in Configuring TUXEDO.

#### Defining the ALE Inbound Server and Environment File

In the SERVERS section of your UBB file, you must define the ALE Inbound server, specifying its server group and server ID, as shown in the following example:

>     cr3alein
>               SRVGRP=CR3 SRVID=3

You must also define the environment file for the ALE Inbound Server, as shown in the following example:

>               ENVFILE="cr3alein.env"

#### Defining ALE Inbound Services

In the SERVICES section of your UBB file, you must 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 Inbound

The ALE Inbound server requires environment variables that specify connection information to R/3 and the behavior of the server. 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 Inbound

You can configure the following required and optional environment variables for ALE Inbound:

> Table 5-1 Environment Variables for the ALE Inbound 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 Inbound 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 Inbound (cr3alein.env)

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

Listing 5-1 shows the settings in the sample cr3alein.env file:

> Listing 5-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 recommmended that you use the same directory as the TUXEDO APPDIR.

#### Setting Up the Inbound Connection to R/3

To set up the inbound connection to R/3, you must set environment variables and configure the sideinfo file. See Configuring Inbound Connections in Configuring R/3 Connections for instructions.

#### Configuring Queues for ALE Inbound

ALE Inbound requires that you set up two TUXEDO queues, CR3_ALE_ERROR_QUEUE, and CR3_ALE_IDOC_IN_QUEUE. See Setting Up Queues for Inbound IDOCs for instructions.

#### Specifying the TID File for ALE Inbound

ALE Inbound 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 Inbound 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 Inbound IDOC Packets Containing Multiple IDOCs

By default, ALE Inbound passes an IDOC message containing multiple IDOCs to R/3 in a single packet. You can configure ALE Inbound 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 Inbound can create six IDOC separate packets, each containing a single IDOC and associated with a unique TID.

To split inbound 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 Inbound IDOC Packets in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information.

#### Configuring Logging for ALE Inbound

By default, ALE Inbound 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 Inbound:

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

### Configuring Load Balancing for Inbound IDOCs

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

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

Note: Each instance of ALE Inbound 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 Outbound Client

This section describes how to configure the ALE Outbound client. It includes the following topics:

- Starting the ALE Outbound Client

- Setting Environment Variables for ALE Outbound

- Configuring Load Balancing

- Configuring Multiple Program IDs

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

- Setting Up Queues for Outbound IDOCs

ALE Outbound is a TUXEDO client that connects to R/3 using the register mode, receives outbound IDOC packets from R/3 via Transactional RFC (tRFC), encodes each IDOC packet to an FML32 message buffer, and enqueues the IDOC message into a TUXEDO queue for subsequent processing. See Processing Outbound IDOCs in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information about ALE Outbound.

### Starting the ALE Outbound Client

You start ALE Outbound with a startup script that specifies environment variables and command line options.

#### Using the Startup Script for ALE Outbound

ALE Outbound 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 provides a sample ALE Outbound startup program that is partially configured:

- UNIX: cr3aleout.sh (Bourne shell format)

- Windows NT: cr3aleout.bat

#### Command Line Options for ALE Outbound

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 Outbound instance. See Configuring Outbound Connections in Configuring R/3 Connections for more information about these start-up options.

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

### Setting Environment Variables for ALE Outbound

You can configure the following required and optional environment variables for ALE Outbound:

> Table 5-2 Environment Variables for the ALE Outbound 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.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.ubb. Required.
`CR3_ALEOUT_DEST_MAP_FILE` | File Name | Destination map file specifies the mapping between outbound 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 Outbound (cr3aleout.bat)

Listing 5-2 shows a sample startup script that specifies TUXEDO and ALE Outbound settings:

> Listing 5-2 Sample Startup Script (cr3aleout.bat)

>     set CR3_BIN=<your eLink install directory>\adapters\sapr3\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.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 Outbound

ALE Outbound requires that you set up at least one default TUXEDO queue and additional queues as needed. See Setting Up Queues for Outbound IDOCs for instructions.

#### Setting the Default Data-Dependent Routing Value

You can configure the default data-dependent routing (DDR) value that ALE Outbound assigns to each IDOC message (in the CR3_TARGET_ID field) that it enqueues. 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.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 and Managing Data-Dependent Routing in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information.

#### Configuring a Destination Map File

You can configure ALE Outbound to use a destination map file so that ALE Outbound can enqueue IDOC messages into different target queues, manage data-dependent routing, and group similar IDOC messages into larger IDOC messages. ALE Outbound 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 Outbound 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 following columns:

> Table 5-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 is less 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 Outbound 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 Outbound 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

Listing 5-3 shows the contents of a sample destination map file:

> Listing 5-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 Outbound enqueues the IDOC into the specified queue space and queue name. If no matching entry is found in the destination map file, then ALE Outbound enqueues 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 outbound IDOCs. See Setting Up Queues for Outbound IDOCs 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 Outbound 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 Outbound 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 for more information.

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

##### Compressing Outbound 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 Outbound aggregates this with other matching IDOCs in a single, larger IDOC message that it then enqueues into the appropriate target queue. If the Compress column is "N", then ALE Outbound enqueues each IDOC message separately.

#### Splitting Outbound IDOC Packets

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

#### Specifying the TID File for ALE Outbound

ALE Outbound uses a TID file to log TIDs that it has already processed to guarantee that it enqueues 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 Outbound 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.

#### Configuring Logging for ALE Outbound

By default, ALE Outbound 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 Outbound:

>     set CR3_ALEOUT_PRINT_OPTION=S
>     set CR3_ALEOUT_TRACE=Y

### Configuring Load Balancing

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

To run multiple instances of ALE Outbound, specify the shared TID file (set the CR3_ALEOUT_TID_FILE environment variable), and then run the cr3aleout command multiple times. Listing 5-3 launches three instances of ALE Outbound using the program ID bea.cr3.beadoc1.ale:

> Listing 5-4 Sample Commands Launching Multiple ALE Outbound Instances

>     set CR3_BIN=<your eLink install directory>\adapters\sapr3\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 Outbound that share the same TID file should all be launched on the same machine.

See Load Balancing High Volumes of Inbound IDOCs in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information.

### Configuring Multiple Program IDs

If R/3 is configured to send outbound IDOCs to different program IDs, you can configure ALE Outbound to handle these IDOCs by running multiple instances of ALE Outbound 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.

Listing 5-5 launches three instances of ALE Outbound using the program ID bea.cr3.beadoc1.ale`X` and other three instances of ALE Outbound using the program ID bea.cr3.beadoc1.ale`Y`:

> Listing 5-5 Sample Commands Launching Multiple ALE Outbound Instances

`set CR3_BIN=<your eLink install directory>\adapters\sapr3\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 Outbound that share the same TID file should all be launched on the same machine.

See Registering Multiple Program IDs in Integrating with ALE in the BEA eLink Adapter for R/3 User Guide for more information.

## Configuring Queues

This section describes how to create and configure TUXEDO queues for ALE processing. It includes the following topics:

- About TUXEDO Queues

- Setting Up Queues for Inbound IDOCs

- Setting Up Queues for Outbound IDOCs

### About TUXEDO Queues

You must set up queues for both ALE Inbound and ALE Outbound. 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 Inbound IDOCs

ALE Inbound 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 inbound queue. Handles IDOC packets that the CR3_SUBMIT service has validated, assigned a TID, and enqueued. 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, you must define the TMQUEUE and TMQFORWARD servers, as shown in Listing 5-6:

> Listing 5-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 inbound queue spaces and queues, you must specify their names in environment variables, as shown in Listing 5-7:

> Listing 5-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 5-1, "Environment Variables for the ALE Inbound Server" for a description of these environment variables.

### Setting Up Queues for Outbound IDOCs

ALE Outbound can enqueue outbound 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 enqueue 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 outbound queues, you must 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 5-2, "Environment Variables for the ALE Outbound Client" for a description of these environment variables.

## Configuring the TID File Manager

This section describes the TID File Manager, a command line utility that manages the size of the TID file in the run-time environment. It contains the following sections:

- Command Line Options

- Running the TID File Manager

- How the TID File Manager Works

### Command Line Options

The TID File Manager uses the following command line options:

> Table 5-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 5-4, "Command Line Options for the TID File Manager".

Note: You must run a separate TID File Manager for each TID file used by instances of ALE Inbound and ALE Outbound.

### How the TID File Manager Works

Upon startup, the TID File Manager does the following:

- Locks the specified TID file.

- Creates a backup file using the original file name plus the date-time and a .bck extension.

- Removes from the TID log file only CONFIRMED entries that meet the configured criteria.

- Appends each removed entry to the backup file.

- Saves both files.

- Releases the file lock.

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.

[Table of Contents] [Index] [Previous] [Next]