Application Development 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: 

GUI_DOWNLOAD problem

Former Member
0 Kudos

Hi,

I am trying to download the table value to PC by using FM GUI_DOWNLOAD. TAB_DETAIL table has 15,000 character...but i am getting the output in the file only 8,000 characters. Please help me to get full 15,000 characters. Below is my coding.

DATA: L_SIZE1 TYPE I.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

BIN_FILESIZE = L_SIZE1

FILENAME = 'C:\ITEM1.TXT'

FILETYPE = 'ASC'

IMPORTING

FILELENGTH = L_SIZE1

TABLES

DATA_TAB = TAB_DETAIL

Thanks

Kelvin

13 REPLIES 13

Former Member
0 Kudos

hi

please edit the given and remove BIN_FILESIZE = L_SIZE1and than try if not try by removing FILELENGTH = L_SIZE1 if you have declared in declaration its ok or else than try by removing it .

thanking you

0 Kudos

Hi,

I have tried the same way. But still not bale to get entire characters. Actually TAB_DETAIL contains STRING value. Any other way is there to download entire value.

0 Kudos

Hi Kelvin,

Did you try Ambujavalli's suggestion, try the below code.

DATA: L_SIZE1 TYPE I.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\ITEM1.TXT'

FILETYPE = 'ASC'

IMPORTING

FILELENGTH = L_SIZE1

TABLES

DATA_TAB = TAB_DETAIL

Also, what do you mean by encrypted value? Are you decrypting the file before you read it or are you using any special software(which does the decrypting)?

Regards,

Chen

Edited by: Chen K V on Jun 2, 2011 4:26 PM

Edited by: Chen K V on Jun 2, 2011 4:27 PM

0 Kudos

Hi Chen,

I have tried that way also..but not getting entire value. I have encrypted entire string by using some algorithm...its encrypted well. But while downloading the encrypted value its downloading partial value only. please help me.

Thanks.

Former Member
0 Kudos

Hi,

Give only file name and data_tab like below.

CALL METHOD cl_gui_frontend_services=>gui_download
  EXPORTING
    filename = ld_file
  CHANGING
    data_tab = datatab
  EXCEPTIONS
    OTHERS   = 1.

Former Member
0 Kudos

Hi,

Take one internal table with the field as type string. And pass that value to the DATA_TAB. May be it will work.

Thank you,

shiva

0 Kudos

HI Shivach,

I tried that also ...but not working. Any other option? Actually TAB_DETAIL contains encrypted string value.

Former Member
0 Kudos

How wide is each row? GUI_DOWNLOAD transfers up to 1024 bytes per row.

0 Kudos

Hi,

It's a single string value...has 15 thousand characters. While debugging i can see the internal table TAB_DETAIL 15 thousand character. But while passing to GUI_download , import parameter FILELENGTH has taking only 8 thousand character. Thats why i couldnt get 15K character at my downloaded file. What needs to do..

Thanks

0 Kudos

Moderator message - When closing old threads, there is no need to add a comment. Adding a pasted answer like "solved by own" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved. Rob

0 Kudos

Hi Kelvin,

Post the below information from your program,

data declaration of the ITAB - TAB_DETAIL, you say that the encrypted value is in a string, paste the code using which you are passing the string value to the ITAB.

It's a single string value...has 15 thousand characters.

Do you mean to say that TAB_DETAIL is declared and the way you are passing the string to the table is as below?


DATA: TAB_DETAIL type standard table of string.
append encrypted_string to TAB_DETAIL.

Regards,

Chen

former_member203305
Active Contributor
0 Kudos

Hi,

how did u declare the TAB_DETAIL??? Maybe the problem is located there and not in the GUI_DOWNLOAD

In addition

do not use this:


BIN_FILESIZE = L_SIZE1
FILETYPE = 'ASC'

because the default option of the FM is filetype = 'ASC'.

Regards

Former Member
0 Kudos

solved