Skip to Content
author's profile photo Former Member
Former Member

gui_download

hi all,

i am doing gui_download..

how to program it??

send me this gui_download program.

reply me soon,

thx,

s.suresh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2008 at 01:57 PM

    data: begin of text_lines occurs 100,

    line(150),

    end of text_lines.

    data: fname type string.

    parameters: p_local like rlgrap-filename.

    *fill in the internal table text_lines ... with data ...

    fname = p_local.

    call function 'GUI_DOWNLOAD'

    exporting

    filename = fname

    filetype = 'ASC'

    tables

    data_tab = text_lines

    exceptions

    file_write_error = 1

    no_batch = 2

    gui_refuse_filetransfer = 3

    invalid_type = 4

    no_authority = 5

    unknown_error = 6

    header_not_allowed = 7

    separator_not_allowed = 8

    filesize_not_allowed = 9

    header_too_long = 10

    dp_error_create = 11

    dp_error_send = 12

    dp_error_write = 13

    unknown_dp_error = 14

    access_denied = 15

    dp_out_of_memory = 16

    disk_full = 17

    dp_timeout = 18

    file_not_found = 19

    dataprovider_exception = 20

    control_flush_error = 21

    others = 22.

    if sy-subrc <> 0.

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

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

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2008 at 01:54 PM

    Hi,

    see this sample code....

    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    
     DATA: v_pass_path TYPE string.
    
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
    
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
    
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
                .

    Cheers,

    jose.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.