‎2006 Dec 07 8:49 AM
Hi all
I have 2 tables AD01DLI and ADO1DLIEF, i want to retrieve data, where dlinr value doest not match each of the two tables, and dopen field of table AD01DLIEF is not blank(' '), and there is an internal able T_COVP which has field blenr that should match with AD01DLI blenr.
As the data is too large in both of the tables .i need to do using single select statement, performace issue,
can any of u can guide me
rgds
anu
‎2006 Dec 07 8:54 AM
use the Package size option to limit the number of records each time , when n is the number of records selected at one time
SELECT *
FROM <table>
INTO TABLE itab
PACKAGE SIZE <n>.
IF sy-subrc EQ 0.
*" Process the n records
ENDIF.ENDSELECT.
‎2006 Dec 07 10:23 AM
Declare the internal table containing the required fields from both table.
<b>select</b> * into table itab from AD01DLI as a inner join ADO1DLIEF as b on AD01DLI - field <> ADO1DLIEF-field
where dopen <> ' '.
<b>if</b> not itab is initial.
<b>loop</b> at itab.
<b>read table</b> T_COVP with key blenr = itab1-blenr.
<b>if</b> sy-subrc <> 0.
<b>delete</b> the particular record.
<b>endif.</b>
<b>endloop.</b>
‎2006 Dec 07 10:27 AM
Hi,
Try to create a database view for tables AD01DLI and ADO1DLIEF. Retreive data from database view and T_COVP table belnr check with AD01DLI belnr field.
Regards
Bhupal Reddy