‎2009 Oct 20 9:19 AM
hi gurus,
i have seen in SDN one of the masters have said that for LARGE DATA we can use the SYNTAX " PACKET SIZE "
I have not seen this syntax what is syntax all about and how can we use this inorder to cater the large amount of data in an internal table.
the reason why am asking is i get a short dump in production and the short dump description says: there is no storage space available for the internal table.
so how can the above syntax can be used? thank in advance.
HERE IS HIS SAYING : for large data we can use PACKET SIZE syntax when we get the data into internal table . Might be they will help .
regards,
PASALA.
‎2009 Oct 20 9:38 AM
Hi,
If you have a very large result set an internal table might dump with exhausting memory .
You divide the access in packages to produce a constant flow of records into table memory
and automatic clearing the table memory before the next fetch.
In the example lets say the SELECT would return 100000 rows: we retrieve them in packages of 5000 rows
until all are fetched.
general syntax is:
Select field1 field2 field3 from table into int_tab PACKAGE SIZE 5000 .
* process the rows in packages of 5000
* ...
* ...
* i.e. spool the records to a file on your client pc
endselect.The SELECT is always enclosed with ENDSELECT because you have a kind of "looping" until all rows are fetched.
The fetches are done as array operations (retieves in one call PACKAGE SIZE rows).
A FOR ALL ENTRIES is applied AFTER the rows are fetched .
bye
yk
‎2009 Oct 20 9:27 AM
It is Package size not packet size.
Press F1 on package size in SE38 .
‎2009 Oct 20 9:38 AM
Hi,
If you have a very large result set an internal table might dump with exhausting memory .
You divide the access in packages to produce a constant flow of records into table memory
and automatic clearing the table memory before the next fetch.
In the example lets say the SELECT would return 100000 rows: we retrieve them in packages of 5000 rows
until all are fetched.
general syntax is:
Select field1 field2 field3 from table into int_tab PACKAGE SIZE 5000 .
* process the rows in packages of 5000
* ...
* ...
* i.e. spool the records to a file on your client pc
endselect.The SELECT is always enclosed with ENDSELECT because you have a kind of "looping" until all rows are fetched.
The fetches are done as array operations (retieves in one call PACKAGE SIZE rows).
A FOR ALL ENTRIES is applied AFTER the rows are fetched .
bye
yk
‎2009 Oct 20 10:02 AM
hi yukonkid,
thank you so much for the response.
after your explanation i have set my select statement like this... is this correct way of using the package syntax?
SELECT bukrs
belnr
buzei
gjahr
bschl
lifnr
kunnr FROM bseg
INTO CORRESPONDING FIELDS OF TABLE lt_bseg PACKAGE SIZE 5000
FOR ALL ENTRIES IN lt_covp
WHERE bukrs EQ lt_covp-refbk
AND belnr EQ lt_covp-refbn
AND buzei eq lt_covp-buzei
AND gjahr EQ lt_covp-refgj.
ENDSELECT.
looking forward to your reply.
thanks in advance.
regards,
pasala.
‎2009 Oct 20 10:35 AM
An appropriate way of thanking people here is to assign p o i n t s to helpful answers, have a look to the left of each of the replies to your questions. I'm mentioning this since you seem to never have done this in any of your previous threads.
Thomas
‎2009 Oct 20 10:44 AM
sorry thomas,
i was not known about it i thought of giving at the end but anyhow sorry for that bru.
‎2009 Oct 29 9:25 AM
Hi pasalabasker,
it's ok - but you will have some kind of processing, with the rows in the package, won't you?
Until now you are fetching and...then?
SELECT bukrs
belnr
buzei
gjahr
bschl
lifnr
kunnr FROM bseg
INTO CORRESPONDING FIELDS OF TABLE lt_bseg PACKAGE SIZE 5000
FOR ALL ENTRIES IN lt_covp
WHERE bukrs EQ lt_covp-refbk
AND belnr EQ lt_covp-refbn
AND buzei eq lt_covp-buzei
AND gjahr EQ lt_covp-refgj.===> here you have to add your processing . Your construct fetches rows in the int. table and clears them after the fetch.
At least you get the DB something to do
ENDSELECTbye
yk