Parallel processing
Parallel processing is generally achieved through a series of different methods in standard SAP, however, each tend to have various drawbacks which often make it annoying to work with and usually not worth the effort for every day uses. This particular topic has been one of constant irritation for me especially when coming from other languages where parallel processing is common place. Asynchronously iterating through loops of slow processes is a serious pain and even more so when you care about the results or the completion of those processes such as a fork / join style proce
FORM f_display_data .
DATA: lv_index TYPE sy-index.
LOOP AT gt_vbak INTO gs_vbak.
IF sy-subrc EQ 0.
READ TABLE gt_vbap TRANSPORTING NO FIELDS INTO gs_vbap WITH KEY vbeln = gs_vbak-vbeln.
IF sy-subrc EQ 0.
lv_index = sy-index.
LOOP AT gt_vbap INTO gs_vbap FROM lv_index.
IF sy-subrc EQ 0.
IF gs_vbak-vbeln NE gs_vbap-vbeln.
EXIT.
ENDIF.
" PROCESS YOUR LOGIC HERE
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
FORM f_display_data .
DATA: lv_index TYPE sy-index.
LOOP AT gt_vbak INTO gs_vbak.
IF sy-subrc EQ 0.
READ TABLE gt_vbap TRANSPORTING NO FIELDS INTO gs_vbap WITH KEY vbeln = gs_vbak-vbeln.
IF sy-subrc EQ 0.
lv_index = sy-index.
LOOP AT gt_vbap INTO gs_vbap FROM lv_index.
IF sy-subrc EQ 0.
IF gs_vbak-vbeln NE gs_vbap-vbeln.
EXIT.
ENDIF.
" PROCESS YOUR LOGIC HERE
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
Comments
Post a Comment