Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

packet size syntax

Former Member
0 Likes
952

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
923

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

6 REPLIES 6
Read only

GauthamV
Active Contributor
0 Likes
923

It is Package size not packet size.

Press F1 on package size in SE38 .

Read only

Former Member
0 Likes
924

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

Read only

0 Likes
923

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.

Read only

0 Likes
923

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

Read only

0 Likes
923

sorry thomas,

i was not known about it i thought of giving at the end but anyhow sorry for that bru.

Read only

0 Likes
923

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

ENDSELECT

bye

yk