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 in OAbap is using class and methods in report level program.
Parallel Processing is implemented with a special variant of Asynchronous RFC. It’s important that you use only the correct variant for you own parallel processing applications. The “CALL FUNCTION STARTING NEW TASK DESTINATION IN GROUP” keywords.
when a huge number of records needs to be processed and it takes a lot of time to produce the output, this parallel processing technique can be applied to achieve run time improvement. So, this Parallel processing is an asynchronous call to the Function Module in parallel sessions/ different session/ multiple sessions.
T-Codes:
RZ12 – To Check the Server Group.
SM66 – To Check all the Work Processers.
SM51 – To Check the Application Server.
SM21 – System log in case of any failures.
“”””” parallel processing “”””””””
REPORT ZPARALLEL_PROCESSING_OABAP.
DATA:chk1,
chk2,
ret11 TYPE TABLE Of bapisdstat,
ret22 TYPE TABLE OF bapisdstat,
ret TYPE bapisdstat.
CLASS lcl_demo DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
CALL IMPORTING sdoc1 TYPE bapivbeln–vbeln
sdoc2 TYPE bapivbeln–vbeln,
handle1 IMPORTING p_task TYPE clike, “must have a importing para-of type clike
handle2 IMPORTING p_task TYPE clike. “must have a importing para-of type clike
ENDCLASS. “LCL_DEMO DEFINITION
*———————————————————————-*
* CLASS LCL_DEMO IMPLEMENTATION
*———————————————————————-*
CLASS lcl_demo IMPLEMENTATION.
METHOD call.
CALL FUNCTION‘BAPI_SALESORDER_GETSTATUS’
STARTING NEW TASK‘FUNC1’
DESTINATION‘NONE’
CALLING handle1 ON END OF TASK
EXPORTING
salesdocument = sdoc1.
CALL FUNCTION ‘BAPI_SALESORDER_GETSTATUS’
STARTING NEW TASK ‘FUNC2’
DESTINATION ‘NONE’
CALLING handle2 ON END OF TASK
EXPORTING
salesdocument = sdoc2.
WAIT UNTIL chk1 = abap_true AND chk2 = abap_true.
WRITE:/‘SUCCESS’.
ENDMETHOD. “call method
METHOD handle1.
DATA: ret1 TYPE TABLE OF bapisdstat.
RECEIVE RESULTS FROM FUNCTION ‘BAPI_SALESORDER_GETSTATUS’
TABLES
statusinfo = ret1.
ret11 = ret1.
chk1 = abap_true.
ENDMETHOD. “HANDLE1
METHOD handle2.
DATA: ret2 TYPE TABLE OF bapisdstat.
RECEIVE RESULTS FROM FUNCTION ‘BAPI_SALESORDER_GETSTATUS’
TABLES
statusinfo = ret2.
ret22 = ret2.
chk1 = abap_true.
ENDMETHOD. “HANDLE2
ENDCLASS. “LCL_DEMO IMPLEMENTATION
START-OF-SELECTION.
PARAMETERS: p_sdoc1 TYPE bapivbeln–vbeln,
p_sdoc2 TYPE bapivbeln–vbeln.
CALL METHOD lcl_demo=>call
EXPORTING
sdoc1 = p_sdoc1
sdoc2 = p_sdoc2.
LOOP AT ret11 INTO ret.
write: / ret–doc_number , ret–material, ret–creation_date.
ENDLOOP.
CLEAR ret.
LOOP AT ret22 INTO ret.
write:/ ret–doc_number,ret–material, ret–creation_date.
ENDLOOP.
PROGRAM:
No comments:
Post a Comment