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

Using DOWNLOAD Function Module

Former Member
0 Likes
806

Hi all,

I see this code in a report:

CALL FUNCTION 'DOWNLOAD'
     EXPORTING
       filetype                = 'ASC'
       item                    = 'BANC'
       filename                = 'C:\*.txt'
     IMPORTING
       cancel                  = cancel
     TABLES
       data_tab                = t_banc
     EXCEPTIONS
       invalid_filesize        = 1
       invalid_table_width     = 2
       invalid_type            = 3
       no_batch                = 4
       unknown_error           = 5
       gui_refuse_filetransfer = 6
       OTHERS                  = 7.

And I just can't figure out why they have C:\*.txt as filename. Do you know the use of this?

8 REPLIES 8
Read only

former_member213851
Active Contributor
0 Likes
785

it's just default filename which will come on selection screen after executing REPORT .before pressing F8, WE HAVE TO REPLACE THE * by our desired file name.

Read only

0 Likes
785

And what about this?

CALL FUNCTION 'DOWNLOAD'
     EXPORTING
       filetype                = 'ASC'
       item                    = 'COM_INT1'
     IMPORTING
       cancel                  = cancel
     TABLES
       data_tab                = t_inter1
     EXCEPTIONS
       invalid_filesize        = 1
       invalid_table_width     = 2
       invalid_type            = 3
       no_batch                = 4
       unknown_error           = 5
       gui_refuse_filetransfer = 6
       OTHERS                  = 7.

The default filename is space. Where is the file saved?


Read only

0 Likes
785

a file save dialog will pop up.

Something you might even have tried 🙂

Regards

Clemens

Read only

0 Likes
785

Rob, who's reading who's mind?

Read only

0 Likes
785

Yeah, I could see that the content of ITEM appears in the title of the dialog popup,

I was wondering if that was the only use for that. Now I know.

Read only

0 Likes
785

karina hurtado wrote:

Yeah, I could see that the content of ITEM appears in the title of the dialog popup,

I was wondering if that was the only use for that. Now I know.

...which is what it says in the FM documentation.

Rob

Read only

0 Likes
785

You're right Rob, I looked at the documentation, but didn't find helpful information because I was logged in spanish, and in that language there is no description for the parameters of the function, now I log in english and there it is. Next time I'll have more care on that. Thanks.

Read only

Former Member
0 Likes
785

Moderator message - rather than asking here, you could learn a lot by trying this yourself.

Unmarked as a question

Rob