- CASE1. Program start new task, and later acquired processing result
*"---------------------------------------------------------------------- *"*"本地接口: *" IMPORTING *" VALUE(IS_NAST) TYPE NAST *" EXPORTING *" VALUE(CV_SUBRC) TYPE SY-SUBRC *"---------------------------------------------------------------------- DATA:IV_FUNCNAME TYPE RS38L_FNAM. DATA et_return TYPE TABLE OF bapiret2. DATA et_pro_stru TYPE TABLE OF zif_pro_structure. DATA lt_bapiret2 TYPE TABLE OF bapiret2. CALL FUNCTION 'ZIF_FUNC_CALL' STARTING NEW TASK is_nast-objky PERFORMING frm_function_recevie_data ON END OF TASK EXPORTING iv_funcname = lv_funcname iv_zproid = ls_pro-zproid is_nast = is_nast TABLES rt_bapiret2 = lt_bapiret2[]. FORM frm_function_recevie_data USING ck . DATA: lt_bapiret2 TYPE TABLE OF bapiret2 . RECEIVE RESULTS FROM FUNCTION 'ZIF_FUNC_CALL' TABLES rt_bapiret2 = lt_bapiret2 EXCEPTIONS communication_failure = 1 system_failure = 2 . gt_bapiret2 = lt_bapiret2 . gv_done = 'X'. ENDFORM.
-
20.1.2 RFC function: remote call
20.1.2.1. Synchronization
CALL FUNCTION task [ DESTINATION ] [? Right? Nei ?? n]
(In the case of DESTINATION not be omitted, and the dest value is not SPACE, the function must be the RFC function in this manner in order for remote synchronous call)
20.1.2.2. Asynchronous
CALL FUNCTION rfm_name STARTING NEW TASK [DESTINATION dest]taskname PERFORMING return_form ON END OF TASK FORM return_form USING taskname. ... RECEIVE RESULTS FROM FUNCTION rfm_name ... ENDFORM.
Wait for multiple asynchronous call returns a result: WAIT UNTIL log_exp [ UP the TO sec SECONDS ].
When the asynchronous call can not have IMPORTING parameters ; the function must be the RFC function before using the asynchronous call; as long as there STARTING NEW TASK option is the asynchronous call; if it is asynchronous calls to the same end goal of RFC function, you can omit DESTINATION
ABAP program parallel processing
Guess you like
Origin www.cnblogs.com/rainysblog/p/11566641.html
Ranking