Loop within loop SAP ABAP Programming langauge
How to optimize your code performance tips parral cursor methods in a programming language
here a simple way to use
LOOP AT gt_vbap INTO gs_vbap.
gs_vbap1-vbeln = gs_vbap-vbeln.
gs_vbap1-netwr = gs_vbap-netwr.
COLLECT gs_vbap1 INTO gt_vbap1.
READ TABLE gt_vbak_new INTO gs_vbak_new WITH KEY vbeln = gs_vbap-vbeln.
IF sy-subrc = 0.
READ TABLE gt_konv INTO gs_konv WITH KEY knumv = gs_vbak_new-knumv
kposn = gs_vbap-posnr.
IF sy-subrc = 0.
LOOP AT gt_konv INTO gs_konv FROM sy-tabix.
IF gs_konv-knumv NE gs_vbak_new-knumv AND gs_konv-knumv NE gs_vbak_new-knumv.
EXIT.
ELSE.
IF gs_konv-kposn EQ gs_vbap-posnr.
gs_konv1-knumv = gs_konv-knumv.
gs_konv1-kwert = gs_konv-kwert.
COLLECT gs_konv1 INTO gt_konv1.
ENDIF.
CLEAR gs_konv1.
ENDIF. " WHERE kposn = gs_vbap-vbeln.
ENDLOOP.
ENDIF.
ENDIF.
CLEAR gs_vbap1.
ENDLOOP.
*********************************************************************************RICEF
Reports interface Converstion , Enhancements , Forms
Classical Reports ALV Programming, ALE/ IDOC
BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms,
SAP T-CODE
MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41, SE51, SE80,SE84
SE90,SE10,SE09,SE03,
Getway T-Code
/IWFND/GW_CLIENT
/IWFND/ERROR_LOG
/IWFND/APPS_LOG
/IWBEP/VIEW_LOG
/IWFND/CACHE_CLEANUP
/IWFND/TRACES
*********************************************************************************
here a simple way to use
LOOP AT gt_vbap INTO gs_vbap.
gs_vbap1-vbeln = gs_vbap-vbeln.
gs_vbap1-netwr = gs_vbap-netwr.
COLLECT gs_vbap1 INTO gt_vbap1.
READ TABLE gt_vbak_new INTO gs_vbak_new WITH KEY vbeln = gs_vbap-vbeln.
IF sy-subrc = 0.
READ TABLE gt_konv INTO gs_konv WITH KEY knumv = gs_vbak_new-knumv
kposn = gs_vbap-posnr.
IF sy-subrc = 0.
LOOP AT gt_konv INTO gs_konv FROM sy-tabix.
IF gs_konv-knumv NE gs_vbak_new-knumv AND gs_konv-knumv NE gs_vbak_new-knumv.
EXIT.
ELSE.
IF gs_konv-kposn EQ gs_vbap-posnr.
gs_konv1-knumv = gs_konv-knumv.
gs_konv1-kwert = gs_konv-kwert.
COLLECT gs_konv1 INTO gt_konv1.
ENDIF.
CLEAR gs_konv1.
ENDIF. " WHERE kposn = gs_vbap-vbeln.
ENDLOOP.
ENDIF.
ENDIF.
CLEAR gs_vbap1.
ENDLOOP.
*********************************************************************************RICEF
Reports interface Converstion , Enhancements , Forms
Classical Reports ALV Programming, ALE/ IDOC
BDA Programming, Call Transcation , SAP Script, Smartforms, Adove forms,
SAP T-CODE
MM FLOW , SD FLOW , SE11,SE18 ,SE24,SE30, SM12,ST22, SE41, SE51, SE80,SE84
SE90,SE10,SE09,SE03,
Getway T-Code
/IWFND/GW_CLIENT
/IWFND/ERROR_LOG
/IWFND/APPS_LOG
/IWBEP/VIEW_LOG
/IWFND/CACHE_CLEANUP
/IWFND/TRACES
*********************************************************************************
Comments
Post a Comment