Skip to Content

What is multi threading?

Hi all,

What is multi threading? How to implement multi threading in ABAP?

Regards,

Bryan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Aug 30, 2007 at 02:27 AM

    Hi Janet,

    Multi Threading concept is not only for ABAP. The concept behind is executing the jobs by priority wise.

    For example :

    If the processer have 10 jobs to execute it will assign thread to each job and based on the priority processer will executes the jobs.

    All the best.

    Reward if useful.

    kishore

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Kishore,

      We found that the jobs are using the same CPU and they are not utilitying other CPU. This slows down the performance of the job. We are thinking of breaking up the running the data into different jobs. Besides this, any other ways?

      Regards

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2007 at 04:25 AM

    alloting the more than one jobs at same time based on priority

    regards

    Giridhar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2007 at 04:45 AM

    Hi

    How the vision connector framework works

    The connector interacts with an SAP application using connector modules. The connector modules make calls to SAP's Native Interfaces and pass data (business object or event data) to and from an SAP application. The connector's flexible design enables different modules to be used for different tasks such as initializing the connector with the SAP application or passing business object data.

    Communication between the connector and an SAP application

    The connector uses SAP's Remote Function Call (RFC) library to communicate with an SAP application. SAP's RFC API allows external programs to call ABAP function modules within an SAP application.

    Processing business objects

    The connector is metadata driven. Metadata, in the WebSphere business integration system, is application-specific data that is stored in business objects and that assists a connector module in its interaction with the application. A metadata-driven connector module handles each business object that it supports based on metadata encoded in the business object definition rather than on instructions hard-coded in the connector module.

    Business object metadata includes the structure of a business object, the settings of its attribute properties, and the content of its application-specific information. Because connector modules are metadata driven, they can handle new or modified business objects without requiring modifications to the connector-module code.

    The vision connector framework uses the value of the verb application-specific information in the top-level business object to call the appropriate connector module to process the business object. The verb application-specific information provides the classname of the connector module.

    The verb application-specific information of most top-level business objects must identify the classname of the connector module. The syntax of this verb application-specific information is:

    AppSpecificInfo = PartialPackageName.ClassName,

    For example,

    AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler,

    In this example, sap.sapextensionmodule is the partial package name, and VSapBOHandler is the classname. The full package name includes the com.crossworlds.connectors prefix, which the WebSphere business integration system adds to the name automatically. In other words, the full text of the example is:

    com.crossworlds.connectors.sap.sapextensionmodule.VSapBOHandler

    Note:

    The verb application-specific information of most top-level business objects must use a comma (,) delimiter after the connector classname. However, the Server verb, which is used by the RFC Server Module, is delimited instead by a semi-colon (;). For information about the Server verb, see How the RFC Server Module works and Supported verbs.

    You need not specify the package name and classname for the verb application-specific information if the business object is used:

    by the ALE Module to process application events; however, when you use the ALE Module to process service call requests, you must specify the package name and classname

    by the ABAP Extension Module, which uses the default business object handler (sap.sapextensionmodule.VSapBOHandler)

    Important:

    Customer-generated connector modules that process business objects for the RFC Server Module must specify a full package name, which must begin with bapi. For example, bapi.client.Bapi_customer_getdetail2. The full package name in this example is bapi.client, and the classname is Bapi_customer_getdetail2.

    Most business object processing is specific to each connector module. By default the connector uses the ABAP Extension Module. For more information on business object processing for the ABAP Extension Module, see Installing and customizing the ABAP Extension Module and Business object data routing to ABAP handlers. .

    For more information on specifying verb application-specific information for the ALE Module, see Event processing and Processing multiple IDocs with a wrapper business object.

    Processing multiple concurrent interactions

    The Adapter Framework can create separate threads for processing an application event and a business object request. When processing multiple requests from the integration broker, it can create multiple threads to handle multiple business object requests. For example, when InterChange Server is the integration broker, the connector can receive multiple business object requests from multiple collaborations or from a multi-threaded collaboration.

    Figure 4 illustrates the multi-threading architecture.

    Figure 4. Multi-Threading Architecture of the Connector for SAP

    Event processing

    The connector performs the following steps when handling a poll call:

    The Adapter Framework creates a single dedicated thread to handle poll calls. This thread calls the pollForEvents() method of the vision connector framework at the frequency specified in the PollFrequency configuration property.

    The thread polls SAP, which uses a dialog process to locate and return the event.

    Note:

    If the connector's MaxNumberOfConnections configuration property evaluates to a number greater than 1, the vision connector framework dedicates a connection to SAP for polling. If MaxNumberOfConnections evaluates to 1, event and service-call request processing share a single connection to SAP.

    The polling thread dies only when the connector shuts down.

    Note:

    Because the RFC Server connector agent pushes events out of SAP instead of polling for events, it spawns its own threads instead of using threads created by the connector framework. Because the ALE connector agent uses the RFC Server connector agent to access events, it also spawns its own threads instead of using threads created by the connector framework when it processes events.

    Request processing

    Independently of polling, the Adapter Framework can create multiple request-processing threads, one for each request business object. Each request thread instantiates the appropriate business object handler.

    For example, when processing business object requests from InterChange Server, the number and type of business object handlers depends on the number and type of the collaborations sending the requests:

    If multiple collaborations send business objects, each request thread instantiates a business object handler of the appropriate type.

    If a multi-threaded collaboration sends multiple business objects of the same type, the request threads instantiate an equal number of business object handlers of that type.

    If the connector's MaxNumberOfConnections configuration property evaluates to a number greater than 1, the vision connector framework dedicates one connection to SAP for polling and allocates the remaining connections to a pool used only for request processing.

    As illustrated in Figure 4, the connector performs the following steps when handling a business object request:

    The Adapter Framework creates a separate thread for each business object request. Each thread calls the doVerbFor() method of the Vision business object handler.

    If the connector's MaxNumberOfConnections configuration property evaluates to a number greater than 1, the Vision business object handler checks the vision connector framework's connection pool to determine if a connection handle is available.

    If the handle is available, the thread sends the request to SAP, which uses a dialog process to handle the request.

    If the handle is not available, the thread waits until one becomes available. Thread sequencing determines the order in which each business object handler thread claims or waits for an available connection handle.

    If the connector's MaxNumberOfConnections configuration property evaluates to 1, the Vision business object handler shares a connection with event processing.

    SAP releases the dialog process after it completes processing and sends a return code.

    The connector releases the connection handle after it receives the return code from SAP.

    Setting the number of available connections

    Use the MaxNumberOfConnections configuration property to specify the maximum number of connection handles available. The number of connections cannot exceed the number of dialog processes.

    SAP locks the dialog process while processing an interaction, releasing it only when the interaction completes. Therefore, multiple concurrent requests lock an equal number of dialog processes until processing finishes.

    Important:

    Before setting a value for MaxNumberOfConnections, contact your SAP BASIS administrator to determine an appropriate value to maximize throughput without negatively affecting performance on the application server.

    Support for multiple connections

    By default the connector supports multiple-threads.

    <b>

    REWARD IF USEFULL</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 30, 2007 at 01:18 AM

    http://en.wikipedia.org/wiki/Thread_%28computer_science%29

    This type of programming can be done using function modules and using the syntax, STARTING NEW TASK

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.