‎2006 May 15 8:07 AM
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.
‎2006 May 15 8:11 AM
You can't use INTO TABLE and ENDSELECT simultaneously.. You can't check for SY_SUBRC in between SELECT.. ENDSELECT..
Whatz ur actual requirement??
‎2006 May 15 8:12 AM
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
‎2006 May 15 8:13 AM
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[]
‎2006 May 15 8:14 AM
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>
‎2006 May 15 8:19 AM
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.
‎2006 May 15 8:20 AM
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
‎2006 May 15 8:22 AM
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
‎2006 May 15 8:28 AM
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.
‎2006 May 15 9:24 AM
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