‎2007 Dec 14 5:42 AM
Hi All.
My requirement is to fetch data from BSEG for whole fiscal year, now problem is that for a single fiscal year there are about 170000 records. Now when i try to select this , i got time exceed error. We also cant inner join or index for BSEG. Is there any way to solve this problem? can we set internally like it will select data inslot like 100000 records at a time? Please suggest me proper solurion..
Thanks.
‎2007 Dec 14 5:43 AM
Hi PKB,
Try adding the Package size for the internal table , so that only that many records will be fetched.
Reward if USeful..
Regards,
Chitra
‎2007 Dec 14 5:45 AM
Hi,
Use FOR ALL ENTRIES its performance wise better and pass all the keys.s
&----
*& Form sub_read_bseg
&----
text
----
--> p1 text
<-- p2 text
----
FORM sub_read_bseg.
IF NOT it_bsak[] IS INITIAL.
*--Select data from BSEG table
SELECT belnr
gjahr
shkzg
kostl
hkont
ebeln
ebelp
FROM bseg
INTO TABLE it_bseg
FOR ALL ENTRIES IN it_bsak
WHERE belnr EQ it_bsak-belnr
AND gjahr EQ it_bsak-gjahr
AND shkzg EQ 'S'.
IF sy-subrc EQ 0.
*--Sort table by accounting document
SORT it_bseg BY belnr.
ENDIF.
ENDIF.
ENDFORM. " sub_read_bseg
Regards,
Prashant
‎2007 Dec 14 5:45 AM
‎2007 Dec 14 5:48 AM
‎2007 Dec 14 5:49 AM