Showing posts with label SAP Gateway. Show all posts
Showing posts with label SAP Gateway. Show all posts

Displaying and Managing Existing CPI-C Connections

By choosing Goto ® Active connections ® Details, you can display details on the active CPI-C connections on which the cursor is positioned in the initial screen. This is important for specialists, particularly for troubleshooting purposes.

Use the menu path Goto ® Active Connections to:

· Interrupt or delete the connection (see Deleting a CPI-C Connection)

· Reset the error counter for this connection or all error counters (see Resetting Error Counters)

· Activate or deactivate the trace function for the selected connection(s). Unlike the procedure described in Activating Traces, trace level 2 for the selected connections.

Deleting a CPI-C Connection

There are two ways of clearing down a connection.

By choosing Goto ® Active connections ® Interrupt connection, you can clear down the connection; a corresponding return value, however, remains in the connection table so that the CPI-C programs affected can be informed.

When you choose Goto --> Active connections --> Delete connection, the connection is cleared down and the corresponding entry is deleted from the connection table.


To use this function the system authorization profile S_ADMI_FCD is needed (Tools ® Administration, Maintain users ® Profiles).

Display Gateway Work Processes

This function is only relevant for monitoring an SNA gateway (Goto ® Gateway ® SNA Gateway).

You can display a list of work processes via Goto ® Work processes. The following values are displayed for each gateway work process started:

· Number in the process table

· Number of CPI-C connections assigned to this process

· Number of times this process has been started so far

· Status of the process:

READY: Process awaits request

BUSY: Process working on a request

· Number of the CPI-C connection currently served

(Number in connection table)

· Number of the request block which holds the CPI-C function you have just executed

Memory Management of the SAP Gateway

Overflow Area

The gateway stores its data in the overflow area.
This area in the heap memory is retrieved by the gateway during initialization with malloc()(default 1 MByte). The size of the overflow area is specified by the profile parameter gw/max_overflow_size.

The profile parameter gw/max_overflow_usage (specified as a percentage) specifies the usage of the overflow area as of which the gateway slows down the sender. If this value is exceeded, the sender is slowed down by SYNC calls. An SYNC ensures that control is returned to the sender only when the data has been retrieved by the receiver. You must, however, make sure that 5 CPIC requests can still be saved in the gateway, since the sender only executes CMSEND synchronously with every 5th request.

CPIC Requests

A specific number of requests can be temporarily stored per CPIC connection. The number of requests is determined by the profile parameter gw/req_stack_size. The default is 30. When the number of requests stored at a time exceeds the threshold value (max(stack_size-6,90% stack_size)), the sender is slowed down by SYNC calls (see above).

Changing Gateway Parameters

Use

Some of the gateway parameters can be changed dynamically. The system does not have to be restarted.

Procedure

Choose Go to -->Parameters -->Change. A screen opens showing all gateway parameters. Parameters that can be dynamically changed have a white background. You can enter the new values here.

Caution

When making dynamic changes, note that these are lost the next time the system is restarted. To make your changes permanent, you have to make them in the profile file.

You can view the RZ11 documentation for any parameter by placing your cursor on the parameter and choosing This graphic is explained in the accompanying text Documentation.

Using the SAP Gateway Outside the SAP System

Use

The gateway monitor is used to analyze and administer the SAP Gateway from outside the SAP System.

The profile you assign to it must be the same as for the gateway.

This process has different names:

UNIX: gwmon

Windows: gwmon.exe

Integration

The trace file of the gateway monitor is called: dev_gwmon.

The functionality is the same as that of the SAP Gateway Monitor in the SAP System, the only difference being the menu and submenus.

The detailed information displayed by double-clicking a connection in the SAP system is available here under the Expert Functions.

Features

When you launch the Gateway Monitor without arguments, all of the permitted arguments and options are displayed:

Output Area

Meaning

pf=:

Specify Name of parameter file or

System number

Specify the profile file or

Specify the number of the system

nr=:

[-V]:

Print release

Output release

[-refresh n]:

Refresh after n seconds

Refresh after n seconds

[-gwhost host]:

Hostname of remote gateway

Host name of the remote gateway

[-gwserv service]:

Service of remote gateway

Service name of the remote gateway

[-expert]

enable expert functions

Enable expert functions

[-sna]

enable sna functions

Enable the SNA functions

[-noheader]

Suppress headers

Suppress headers

[-cmdfile file]

Execute commands from cmdfile

if filename '-' read from stdinv

Execute commands from the file. You can display the possible commands, when you enter “-”as the file name and then choose help.

If you start the gateway monitor using the option –sna, you will also see the following output:

[-e all]:

Reset error counts of all connections

Reset error counts for all connections

[-e :

Reset error count of specified connection

Reset error count for the connection with the number

The individual functions are grouped into separate submenus.

Main Menu

When you enter gwmon -gwhost -gwserv , the list of activate connections on the gateway is first displayed. Under this:

q - quit

m - menu

You generally quit the Gateway Monitor with q and use m to go to the (next higher) menu.

If you then enter m and select Return, you will get to the main menu:

Screen output

Meaning

1 : display connection table

Display Active CPI-C Connections

2 : display work process table

Display Gateway Work Processes

3 : display client table

Display the Logged On Systems

4 : display remote gw table

Display Remote Table

5 : connection attributes

Connection Attributes

6 : statistics

Gateway Statistics

7 : gateway parameters and attributes

Displaying Parameters and Attributes of the SAP Gateway

8 : gateway release info

Displaying Gateway Release Information

9 : security information

Display Security Information

10 : expert functions

Expert Functions

+ : increase gateway trace

Increase gateway trace level

- : decrease gateway trace

Decrease gateway trace level

q - quit

Exit Gateway Monitor

Inputs 4,5,7 and 8 lead to submenus that provide functions for the relevant areas.

Activities

To start the gateway monitor, call the corresponding executable file, specifying a profile file:

Under UNIX: gwmon pf=

Under Windows: gwmon.exe pf=

All of the lists are updated after 5 seconds. You can refresh them sooner by pressing Enter.

It is standard to use 50 lines per screen. The number of lines can be changed (for example, under UNIX you can set the shell variable LINES).

Switch command mode

If you use the option -cmdfile , all the functions to be executed are read from the file (see below). If the file name is '-', all the commands from the standard input are read. As a result the monitor can be operated from a program or script to start specific actions or to supply information.

Example

echo GET_CONNTBL | gwmon -cmdfile - -gwhost -gwserv gets the list of active CPIC connections.

The command field interface provides the same functions as the functions from the menu. You can also execute the same function repeatedly.

You can display all the available functions using HELP. If you do not enter anything and choose , the last command is repeated. HELP [command]displays the online help for the command.

Using the SAP Gateway Monitor in the SAP System

Use

The Gateway Monitor is used for analyzing and administrating the SAP Gateway in the SAP system.

The initial screen of the gateway monitor shows all the active gateway connections on this instance.

This graphic is explained in the accompanying text

The fields on this screen have the following meaning:

Number

Connection number

LU Name

The term "logical unit" is a term borrowed from SNA and describes a logical node in an SNA network. The remote partner program is intended to run on this node.

With CPIC connections via TCP/IP, this field describes the host on which the partner program is running or supposed to run.

TP Name

Long transaction program name or the name of the program that was started by the gateway.

User

Name of the user who is currently using the connection

Status

This field indicates the status of the connection:

FREE : Connection is not being used

INIT : Connection is being initialized

INITIALIZED : Connection initialized

CONNECT : Setting up connection

CONNECTED : Connection set up

DISCONNECT : Connection to be closed down

DISCONNECTED : Connection closed down

Symbolic (Destination)

The symbolic destination is required when CPIC connections are set up and is a key for the TXCOM and side information tables. These tables manage the required connection parameters.

First the system attempts to read unknown parameters from table TXCOM. Afterwards the gateway reads all the parameters not defined in this table from the side information.

Conversa(tion ID)

The conversation ID is a unique number that can be used to identify the connection. By clicking this field, you can display details of the connection.

Prot

This field indicates the protocol agreed with the client:

R2PR: R/2 presentation

INT : Internal communication

EXT : External communication

REG : External communication with registered program

CPIC: CPI-C communication

NE : External communication, not started by gateway

Last Req

Time of last activity

SAP

SAP return code: These return values are defined by SAP; you can display an overview in F1 help. The previous and following syslog messages provide further details on the source of the error. If the syslog messages are not sufficient, the relevant trace files must be analyzed.

The return codes are described under Error Analysis.

CPIC

CPI-C return code: The return values of the individual CPI-C functions and their meaning are defined in the "X/Open Developers' Specification - CPI-C". You can display an overview in F1 help. The previous and following syslog messages provide further details on the source of the error. If the syslog messages are not sufficient, the relevant trace files must be analyzed.

Integration

You can also run the Gateway Monitor from outside the SAP system, from operating systems. This is described in detail in the section Using the SAP Gateway Monitor from Outside the SAP System.

Features

You can perform the following functions in the SAP Gateway Monitor:

Local Gateway or SNA Gateway

Display the Logged On Systems

Displaying Remote Gateways

Displaying Existing CPI-C Connections

Deleting a CPI-C Connection

Resetting the Error Count

Display Gateway Work Processes

Displaying Gateway Release Information

Displaying Parameters and Attributes of the SAP Gateway

Changing Gateway Parameters

Activating Tracing for External Programs

The section Expert Functions contains details of other, less frequently used functions. The functions are used mainly by SAP to analyze problems.

Activities

You can launch the Gateway Monitor via transaction SMGW or by choosing the following menu path: Administration ® System Administration -->Monitor-->System Monitoring -->Gateway Monitor

Architecture of the SAP Gateway

Each instance of an SAP System has a gateway. The gateway enables communication between work processes and external programs, as well as communication between work processes from different instances or SAP Systems.

Gateway Processes

The SAP Gateway is made up of various processes:

· Gateway read process

· Gateway monitor

These processes are described in the following topics.


Earlier gateway releases that support DCAM and SNA have additional gateway work processes (gwwp, gwwp.exe).

Gateway Read Process

Gateway read (gwrd, gwrd.exe) is the main process in the gateway system.

It is started by the application server (dispatcher) and checked by it periodically.

The gateway reader receives and processes all CPI-C requests.


If the executable gwrd program is called without parameters or with the switch -help, the program outputs a description of the possible command parameters, as well as all the patches.

Gateway Monitor

The gateway monitor (gwmon, gwmon.exe) is used to analyze and administer the SAP Gateway.

When you start it, you initially get a list of active CPI-C connections. You can call up all the other monitor functions via a menu.

You can monitor the gateway from the SAP System (transaction SMGW) or from the operating system.

SAP Gateway

Purpose

The SAP Gateway carries out CPI-C services within the SAP world, which are based on TCP/IP. These services enable SAP Systems and external programs to communicate with one another.

CPI-C services can be used either in the ABAP program or for the external programs via the interfaces.

As RFC (remote function call) is based on CPI-C, all RFC connections also pass through the SAP Gateway.

Implementation Considerations

In the SAP System, an SAP Gateway is started for each application server (see Architecture of the SAP Web AS).

For certain constellations, an SAP Gateway is used as a separately installed SAP instance or used outside an SAP System:

· Communication with an R/2 System (CUA interface to R/2)

· Starting external partner programs on remote systems which do not recognize any remote shells (Windows)

· Application-specific decoupling of communication (in certain cases)

You should install the SAP Gateway in the same way as you install all other SAP programs, that is in the executable files directory of the corresponding system tree.