Tuesday, May 24, 2011

Parallelizing Send Processes for Improved Performance

To improve performance for busy message periods, you have the option of parallelizing the SAPconnect send process. This enables send requests to be processed on multiple work processes that can run on different application servers. Only one background job is executed, which starts multiple work processes. This divides the send requests into packages and sends them in parallel over different servers. These work processes are dialog work processes that are started in addition to the work process on which the send job (report RSCONN01) is running.
 

The option of dividing up send requests requires additional control parameters, however these do not normally have to be changed. These are parameters of report RSCONN01. These parameters are job-specific, meaning that different parameters can be set for different send jobs. They can be set when creating a send job in the job maintenance. They are always stored as variants of report RSCONN01.

Prerequisites

You must only implement parallelization if a very large number of send requests have to be processed, subsequently hindering the performance.

Procedure

To parallelize the send process, proceed as follows:

...

       1.      Call transaction SCOT and choose Settings  ® Send Jobs  or symbol This graphic is explained in the accompanying text (send jobs).

       2.      Choose Schedule Job.

You are given a menu for the different address types (FAX, INT and so on). You use this to preselect the job name and the standard variant delivered by SAP that are to serve as a template for the job. You can still change these values in the subsequent dialog box Send Job: Select Variant.

       3.      If required, adjust the job values or variant values in the dialog box Send Job: Select Variant.

If individual parameters of the selected variant are changed, a prompt appears after confirming the changes, asking you to save the variant. Here you can still change the variant name, which creates a new variant with this name.

The values in the Job Values group box always depend on the variant chosen above. If you change the values here, you also have to save a new variant for them.

As the same thing happens during parallelization, from a technical point of view, as when starting the send process, the fields in the Variant Values group box are the same as those that are displayed under Utilities ® Start Send Process:

Field

Variant Value

Number of Work Processes

If a value greater than 1 has been entered in the Number of Work Processes field for an SAPconnect send job, the processing of the messages being sent is distributed across the corresponding number of dialog work processes.

If the value for Number of Work Processes is set to 1, or if the number of waiting messages lies below a defined threshold value, no parallelization takes place, and no additional dialog work process is used. You configure this threshold value using the Minimum Packet Size parameter (under Details).

 

Server Group

The Server Group parameter specifies the application server that is used for the send process. If no value has been entered, then all available servers are used.

If the number of work processes is set to 1, this parameter can be ignored.

 

Details

Under Details you can find parameters for maximum and minimum packet size, maximum number of send requests to be read at once from the queue, timeout factor for each send request, timeout offset for aRFCs and Commit Work.

In most cases, you do not have to change the predefined settings for these details parameters that were delivered by SAP. For help about the individual fields, see the system documentation (F1 help) or the info buttons on the user interface.

 

 

 

Scheduling a Send Process as a Background Job

A send process should be scheduled periodically. The period should not be too short. Performance can therefore be optimized because the RFC connection is used many times (for example, every 5 minutes during busy message periods and every 15 minutes for quiet message periods). During busy message periods, the SAPconnect send processes should be distributed across various SAP application servers or all assigned to one dedicated SAP application server.

Procedure

You can schedule a send process as a background job in two ways:

·        Conventional Job Scheduling

·        Simplified Job Scheduling
 
 
Conventional Job Scheduling
 
 1.      Call transaction SCOT to start SAPconnect administration and choose View ® Jobs
 
  2.      Choose This graphic is explained in the accompanying text
 
  3.      Enter a job name.
 
A list of all the available variants is displayed.
 
 4.      Position the cursor on the variant that you want to start the send process with.

This graphic is explained in the accompanying text

You can also create a new variant or change an existing variant. To do this, choose This graphic is explained in the accompanying text Variant or This graphic is explained in the accompanying text Variant. Proceed as described in Variant Maintenance. Then choose This graphic is explained in the accompanying text to return to the list of available variants and position the cursor on the new variant.

  5.      Choose Schedule.

  6.      Specify the first date for execution.

  7.      Choose Schedule periodically.

 8.      Specify the length of the interval after which the job is to be started, for example every 5 minutes, depending on the amount of transmission activity in your system.

 9.      Choose This graphic is explained in the accompanying text.  

 

 Simplified Job Scheduling 

1.      Call transaction SCOT and choose Settings  ® Send Jobs or the job symbol from the toolbar.

 2.      Choose Schedule Job.

You are given a menu for the different address types (FAX, INT and so on). You use this to preselect the job name and the standard variant delivered by SAP that are to serve as a template for the job. You can still change these values in the subsequent dialog box Send Job: Select Variant.

 3.      If required, adjust the job values or variant values in the dialog box Send Job: Select Variant.

If individual parameters of the selected variant are changed, a prompt appears after confirming the changes, asking you to save the variant. Here you can still change the variant name, which creates a new variant with this name.

The values in the Job Values group box always depend on the variant chosen above. If you change the values here, you also have to save a new variant for them.

 

 

 

Send Processes

A send process reads the messages that are to be sent from the SAPconnect queue, determines the appropriate nodes, and transfers the messages to the external communication systems. Messages are, therefore, only sent externally if regular send processes are scheduled.

The send processes are scheduled as regular background jobs. For test purposes, you can also start a send process in dialog. You can restrict a send process to one or more communication methods or you can schedule a send process for all communication methods.

If you are using the SMTP plug-in but have not activated it on all application servers, you have to let the send process run as a background job on the application servers on which it is activated.

Activities

Two options are available for scheduling send processes:

·        In SAP job maintenance

In this case, you create jobs that start the ABAP program RSCONN01 with the requested variant and at the requested time as a background job.

·        directly in SAPconnect administration as a background job or in dialog mode.
 

Testing Routing

 

You can use this test to check whether routing for outgoing messages runs correctly in your communications environment. The test provides information on how the appropriate node is determined using the recipient address you specified and whether fax and paging numbers are converted according to the rules for recipient number adjustment.

Procedure

  1. Choose Utilities ® Routing test.
  2. Specify a user name as the sender. Your user name is the default setting.
  3. Specify a recipient address and the relevant address type.
  4. Choose This graphic is explained in the accompanying text.

    In the Outbound node and address frame, the node responsible for the specified recipient address and the format into which the recipient address was converted are displayed. If no node is found, you receive an error message.

  5. Choose This graphic is explained in the accompanying text.
  6. You receive a description of how the address was checked, how the node was determined, and whether the recipient address was converted into an external format. If an error occurs, the reason for the error and the step in which it occurred are displayed.

     

    Setting Device Types for Format Conversion

     

    In the case of printer-dependent output formats, you have to specify the device type for which the format is to be converted.

    Procedure

    1. In SAPconnect administration (transaction SCOT), choose Settings ® Device Types for Format Conversion.
    2. Specify for each printer-dependent format (PDF, PCL, PS and TXT) the device type that is to be used for the formatting.
    3. A list of the device types available can be found in SAPNet note 8928. This list is continually updated.

      It is indicated in the list whether a format is specified as an output format for a node.
       

      Formats

       

      You have to specify for each node the format in which messages with internal SAP formats are to be output for each communication method. Output means sent when the SMTP plug-in is used and transferred to these systems when external communication systems are used. If necessary, the external communication systems convert the format into another format, in which the message is then sent.

      Activities

      You assign the formats to a

      node during the creation process. You can change formats in node maintenance. To do this, choose Set in the node data display for the relevant communication method. The following formatting options are available:

      Internal SAP format

      Possible output formats

      SAPscript/SmartForms

      PDF, PCL, PS, TXT

      ABAP list

      HTM, PDF, PCL, PS, TXT

      Link to a business object

      HTM, TXT

      Internal SAP text format (RAW)

      PDF, PCL, PS, TXT

      In the case of printer-specific formats (PDF, PCL, PS and TXT), you have to specify the device type for which the format is to be converted.

      When messages are converted into a printer-specific format, temporary spool requests are generated. These are deleted in the next spool reorganization.
       

      Address Area

       

      The SAPconnect send processes read the messages from the SAPconnect queue for outbound messages. By using the recipient addresses, the system determines which nodes the messages are transferred to. If there are several recipients, there can also be several nodes. Every node must therefore be assigned the addresses, which it can edit. In normal cases a node is not assigned individual addresses, but rather address areas. The send process only sends messages with recipient addresses within one of the specified address areas to the node.

      Node determination on the basis of recipient addresses is known as routing. If one recipient address to address areas corresponds to several nodes, the one that fits best is selected, that is the address area which contains the most characters of the recipient address. Non-generic entries have the highest priority when decisions are made.

      The SAPconnect routing concept is based exclusively on the address areas. It is not possible to use other data, like for example the formats supported by the nodes, as the basis for the routing.

      Activities

      You assign the address areas to a node during the creation process. You can change the address areas in the node maintenance or by choosing Goto ® Address area ®Create in the node- or routing view.

      Address areas always apply per address type. Generic address areas ending with the special character * can be created, as well as Internet addresses starting with the same special character. If you do not assign an address area, all addresses of the address type entered are processed.

      A node can process all Internet addresses:

      Address type: INT

      Address area: *

      A node should only process local faxes within Walldorf:

      Address type: FAX

      Address area: DE06227*

      To check how the routing of messages on the basis of address areas functions, you can carry out routing tests.
       

      Nodes

      A node represents a logical view of an external communication system in the SAP system, for example, an e-mail system, a fax system, or an additional SAP system. The SMTP node, which controls sending using the SMTP plug-in, is a special case.

      Each node has all the information necessary for sending from the SAP system using the external communication system. A node must be created for every external communication system that is used to send documents from your SAP system. Indeed, nodes are not necessarily required for receiving messages. Despite this, it is recommended for the communication environment administration that a node is also created for receiving.

      Prerequisites

      For the connection using an external communication system

      Outgoing messages are transferred from SAPconnect via RFC to the external communication system. For calling the communication system, the SAPconnect node must recognize the RFC destination. RFC destinations are maintained in transaction SM59. When creating a SAPconnect node, you can use an existing RFC destination or you can create a new one.

      For the connection using the SMTP plug-in

      The parameters of the ICM have to be set on every application server used for sending.

      Activities

      You must assign the information below for accessing the external communication system and its attributes to the other nodes.

      The attributes that you allocate to the node must correspond to those of the external communication system that the node represents. For more information, see the communication system documentation.

      It is recommended that you carry out node maintenance in SAPconnect administration under View  ® Node.
       
      Function
      Icon
      Description

      Create node

      This graphic is explained in the accompanying text

      A wizard leads you through the creation process.

      Display/change node

      This graphic is explained in the accompanying text

      An overview of the attributes of the selected node is displayed. In order to display or change the settings for the address areas, formats and transmission control, choose Set next to one of the selected communication types.

      Delete node

      This graphic is explained in the accompanying text

      The selected node is deleted with all its attributes.

       

      Specify the communication methods that the node can process. For each communication type enter the formats and address areas which should process the node. If necessary, you can specify rules for recipient number adjustment for the communication method Fax.
       

      Also specify the following attributes:

      Property

      Description

      Maximum waiting time for repeat send attempt procedure

      Specify how long the send attempts are to be repeated for before the send process is cancelled, in the event of an RFC error occurring when connecting to the external communication system.

      Node in use

      Select this attribute when you are using the node.

      Node can resolve path references

      Specify whether the external communication system supports this attribute. SAP systems, the SAP Internet Mail Gateway, and the SAP Exchange Connector, for example, do not support this attribute.

      Node is to be monitored by the alert monitor

      You can only use the functions of the alert monitor for SAPconnect and SAPphone for this node if you select this attribute.

      Node supports connection test, status, trace

      You can only use the functions for querying the operating status and setting the external trace for this node if you select this attribute. If you select this attribute, you have to perform a connection test. The connection test checks the version of the external software. This enables the upward compatibility of the SAPconnect interface to be guaranteed in the future. When you call a function, the system then checks whether the external communication system supports this function by using the version.

      CautionIf the external communication system does not support the connection test and, despite this, you start the connection test, this can cause the external software to crash.

       

       
       

      Creating an RFC User

      To receive messages (including status messages), an RFC user is required. An RFC user has to be created in every client in which messages are to be received. An RFC user is also required in order to receive messages using the SMTP plug-in.

      The RFC user is an SAP user of the type Service. Therefore, it is not possible for a person to logon with this user name in dialog.

      Procedure... 

             1.      Choose Tools ® Administration ® User Maintenance ® Users.

             2.      Enter a name, for example MAIL_ADMIN.

             3.      Choose This graphic is explained in the accompanying text.

             4.      On the tab page Logon data, select the user type Service.

             5.      Enter a password.

             6.      On the Profiles tab page, enter the authorization profile S_A.SCON. This profile minimizes the risk of misuse, even if the communication system does not store the password is encoded form.

             7.      Choose This graphic is explained in the accompanying text.

      SMTP Configuration

      User Maintenance (Transaction SU01)

      · Service user

      You have to create a service user for processing incoming mails in every SAP system client in which you want to receive mails (or status notifications). Call transaction SU01 to create a user with type Service and assign the profile S_A.SCON to this user.

      · User addresses

      Every user that is to receive e-mails in an SAP system requires an Internet mail address. This is also used as a sender address. Enter the Internet mail address for a user in transaction SU01, under E-Mail on the tab page Address.

      Assigning the Client (Transaction SICF)

      Every SAP system client that is to receive and process incoming mails (or status notifications) must have an SMTP server. One SMTP server (SAPconnect) has already been created in transaction SICF and is delivered with every SAP system. Use this to create the first client and then create another SMTP server for each additional client. Configure the following settings on the SMTP servers:

      · Host data

      Enter the sequence number of a parameter is/SMTP/virt_host_<*> from the profile. If you have only created one client and therefore have not specified this parameter type, enter 0.

      · Service data

      Enter the client to which the mails received through the virtual mail host are to be forwarded, and then enter the logon data of the system user that you created for the incoming mails.

      · Handler list

      Enter CL_SMTP_EXT_SAPCONNECT at position 1.

      Note that each SMTP server must be activated (Service/Virt. Host ® Activate) after being created or changed. Inactive servers are grayed out.

      SAPconnect Administration (Transaction SCOT)

      You have to configure SAPconnect settings for every client that is used for send processes.

      · Default Domain

      Under Settings ® Default Domain, define the domain of the SAP system client. This allows for the following to take place:

      · The SMTP plug-in logs on to the mail server using the domain as ID.

      · The message ID of the outbound e-mails is assembled with this domain.

      · If an SAP user who does not have an Internet mail address sends an e-mail, a sender address consisting of the SAP user name and this domain is generated.

      · Nodes

      Each client has an SMTP node. This node is created by the SAP system and cannot be deleted. The following steps need to be carried out to configure the node so that sending Internet mail is possible:

      i. Make sure you are in the Node view.

      ii. Double-click the node name.

      iii. Choose Node in use.

      iv. In the Mail Host and Mail Port fields, specify the mail server to which the outbound mails are to be sent.

      v. Next to Internet, choose Settings.

      vi. Enter the address area of the recipient addresses that are to be reached using this node. In general, * is used if all e-mails are to be sent using SMTP.

      vii. Enter the output format for SAP documents. We recommend that you use the following settings:

      SAPscript/Smart Forms

      PDF

      ABAP list

      HTM

      Business Object / Link

      HTM

      RAW Text

      TXT

      viii. Confirm your selection.

      If you also want to configure the node for sending faxes:

      i. Next to Fax, choose Settings.

      ii. Enter the address area of the recipient addresses that are to be reached using this node. In general, * is used if all faxes are to be sent using SMTP.

      iii. Enter the output format for SAP documents. We recommend that you use the following settings:

      SAPscript/Smart Forms

      PDF

      ABAP list

      PDF

      Business Object / Link

      TXT

      RAW Text

      TXT

      iv. Enter the domain of the fax server or fax provider under Conversion into Internet Address. The system generates the local part of the Internet address automatically. The address therefore takes this format: FAX=+RecipientNumber@Domain.

      v. Confirm your selection.

      If you also want to configure the node for sending text messages (pager/SMS):

      i. Next to Pager (SMS), choose Settings.

      ii. Enter the address area of the recipient addresses that are to be reached using this node. In general, * is used if all text messages (pager/SMS) are to be sent using SMTP.

      iii. Enter the domain of the text message (pager/SMS) server or provider under Conversion into Internet Address. The system generates the local part of the Internet address automatically. The address therefore takes this format: SMS=+RecipientNumber@Domain.

      iv. Confirm your selection.

      · Send Job

      E-mails sent from an SAP application are first stored in a queue. A periodical background process, the SAPconnect send job, gets the e-mails from this queue and sends them over the Internet. To schedule this job in SAPconnect: Administration, proceed as follows:

      i. Choose View ® Jobs.

      ii. If no other job has been scheduled, choose Job ® Create.

      iii. Enter a job name and confirm it.

      iv. Select the variant SAP&CONNECTALL by positioning the cursor on it.

      v. Choose Schedule Job.

      vi. Choose Schedule periodically.

      vii. Select the interval you require, such as 10 minutes.

      viii. Choose Create.

      · Inbound

      If you want incoming e-mails that have a particular address or particular content to automatically start a program that processes these mails, you can configure this under Settings ® Inbound Processing.

      If you want incoming e-mails that have a particular address or come from a particular sender to be automatically forwarded to another recipient or another distribution list, you can configure this under Settings ® Inbound Processing.