SlideShare a Scribd company logo
1 of 7
Implementing Parallel Processing in ABAP
Noman Hanif
Most of the time when dealing with huge amount of data, the run time / execution time of a
program should be within the specified time limit. To overcome this, SAP has provided a
wonderful tool called “Parallel processing”.
My attempt to provide an example for parallel processing.
Requirement:
Get the list of Contracts (New, Terminated and Active as on date) for a given period and retrieve the
additional information using parallel processing.
Solution:
Requirement is seems to be simple. But, yes scanning CRMD_ORDERADM_H for all the contracts
and retrieving the additional data (Partner, Product, Customer etc..) for each contract is not an easy
and quick task.
Parallel processing has been introduced to complete the report within the specified time.
Selection Screen:
Parallel processing code:
1. Do the Initial selection of contracts based on the Period.
2. Call the FM ‘SPBT_INITIALIZE’ to know the Maximum work process and free work process
by passing the server group name (parallel_generators)
3. Note: For server group details, the number of maximum work process you can use under this
group are best answered by your BASIS team. In practice, BASIS will provide a dedicated
application sever group for parallel processing.
4. Based on the selection screen entry (number of records per call), move these many records
into an internal table for parallel processing.
5. If you want to track the number of records processed, use below statements to see the job
log while the program is running.
6. CONCATENATE ‘Total Records to be processed are’ lv_gtot INTO lv_string.
MESSAGE lv_string TYPE ‘I’.
7. Here lv_gtot is the number of lines of the internal table which is passed to parallel processing
FM
8. Retrieve the resources info by calling FM ‘SPBT_GET_CURR_RESOURCE_INFO‘ and
check against the selection screen entry “Maximum no of work process to be used”.
9. If the available work process is greater than specified, and the running work process are
within the max limit, call the RFC Function module in Asynchronous mode. If not wait for the
free work process and try again.
10. When the RFC is called, please check the returned sy-subrc value. If it is initial, count the
number of submitted RFC.
11. Continue the submission of Asynchronous RFC till all the records are processed.
12. The RFC is executed in the next available work process in the said server group and the
results are captured under “Call back routine” ON END OF TASK.
13. In the receiving routine count the number of RFC received.
14. As this is asynchronous calls, we need to wait until the number of sent calls and received
should be equal.
Code snippet:
Perform f_init_server_group screen shot attached at the top of the page.
Here in below, we are calling the RFC Function module which does the actual work. It retries the
all the requested information for the passed chunk of data.
Once the FM is executed fully, then the call back routine “f_call_back*” is called.
In the below call back routine, we will capture the processed records with all the information.
The final internal table gt_*_in2 will holds the all the information.
If any data base update is required, then it should be done in the RFC itself.
For tracking of the records processed, use “MESSAGE” statement where ever required. And last
but not least, don’t forget to wait till the sent RFC calls should be equal to received RFC Calls.

More Related Content

What's hot

Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPNoman Mohamed Hanif
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questionsPradipta Mohanty
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP PerformancePeterHBrown
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorialraonivaz
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reportsvbpc
 
Call transaction method
Call transaction methodCall transaction method
Call transaction methodKranthi Kumar
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
201124772 sap-pp-pi-process-flow-docs
201124772 sap-pp-pi-process-flow-docs201124772 sap-pp-pi-process-flow-docs
201124772 sap-pp-pi-process-flow-docsAbhishek Sarkar
 
Internal tables in sap
Internal tables in sapInternal tables in sap
Internal tables in sapDharma Raju
 
0106 debugging
0106 debugging0106 debugging
0106 debuggingvkyecc1
 

What's hot (20)

Object oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAPObject oriented approach to ALV Lists in ABAP
Object oriented approach to ALV Lists in ABAP
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Sap abap
Sap abapSap abap
Sap abap
 
Session 14 validation_steps_sap
Session 14 validation_steps_sapSession 14 validation_steps_sap
Session 14 validation_steps_sap
 
Step by step lsmw tutorial
Step by step lsmw tutorialStep by step lsmw tutorial
Step by step lsmw tutorial
 
Sap Abap Reports
Sap Abap ReportsSap Abap Reports
Sap Abap Reports
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
 
OOPS ABAP.docx
OOPS ABAP.docxOOPS ABAP.docx
OOPS ABAP.docx
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
201124772 sap-pp-pi-process-flow-docs
201124772 sap-pp-pi-process-flow-docs201124772 sap-pp-pi-process-flow-docs
201124772 sap-pp-pi-process-flow-docs
 
Sap architecture
Sap architectureSap architecture
Sap architecture
 
Sap abap tutorials
Sap abap tutorialsSap abap tutorials
Sap abap tutorials
 
Manual de uso de phpmyadmin
Manual de uso de phpmyadminManual de uso de phpmyadmin
Manual de uso de phpmyadmin
 
Sap basis made easy
Sap basis made easySap basis made easy
Sap basis made easy
 
Alv theory
Alv theoryAlv theory
Alv theory
 
Internal tables in sap
Internal tables in sapInternal tables in sap
Internal tables in sap
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 

Similar to Implementing parallel processing in abap

St22 abap programming
St22 abap programming St22 abap programming
St22 abap programming nanda nanda
 
programming errors
programming errorsprogramming errors
programming errorsnanda nanda
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730K Hari Shankar
 
Lte kp is calculation
Lte kp is calculationLte kp is calculation
Lte kp is calculationKlajdi Husi
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Marcirio Chaves
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosjasonholtzapple
 
IRJET- Hadoop based Frequent Closed Item-Sets for Association Rules form ...
IRJET-  	  Hadoop based Frequent Closed Item-Sets for Association Rules form ...IRJET-  	  Hadoop based Frequent Closed Item-Sets for Association Rules form ...
IRJET- Hadoop based Frequent Closed Item-Sets for Association Rules form ...IRJET Journal
 
Unit 1
Unit 1Unit 1
Unit 1siddr
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization Ganesan Narayanasamy
 
Sap abap training Overview
Sap abap training OverviewSap abap training Overview
Sap abap training Overviewraviadm100
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share.Gastón. .Bx.
 
Complete reference to_abap_basics
Complete reference to_abap_basicsComplete reference to_abap_basics
Complete reference to_abap_basicsAbhishek Dixit
 
3 modularisation and bdc
3 modularisation and bdc3 modularisation and bdc
3 modularisation and bdcSiva Kumar
 
Oracle apps scm online training
Oracle apps scm online trainingOracle apps scm online training
Oracle apps scm online trainingsaptpmit
 
Sap security online training
Sap security online trainingSap security online training
Sap security online trainingsapscmit
 
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfWrite a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfsravi07
 
How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...Xoomworks Business Intelligence
 

Similar to Implementing parallel processing in abap (20)

St22 abap programming
St22 abap programming St22 abap programming
St22 abap programming
 
programming errors
programming errorsprogramming errors
programming errors
 
Sap basis made_easy321761331053730
Sap basis made_easy321761331053730Sap basis made_easy321761331053730
Sap basis made_easy321761331053730
 
Lte kp is calculation
Lte kp is calculationLte kp is calculation
Lte kp is calculation
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Bdc
BdcBdc
Bdc
 
IRJET- Hadoop based Frequent Closed Item-Sets for Association Rules form ...
IRJET-  	  Hadoop based Frequent Closed Item-Sets for Association Rules form ...IRJET-  	  Hadoop based Frequent Closed Item-Sets for Association Rules form ...
IRJET- Hadoop based Frequent Closed Item-Sets for Association Rules form ...
 
Unit 1
Unit 1Unit 1
Unit 1
 
Sap fico fa qs(1)
Sap fico fa qs(1)Sap fico fa qs(1)
Sap fico fa qs(1)
 
Sap fico fa qs
Sap fico fa qsSap fico fa qs
Sap fico fa qs
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization
 
Sap abap training Overview
Sap abap training OverviewSap abap training Overview
Sap abap training Overview
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share
 
Complete reference to_abap_basics
Complete reference to_abap_basicsComplete reference to_abap_basics
Complete reference to_abap_basics
 
3 modularisation and bdc
3 modularisation and bdc3 modularisation and bdc
3 modularisation and bdc
 
Oracle apps scm online training
Oracle apps scm online trainingOracle apps scm online training
Oracle apps scm online training
 
Sap security online training
Sap security online trainingSap security online training
Sap security online training
 
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdfWrite a program in C or C++ which simulates CPU scheduling in an opera.pdf
Write a program in C or C++ which simulates CPU scheduling in an opera.pdf
 
How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...How to pinpoint and fix sources of performance problems in your SAP BusinessO...
How to pinpoint and fix sources of performance problems in your SAP BusinessO...
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Implementing parallel processing in abap

  • 1. Implementing Parallel Processing in ABAP Noman Hanif
  • 2. Most of the time when dealing with huge amount of data, the run time / execution time of a program should be within the specified time limit. To overcome this, SAP has provided a wonderful tool called “Parallel processing”. My attempt to provide an example for parallel processing. Requirement: Get the list of Contracts (New, Terminated and Active as on date) for a given period and retrieve the additional information using parallel processing. Solution: Requirement is seems to be simple. But, yes scanning CRMD_ORDERADM_H for all the contracts and retrieving the additional data (Partner, Product, Customer etc..) for each contract is not an easy and quick task. Parallel processing has been introduced to complete the report within the specified time. Selection Screen: Parallel processing code: 1. Do the Initial selection of contracts based on the Period. 2. Call the FM ‘SPBT_INITIALIZE’ to know the Maximum work process and free work process by passing the server group name (parallel_generators)
  • 3. 3. Note: For server group details, the number of maximum work process you can use under this group are best answered by your BASIS team. In practice, BASIS will provide a dedicated application sever group for parallel processing. 4. Based on the selection screen entry (number of records per call), move these many records into an internal table for parallel processing. 5. If you want to track the number of records processed, use below statements to see the job log while the program is running. 6. CONCATENATE ‘Total Records to be processed are’ lv_gtot INTO lv_string. MESSAGE lv_string TYPE ‘I’. 7. Here lv_gtot is the number of lines of the internal table which is passed to parallel processing FM 8. Retrieve the resources info by calling FM ‘SPBT_GET_CURR_RESOURCE_INFO‘ and check against the selection screen entry “Maximum no of work process to be used”. 9. If the available work process is greater than specified, and the running work process are within the max limit, call the RFC Function module in Asynchronous mode. If not wait for the free work process and try again.
  • 4. 10. When the RFC is called, please check the returned sy-subrc value. If it is initial, count the number of submitted RFC. 11. Continue the submission of Asynchronous RFC till all the records are processed. 12. The RFC is executed in the next available work process in the said server group and the results are captured under “Call back routine” ON END OF TASK. 13. In the receiving routine count the number of RFC received. 14. As this is asynchronous calls, we need to wait until the number of sent calls and received should be equal. Code snippet:
  • 5. Perform f_init_server_group screen shot attached at the top of the page. Here in below, we are calling the RFC Function module which does the actual work. It retries the all the requested information for the passed chunk of data. Once the FM is executed fully, then the call back routine “f_call_back*” is called.
  • 6. In the below call back routine, we will capture the processed records with all the information.
  • 7. The final internal table gt_*_in2 will holds the all the information. If any data base update is required, then it should be done in the RFC itself. For tracking of the records processed, use “MESSAGE” statement where ever required. And last but not least, don’t forget to wait till the sent RFC calls should be equal to received RFC Calls.