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

package size

Former Member
0 Likes
1,846

hi all!!!

i am using package size in select statement , what ever records i get , i want to download them in presentation file using donload FModule, and after tht refresh the table itab .so that i can select next package of records .

But evrytime i execute , i get dump

Do u have any suggestions on it why getting dump ????

however for the first time i m able to download , triggers dump onli second time .

SELECT * INTO TABLE itab PACKAGE SIZE 10 FROM database.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'temp1.txt'

FILETYPE = 'ASC'

APPEND = 'X'

TABLES

DATA_TAB = itab[]

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDSELECT.

9 REPLIES 9
Read only

Former Member
0 Likes
1,348

You can't use INTO TABLE and ENDSELECT simultaneously.. You can't check for SY_SUBRC in between SELECT.. ENDSELECT..

Whatz ur actual requirement??

Read only

0 Likes
1,348

f you use package size option in select, you have to use selecte-endselect compulsorily.

  • Package size determines the Total # of records that will be picked up in the First loop.

thnx a lot tanveer.......

Message was edited by: kishan negi

Read only

Former Member
0 Likes
1,348

specify correct path for FILENAME

eg

CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = <b>'C:temp1.txt'</b>
FILETYPE = 'ASC'
APPEND = 'X'
TABLES
DATA_TAB = itab[]

Read only

Former Member
0 Likes
1,348

Hi,

I have got the answer i guess..

See u cant use Message inside a DB Loop.

Now in function Gui_download, a message is displayed..

Hence the error...

I guess u can get all the data in a single internal table say jtab by appending the data from itab.

and then call gui_download and download it in one go..

SELECT * INTO TABLE itab PACKAGE SIZE 10 FROM database.

append lines of itab to jtab.

endselect.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\temp1.txt'

FILETYPE = 'ASC'

TABLES

DATA_TAB = itab[]

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

Tanveer.

<b>Please mark helpful answers</b>

Read only

Former Member
0 Likes
1,348

hi,

the foll. may b the reasons for ur error

ur using <b>select into table</b> so at one shot ur itab gets populated and works fine but once u refresh it and try to use GUI_DOWNLOAD it might give u a dump because there is no content in the itab.

Read only

Former Member
0 Likes
1,348

HI

GOOD

I HOPE THERE WOULD BE SOME MEMORY PROBLEM WHILE DOWNLOAD THE DATA FOR THE SECOND TIME.

THE PACKAGE SIZE BESICALLY USE WHEN PROCESSING A LIMITED AMOUNT OF DATA AT A TIME DUE TO LACK OF MEMORY.

WHEN YOU R DOWNLOADING FIRST TIME IS USING A MEMORY AREA WHEN AGAIN YOUR USING THE SAME MEMORY AREA FOR THE SECOND TIME DOWNLOAD IT IS NOT GETTING THE SUFFICIENT MEMORY AREA TO DOWNLOAD BECAUSE THE PREVIOUS MEMORY AREA HAS ALREADY ACQUIRE THAT MEMORY,FIRST YOU HAVE TO CLEAR THE OLD MEMORY AREA AND THAN YOU CAN DOWNLOAD FOR THE SECOND TIME.

THANKS

MRUTYUN

Read only

Former Member
0 Likes
1,348

Hi,

Once you have selected the records into your internal table, loop at that internal table and thn call the FM GUI_DOWMLOAD.

Regards,

Aswin

Read only

Former Member
0 Likes
1,348

Hi Praveen,

You might got error due to DB open cursor.

You might append the entries to another internal table and download it at one shot..


DATA itab LIKE TABLE OF mara WITH HEADER LINE.
DATA itab1 LIKE TABLE OF mara WITH HEADER LINE.

SELECT *
  FROM mara
  INTO TABLE itab
  PACKAGE SIZE 10
  .
  APPEND LINES OF itab TO itab1.
ENDSELECT.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename = 'c:test.txt'
    filetype = 'ASC'
  TABLES
    data_tab = itab1.

Regards,

Wenceslaus.

Read only

0 Likes
1,348

Hi Praveen,

Have you Got the correct answer for your query.

I also faced same Problem.

Between SELECT and ENDSELCT , we can't use CALL FUNCTION...

we use generally Package Size if there is memory limitaion.

Better to use Some filter Criteria to reduce the data and over come memory problem.

Regards,

Murali K