Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
129 views
Implementing Parallel Processing
Uploaded by
misslinius
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Implementing Parallel Processing For Later
Download
Save
Save Implementing Parallel Processing For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
129 views
Implementing Parallel Processing
Uploaded by
misslinius
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Implementing Parallel Processing For Later
Carousel Previous
Carousel Next
Save
Save Implementing Parallel Processing For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 9
Search
Fullscreen
ssi Implementing Paral! Processing (SAP Library Background Processing) © Implementing Parallel Processing © For some SAP reports, the nights are getting too short. Especially at customers with large volumes of data, some SAP reports that customarily run in the background processing system (such as material planning runs) may have run times of many hours. It can be diffcult to finish such jobs in the “night+ime" that is available, especially i dialog users are spread across several time zones. With Release 3.16, SAP offers a solution to the “shor nights” problem: paralleL-processed background jobs. Long- running SAP reports can now implement parallel processing, waich lets them parcel out the work to be done to avaliable dialog work processes in the SAP system and then collect the results Parallel processing is implemented in ABAP reports and programs, not in the background processing system itself. ‘That means that jobs are only processed in parallel if the report that runs in a job step is programmed for parallel processing, Such reports can also process in parallel if they are started interactively. Parallel-processing is implemented with a special variant of asynchonous RFC. I's important that you use only the correct variant for your own parallel processing applications: the CALL FUNCTION ‘STARTING NEW TASK DESTINATION IN GROUP keyword. Using other variants of asynchronous RFC circumvents the builtin safeguards in the correct keyword, and can bring your system to its knees Function Modules and ABAP Keywords Parallel processing is implemented in the application reports that are to run in the background. You can implement parallel processing in your own background applications by using the following function modules and ABAP keywords: * Function module SPBT_INTIALIZE: Optional. Use to determine the availabilty of resources for parallel processing. You can do the following: = check that the parallel processing group that you have specified is correct. find out how many work processes are available so that you can more efficiently size the packets of data that are to be processed in your data ‘* ABAP keyword CALL FUNCTION
STARTING NEW TASK
with the DESTINATION IN GROUP argument: Use this keyword to have the SAP system execute the function module callin parallel ‘Typically, you'l place this Keyword in a loop in which you divide up the data that is to be processed into work packets. You can pass the data that is to be processed in the form of an intemal table (EXPORT, TABLE arguments). The keyword implements parallel processing by dispatching asynchronous RFC calls to the servers that are available in the RFC server group specified for the processing, Note that your RFC calls with CALL FUNCTION are processed in work processes of type DIALOG. The DIALOG limit on processing of one dialog step (by default 300 seconds, system profile parameter rdisp/max_wprun_time) applies to these RFC calls. Keep this limit in mind when you divide up data for parallel processing calls. * Function module SPBT_GET_PP_DESTINATION: Optional. Call immediately after the CALL FUNCTION keyword to get the name of the seneer on which the parallel processing task will be run. ‘Function module SPBT_DO_NOT_USE_SERVER: Optional. Excludes a particular server from further use for processing parallel processing tasks. Use in conjunction with SPBT_GET_PP_DESTINATION if you determine that a particular Sener is not available for parallel processing (Tor example, COMMUNICATION FAILURE exception if a server becomes unavailable). * BAP keyword WAIT: Required if you wish to wait for all of the asynchronous parallel tasks created with CALL FUNCTION to retum, This is normally a requirement for orderly background processing. May be used only if the CALL FUNCTION includes the PERFORMING ON RETURN addition, ‘+ ABAP keyword RECEIVE: Required if you wish to receive the results of the processing of an asynchronous RFC. RECEIVE retrieves IMPORT and TABLE parameters as well as messages and return codes, Prerequisites hep-sp.comsephelp_1w7OheledaalentJcontant.him 19ssi Implementing Paral! Processing (SAP Library Background Processing) Before you implement parallel processing, make sure that your background processing application and your SAP system meet these requirements: * Logically-independent units of work: The data processing task that is to be caried out in parallel must be logically independent of other instances of the task. That is, the task can be carried out without reference to other records from the same data set that are also being processed in parallel, and the task is not dependent upon the results of others of the parallel operations. For example, parallel processing is not suitable for data that must be sequentially processed or in which the processing of one data item is dependent upon the processing of another item of the data * By defrition, there is no guarantee that data will be processed in a particular order in parallel processing or that a particular result will be available at a given point in processing, * ABAP requirements (see also the online documentation for the CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP keyword); The function module that you call must be marked as externally callable. This attribute is specified in the Remote function call supported field in the function module definition (transaction SE37)) = The called function module may nat include a function call to the destination "BACK, = The calling program should not change to a new intemal session after making an asynchronous RFC call. That is, you should not use SUBMIT or CALL TRANSACTION in such a report after using CALL FUNCTION STARTING NEW TASK. You cannot use the CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP keyword to start external programs. = Incalls between SAP systems, both systems must be of Release 3.0A or higher. ‘+ SAP system resources: In order to process tasks from parallel jobs, a server in your SAP system must have at least 3 dialog work processes. It must also meet the workload criteria of the parallel processing system: Dispatcher queue less than 10% full, at least one dialog work process free for processing tasks from the parallel job. Managing Resources with RFC Server Groups ‘The parallel processing system has built-in safeguards that eliminate the possibilty that a parallel job can soak up all of the resources in an SAP system and cause performance problems for other jobs or other users. In addition to these builtin safeguards, you can optimize the sharing of resources through RFC server groups. In the context of parallel processing, a group specifies the set of SAP application servers that can be used for executing a particular program in parallel. By default (CALL FUNCTION STARTING NEW TASK with the addition DESTINATION IN GROUP DEFAULT), the group is all servers that meet the resource criteria, But you can also create your own ‘more limited groups. You can view and maintain groups with transaction RZ12 (Tools -» Administration -» ‘Administration -> Network > RFC destinations and then RFC > RFC groups). You must specify the group to use in both the SPBT_INITIALIZE function module (if used) and in the ABAP CALL FUNCTION STARTING NEW TASK keyword. Only one group is allowed per parallel ABAP report or program (job step). Messages and Exceptions In the function modules that you call, you should use exceptions for any error reporting, and nat the MESSAGE keyword, Exception handling is fully under your control in asynchronous RFC. You simply add the exceptions ‘generated by the function module to the resened SYSTEM _FAILURE and COMMUNICATIONS. FAILURE exceptions ‘of the CALL FUNCTION keyword You can then handle the exceptions in the program that launches the parallel programming tasks. Authorizations Ifthe system profile parameter authirie_authority_check is set (value 1), then the System automatically checks at the CALL FUNCTION keyword whether the authorizations user of the background job has the required RFC authorization. ‘The RFC authorization object is S_RFC Authorization check at RFC access. The authorization checks access to function modules by function module group. That is, whether a user has the right to run function modules that belong to a particular group. You can test a user's RFC authorization with the function module AUTHORITY_CHECK_RFC. This function module help-sap.comsephalp_1w7OheledaalertJcontnt.him 20ssi Implementing Paral! Processing (SAP Library Background Processing) retums RC = 0 ifthe user is authorized for the group that you name. The function module does not check whether an authority check will actually take place. Sample Program: Parallel Job This sample program shows how to create a report that would execute in parallel if started interactively or in the background processing system. It is based upon the online documentation for the ABAP CALL FUNCTION STARTING NEW TASK documentation. Program Structure SPBT_INITIALIZE: After declaring data, the report calls the SPBT_INTIALIZE function module. The call lets the program check that the parallel processing group is valid and that resources are available. This call is optional. If you {do not call the function module, then the SAP system itself calls SPBT_INITIALIZE to initialize the RFC server group. Since the function module retums the number of available work processes, the call could be used to decide how to size the work packets that are to be processed. if 10 work processes were available, you could, for example, divide the data into 10 packets for processing. However, there's no guarantee that the number of fee work processes will not change between the time of the call and the time that your program sends off its work packets unless you are. working with a group of servers that are reserved for your jb. I's of course also possible to run through the data making one parallel processing call for each record that is to be processed. In this case, of course, no attempt is made to optimize the sizing of work packets. CALL FUNCTION... Loop: The heart of the report is a DO loop in which the function module that is to be processed in parallel is called (CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP). The loop in this example is ‘controlled by a simple count-down mechanism. In a production report, you'd repeat the loop until all of your data has been sent of for processing with CALL FUNCTION. For purposes of simplicity, the loop in this example calls a function module that requires no data (RFC_SYSTEM_INFO). In a production report, you'd include logic to select a record or group of records for processing. You'd package these recorts in an intemal table and include them with the parallel processing call using the EXPORTING or TABLES additions of CALL FUNCTION STARTING NEW TASK. For purposes of recovery, a production program should also include logic for logging the progress of processing, Should the program terminate abnormally in the middle of processing, it's essential that you be able to determine which data has already been processed and with which data the report should resume. In simplest form, this logic should log the data that has been dispatched for parallel processing and should note the completion of the processing of each unit of data ‘Task management: A 0 retum code (SY-SUBRC) from CALL FUNCTION indicates that your parallel processing task has been successfully dispatched. I's now important that your job keep track of these parallel processing tasks. Your task management should take care of two assignments: * Generating unique task names for each CALL FUNCTION task, Use the taskname thal you specified in CALL FUNCTION to identiy parallel processing tasks. Each such task that you dispatch should have a unique name so that you can correctly identify returns from the task. * Waiting for resources to become available, should all parallel processing resources (dialog work processes) temporarily be in use. See “Handling the CURRENTLY_NO_RESOURCES_AVAIL exception," below. * Determining when all tasks have been completed. Only then can your program terminate. See ‘Waiting for job ‘completion’, below, for more information. Inthe example, the task management increments a counter as the task name and maintains a table of the tasks that have been dispatched. As an optional feature, the task management uses SPBT_GET_PP_DESTINATION to find out where each parallel task is being processed Handling the RESOURCE_FAILURE exception: As each parallel processing task is dispaiched, the SAP system ‘counts down the number of resources (dialog work processes) available for processing additional tasks. This count ‘goes up again as each parallel processing task is completed and retums to your program, Should your parallal processing tasks take a long time to complete, then the parallel processing resources may temporafily run out. In this case, CALL FUNCTION retums the exception RESOURCE_FAILURE. This means simply that all dialog work processes in the RFC group that your program is using are in use. ‘Your program must now wait until resources become available and then re-issue the CALL FUNCTION that failed. In the sample program, we use a simple, reasonably failsafe wait mechanism. The program waits for parallel processing help-sap.comsephalp_1w7OheledaalertJcontnt.him an
You might also like
Parallel Processing
PDF
No ratings yet
Parallel Processing
27 pages
Parallel Processing With CRM Business Transactions
PDF
No ratings yet
Parallel Processing With CRM Business Transactions
20 pages
RFC Programming in ABAP
PDF
100% (1)
RFC Programming in ABAP
77 pages
Abap Interview Questions and Answers
PDF
100% (1)
Abap Interview Questions and Answers
26 pages
White Paper On Parallel Processing in SAP ABAP
PDF
No ratings yet
White Paper On Parallel Processing in SAP ABAP
18 pages
Parallel Processing
PDF
No ratings yet
Parallel Processing
1 page
ABAP Practical Use of Parallel Processing
PDF
No ratings yet
ABAP Practical Use of Parallel Processing
6 pages
Abap Paralelismo
PDF
No ratings yet
Abap Paralelismo
5 pages
Parallel Processing - Example Code - SAP Blogs
PDF
No ratings yet
Parallel Processing - Example Code - SAP Blogs
9 pages
ABAP Topics
PDF
No ratings yet
ABAP Topics
42 pages
Parallel Processing in ABAP
PDF
100% (1)
Parallel Processing in ABAP
15 pages
Info: Use of Automatic Parallel Processing: Symptom
PDF
No ratings yet
Info: Use of Automatic Parallel Processing: Symptom
4 pages
Master The Five Remote Function Call
PDF
No ratings yet
Master The Five Remote Function Call
25 pages
PART7-CA Introduction
PDF
No ratings yet
PART7-CA Introduction
7 pages
Calling RFC Function Modules in ABAP
PDF
No ratings yet
Calling RFC Function Modules in ABAP
81 pages
RFC & How To Create & Use It
PDF
No ratings yet
RFC & How To Create & Use It
33 pages
Use More Information Related Information: On This Page
PDF
No ratings yet
Use More Information Related Information: On This Page
50 pages
Calling RFC Function Modules in ABAP
PDF
No ratings yet
Calling RFC Function Modules in ABAP
7 pages
And Now, A Real World Case of Parallel Processing
PDF
No ratings yet
And Now, A Real World Case of Parallel Processing
13 pages
Setting Up The Background Processing System: Procedure
PDF
No ratings yet
Setting Up The Background Processing System: Procedure
1 page
OpenSAP Cst1 Week 2 Unit 5 RFC Presentation
PDF
No ratings yet
OpenSAP Cst1 Week 2 Unit 5 RFC Presentation
14 pages
Sap Nw73 Connectivity RFC 03 Writing RFC Programs in ABAP en 2a
PDF
No ratings yet
Sap Nw73 Connectivity RFC 03 Writing RFC Programs in ABAP en 2a
24 pages
Remote Function Calls
PDF
No ratings yet
Remote Function Calls
6 pages
30 SAP ABAP Remote Function Call (RFC) - Interview Questions With Answers.
PDF
100% (4)
30 SAP ABAP Remote Function Call (RFC) - Interview Questions With Answers.
19 pages
Taw10 Book 1
PDF
No ratings yet
Taw10 Book 1
15 pages
Sap Note 934109
PDF
No ratings yet
Sap Note 934109
3 pages
Import SAP Sources From Informatica
PDF
No ratings yet
Import SAP Sources From Informatica
5 pages
SAP INTRODUCTION &WAS_ARCHITECTURE
PDF
No ratings yet
SAP INTRODUCTION &WAS_ARCHITECTURE
10 pages
Fighting Problems of Asynchronous Processing in ABAP - Hello World!
PDF
No ratings yet
Fighting Problems of Asynchronous Processing in ABAP - Hello World!
8 pages
SAP Integration With Excel - Basic Guide
PDF
100% (2)
SAP Integration With Excel - Basic Guide
19 pages
Improve Communication Between Your C - C++ Applications and SAP Systems With SAP NetWeaver RFC SDK - Part 3: Advanced Topics
PDF
No ratings yet
Improve Communication Between Your C - C++ Applications and SAP Systems With SAP NetWeaver RFC SDK - Part 3: Advanced Topics
18 pages
RFC in SAP Systems
PDF
100% (1)
RFC in SAP Systems
3 pages
About Function Modules & Explanation
PDF
No ratings yet
About Function Modules & Explanation
4 pages
4 - Part 1 - ABAP Transaction Management
PDF
No ratings yet
4 - Part 1 - ABAP Transaction Management
46 pages
NEW SAP WORD
PDF
No ratings yet
NEW SAP WORD
101 pages
RFC Session
PDF
No ratings yet
RFC Session
27 pages
QRFC and TRFC
PDF
No ratings yet
QRFC and TRFC
19 pages
QRFC and TRFC
PDF
No ratings yet
QRFC and TRFC
19 pages
Sap Abap Cross Applications or Interfaces
PDF
No ratings yet
Sap Abap Cross Applications or Interfaces
42 pages
In Background Task Abap Command - Sap Call Function
PDF
No ratings yet
In Background Task Abap Command - Sap Call Function
3 pages
Parallel Processing
PDF
No ratings yet
Parallel Processing
6 pages
TRFC SM58
PDF
No ratings yet
TRFC SM58
2 pages
Call Function in Background Task 1
PDF
No ratings yet
Call Function in Background Task 1
5 pages
Unified Connectivity (UCON) Overview
PDF
No ratings yet
Unified Connectivity (UCON) Overview
39 pages
Quick Guide - EDIIDoc Interfacing To SAP ECC From External System
PDF
No ratings yet
Quick Guide - EDIIDoc Interfacing To SAP ECC From External System
16 pages
SAP Adapter
PDF
No ratings yet
SAP Adapter
4 pages
ABAP4 Training Course Week 4
PDF
No ratings yet
ABAP4 Training Course Week 4
333 pages
Bapi
PDF
No ratings yet
Bapi
64 pages
Remote Function Call
PDF
No ratings yet
Remote Function Call
8 pages
Chapter 27: Overviewing The Background Processing System Overviewing The Background Processing System
PDF
No ratings yet
Chapter 27: Overviewing The Background Processing System Overviewing The Background Processing System
6 pages
Parallel Processing in ABAP - Team ABAP
PDF
No ratings yet
Parallel Processing in ABAP - Team ABAP
8 pages
Sap Basis Overview
PDF
No ratings yet
Sap Basis Overview
39 pages
Sap Pattern
PDF
No ratings yet
Sap Pattern
9 pages
Sap Basis
PDF
100% (2)
Sap Basis
39 pages
RFC: An Approach Under The Classic Model Is A Remote Function Call. RFC Interface Is
PDF
No ratings yet
RFC: An Approach Under The Classic Model Is A Remote Function Call. RFC Interface Is
2 pages
Lawn Maintenance
PDF
No ratings yet
Lawn Maintenance
8 pages
SAP Archiving Important Programs
PDF
100% (1)
SAP Archiving Important Programs
3 pages
History of Maharashtra
PDF
100% (1)
History of Maharashtra
59 pages
Basic Excel Formulas
PDF
No ratings yet
Basic Excel Formulas
164 pages
Spreadsheets and Non-Spatial Databases
PDF
100% (1)
Spreadsheets and Non-Spatial Databases
20 pages