2008 Aug 27 11:28 AM
HI ,
LOOP AT DD07V_TAB1.
N = 0.
LOOP AT DD07T_TAB WHERE DOMNAME = DD07V_TAB1-DOMNAME AND
DOMVALUE_L = DD07V_TAB1-DOMVALUE_L.
N = N + 1.
here there is loop under loop can any one pls write with read statment loop with read statment ,
iam thankful to u,
it is taking lot of time for executing
thanks in advance,
HI ,
LOOP AT DD07V_TAB1.
N = 0.
LOOP AT DD07T_TAB WHERE DOMNAME = DD07V_TAB1-DOMNAME AND
DOMVALUE_L = DD07V_TAB1-DOMVALUE_L.
N = N + 1.
here there is loop under loop can any one pls write with read statment loop with read statment ,
iam thankful to u,
it is taking lot of time for executing
thanks in advance,
2008 Aug 27 11:49 AM
Hello
SORT DD07V_TAB1.
SORT DD07T_TAB BY DOMNAME DOMVALUE_L.
LOOP AT DD07V_TAB1.
N = 0.
READ TABLE DD07T_TAB WITH KEY DOMNAME = DD07V_TAB1-DOMNAME AND
DOMVALUE_L = DD07V_TAB1-DOMVALUE_L BINARY SEARCH.
N = N + 1.
...
ENDLOOP.
2008 Aug 27 12:55 PM
Hi,
SORT DD07V_TAB.
SORT DD07T_TAB BY DOMNAME DOMVALUE.
LOOP AT DD07V_TAB1.
N = 0.
READ TABLE DD07T_TAB WITH KEY DOMNAME = DD07V_TAB1-DOMNAME AND
DOMVALUE_L = DD07V_TAB1-DOMVALUE_L.
IF SY-SUBRC EQ 0.
READ TABLE DD07T_TAB WITH KEY DOMNAME = DD07V_TAB1-DOMNAME AND
DOMVALUE_L = DD07V_TAB1-DOMVALUE_L.
IF SY-SUBRC EQ 0.
N = N + 1.
ENDIF.
ENDIF.
ENDLOOP.
Regards,
Rama.
2009 Apr 02 11:20 AM
2009 Apr 02 2:39 PM
Please use this solution see section 3
Measurements on internal tables: Reads and Loops:
/people/siegfried.boes/blog/2007/09/12/runtimes-of-reads-and-loops-on-internal-tables
or better use a sorted table as inner table.
And be aware, that only the inner table must be sorted, the other sort is a waste of time !!!
Siegfried