‎2008 May 23 11:15 AM
Hi All,
How to use Parallal processing in our report program, My report has to execute by forground. i have checked this bwlow link, they mentioned some small code here. but how to use and where to place this code in my report program.
http://help.sap.com/saphelp_nw70/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm
Thanks,
Subbu.
‎2008 May 26 10:56 AM
‎2008 May 23 12:28 PM
That link gives you all the information you need, including a fully annotated sample program. What more information do you want?
matt
‎2008 May 23 1:36 PM
Hi Matthew ,
Thanks for your reply.
I have a one report, it will generate output list with interactive way. This is normal report contains 2000 lines. How to implement this parallal process in my report.
I could get how to use this process with the link information.
If you dont mind explain with small a program.
data kna1 like kna1 occurs 0 with header line.
select * from kna1 into table kna1.
data var type i.
loop at kna1.
var = var + 1.
write:/ kna1-kunnr.
if var = 1000.
exit.
endif.
endloop.
This is my sample program how to use this process in this program.
Thanks,
Subbu.
‎2008 May 23 2:10 PM
Your sample program is not really suitable for parallel processing. You need something that can be split into two or more independent processes.
matt
‎2008 May 23 2:19 PM
In addition, the runtime of the overall process should be so critical that it warrants the extra effort and added complexity of the parallel approach.
Cheers
Thomas
‎2008 May 23 2:31 PM
Ok...
Below is the some part of the program...If it possible to insert the parallal processing please let me know...It very urgent for me....
LOOP AT ITAB.
PERFORM MOVE_GR_AMTS_TO_ITAB.
PERFORM ET_IR_AMTS_FOR_PO_LINE.
PERFORM IGURE_COMMITMENTS_COOI.
MODIFY ITAB.
ENDLOOP.
FORM MOVE_GR_AMTS_TO_ITAB.
CLEAR GR_TAB.
MOVE-CORRESPONDING ITAB TO GR_KEY.
READ TABLE GR_TAB WITH KEY GR_KEY BINARY SEARCH.
IF SY-SUBRC = '0'.
ITAB-GR_QTY = GR_TAB-GR_QTY.
ITAB-GR_VALUE_CO = GR_TAB-GR_VALUE_CO.
ITAB-GR_VALUE_DOC = GR_TAB-GR_VALUE_DOC.
ITAB-GR_VALUE_LOC = GR_TAB-GR_VALUE_LOC.
ENDIF.
ENDFORM.
FORM GET_IR_AMTS_FOR_PO_LINE.
data : begin of EKBE occurs 0,
BUDAT like EKBE-BUDAT,
MENGE like EKBE-MENGE,
DMBTR like EKBE-DMBTR,
WRBTR like EKBE-WRBTR,
WAERS like EKBE-WAERS,
SHKZG like EKBE-SHKZG,
end of ekbe.
SELECT BUDAT MENGE DMBTR WRBTR WAERS SHKZG FROM EKBE into table EKBE WHERE EBELN = ITAB-PO_NO
AND EBELP = ITAB-LINE
AND VGABE EQ '2'
AND ZEKKN EQ ITAB-ZEKKN.
if sy-subrc is not initial.
exit.
endif.
loop at EKBE.
IF EKBE-SHKZG = 'H'.
ekbe-MENGE = EKBE-MENGE * -1.
ekbe-DMBTR = EKBE-DMBTR * -1.
ekbe-WRBTR = EKBE-WRBTR * -1.
ENDIF.
ITAB-IR_QTY = ITAB-IR_QTY + ekbe-MENGE.
ITAB-IR_VALUE_DOC = ITAB-IR_VALUE_DOC + ekbe-WRBTR.
ITAB-IR_VALUE_LOC = ITAB-IR_VALUE_LOC + ekbe-MBTR.
IF ITAB-CURR_PO = ITAB-CURR_CO.
ITAB-IR_VALUE_CO = ITAB-IR_VALUE_CO + ekbe-WRBTR.
ELSE.
GS_CONV_AMT = ekbe-WRBTR / GS_CORATE.
PERFORM GET_CURR_RATE USING ekbe-WAERS ekbe-BUDAT CHANGING GS_RATE.
ITAB-IR_VALUE_CO = ITAB-IR_VALUE_CO +
GS_CONV_AMT * GS_RATE.
ENDIF.
endloop.
ENDFORM.
FORM FIGURE_COMMITMENTS_COOI .
data : begin of COOI occurs 0,
WKGBTR like COOI-WKGBTR,
WTGBTR like COOI-WTGBTR,
WHGBTR like COOI-WHGBTR,
end of COOI.
SELECT WKGBTR WTGBTR WHGBTR FROM COOI into table COOI WHERE REFBT = '020'
AND REFBN = ITAB-PO_NO
AND RFPOS = ITAB-LINE
AND RFKNT = ITAB-ZEKKN.
if sy-subrc is not initial.
exit.
endif.
loop at COOI.
itab-COMMIT_CO = itab-COMMIT_CO + COOI-WKGBTR.
itab-COMMIT_DOC = itab-COMMIT_DOC + COOI-WTGBTR.
itab-COMMIT_LOC = itab-COMMIT_LOC + COOI-WHGBTR.
endloop.
ENDFORM.
Thanks...
‎2008 May 26 10:56 AM
‎2008 May 27 2:45 PM
‎2008 May 28 10:35 AM
Hi ,
Get the basic requirement of using the PArallel processing.
You can use the parallel processing with only Function modules(RFC only).
You can call this fm's in parallel processing, inside a loop.
Now for your case, if you want to improve the performance of your program by implementing the Parallel processing, first get the logic moved inside a FM(rfc) and then use the fm like below
CALL FUNCTION 'XXXX'
IN NEW TASK <task name>
DESTINATION <destination name>.......
I hope you have seen the help , if still u have some doubts in using this plz post again, may be i will try to clear you
Regards
Sunil kumar P