on 08-23-2012 6:23 AM
Hi All,
I need to use Parallel profile into my report to improve performance as the input has huge produt list. The report reads the data from planning area depending on the product entered. I learnt how to create profile and did one in the tcode /SAPAPO/SDP_PAR. I used this profile in report by selecting in the selection screen and saved as a variant. I then created a background job which uses this variant and executed. The job is taking same time as the job without parallel profile. Could you please tell me what other things i need to do it. I need to move the changes to prod this week. appreaciate your help.
THanks,
Deepika
Hi Ada,
I got lost looking at the code of the program /SAPAPO/TS_BATCH_RUN. Could you please tell me the steps i need to follow with some sample code? this would of great help.
Thanks,
Deepika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
As I said, it's really not that easy.
Maybe you can just refer to function module /SAPAPO/MSDP_PAR_PROCESS_START.
And you may mainly need the below steps:
1)Read parallel profile (around line 150)
2)Wait for free processes (around line 180)
3)Process blocks by loop (around line 320).
In the loop, you need to do:
- Read planning objects in blocks (around line 530)
- Loop end when no planning object is read (around line 560). Otherwise process the block.
- Check and wait for free processes (around line 610)
- Call up your process logic of the block in a different process using the statement like below:
------------------
CALL FUNCTION 'XXXXXXXXX'
STARTING NEW TASK lv_taskname
DESTINATION IN GROUP ls_par_profile-server_group
EXPORTING ...
---------------------
4) Wait until all processes are finished. (around line 1195)
Best Regards,
Ada
Sorry but no. Maybe you can copy some comman part like step 1), 2), 4), but you must create your own logic for planning object reading and processing. When I mentioned your process FM, I mean the FM you call inside the loop. This is nothing relevant with FM /SAPAPO/MSDP_PAR_PROCESS_START. I think an ABAP developer should understand the FM /SAPAPO/MSDP_PAR_PROCESS_START easily, since it has a clear logic.
Hi, what report are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case, you must create your own program logic to process the parallel profile in the customizing report, like, first check whether parallel profile exists, if yes, divide data in to blocks according to parallel profile setting, and process blocks in parallel processes in free process exists ... You can refer to some SAP standard report with parallel processing like /sapapo/ts_lcm_cons_check, or /sapapo/ts_batch_run.
I think yes. For example, in /sapapo/ts_batch_run, parallel processing is done in function module /SAPAPO/MSDP_PAR_PROCESS_START. You may notice the following coding:
---------------------
* Get number of free processes
WHILE lv_wait_for_resources = true. "Note 1380215
* ==> TK.803681
CALL FUNCTION '/SAPAPO/MSDP_PAR_FREE_PROC_GET'
EXPORTING
IV_SERVER_GROUP = ls_par_profile-server_group
IMPORTING
EV_PROCESSES = lv_free_wps
EXCEPTIONS
INTERNAL_ERROR = 1
NO_RESOURCES_AVAILABLE = 2 "Note 1380215
OTHERS = 3.
IF sy-subrc <> 0.
*<<<--- Note 1380215
IF sy-subrc = 2 AND sy-batch = true.
lv_wait_for_resources = true.
ELSE.
lv_wait_for_resources = false.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING INTERNAL_ERROR.
ENDIF.
ELSE.
lv_wait_for_resources = false.
*--->>> Note 1380215
ENDIF.
* <== TK.803681
ENDWHILE. "Note 1380215
-----------------
... and some further processes.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.