Gui_download doubt

Hi Friends,
     i'm try to download internal table values to excel using GUI_DOWNLOAD.
    it's working fine in foreground.
    but i execute the report in back ground. the job was canclled. the err log is " " "ABAP/4 processor: OBJECTS_OBJREF_NOT_ASSIGNED" " ".
What is the solution.
Thanks & Regards,
Vallamuthu.M

Hello,
As mentioned in the previous post i DONOT think that it is a limitation of SAP. You cannot use GUI-related FMs in background mode.
When you execute the report in background you have to write the file into Application server.
For further info plz search SDN.
BR,
Suhas

Similar Messages

  • Urgent-Doubt in GUI_DOWNLOAD

    hi friends,
    In downloading data from internal table using GUI_DOWNLOAD i want only one space to be there after each field ...
    is it right to use write_field_seperator = '   '  or write_field_seperator = 'X'.
    i tried with 'X' i get tab delimited with multiple spaces , also tried with '  ' i got output fields with no space

    Hi Gokul,
    the function module GUI_DOWNLOAD is like this....
    <b>CALL FUNCTION 'GUI_DOWNLOAD'</b>
    EXPORTING
    BIN_FILESIZE =
    filename = 'C:\Documents and Settings\msgpool\Desktop\entries.txt'
    FILETYPE = 'ASC'
    APPEND = ' X'
    <b>write_field_separator = '|'</b>
    TABLES
    data_tab = it_final.
    in that function module you give like this means...
    <u>write_field_seperator = 'X'.</u> that indicates the separator in the file is <b><u>TAB</u></b>so you getting more space between fields....
    you want only one space to be there after each field ...so use like this..
    <b>write_field_seperator = 'SPACE'.</b>
    Now also you getting problem in ouput send a mail to my id....
    <u>[email protected]</u>
    *reward for useful answers*
    With Regards,
    Sandeep.

  • Urgent : doubt on gui_download

    hi guys,
    i am using gui_download to download the details into a local file ..
    when i am downloading into the local file . the matnr containing so many zeros in front when i download into a text file. but my problem is when i download into excel the matnr is right alligned but my requirement is to have the matnr left alligned in the output excel ...if there are any usefull answers please reply

    Hi gokul,
    1. GUI_DOWNLOAD
        always creates a TEXT File
       whether we give extension .TXT or .XLS
    2. Microsoft excel automatically detects the type of file,
        whether it is .txt or xls
        and opens accordingly.
    3. In excel, by default, the numbers are always right aligned,
        so it shows right.
       We cannot control the alighment directly from gui_download,
       bcos the format of file is always text,
       and microsoft excel.
    regards,
    amit m.

  • Doubt about GUI_DOWNLOAD function module

    Hi Experts,
                          I am using GUI_DOWNLOAD to download internal table data into text file. In the text file I need to display Pipe symbol as delimiter instead of  tab space.
    Is there any parameter in the functionmodule which works on this or any other alternative..?

    Hi Krishna,
    The FM doesn't accomodate for any other delimeter other than tab space.
    In this case you will have to create a table of type string, loop through your ITAB and concatenate each field separated by '|' and then download this table using "GUI_DOWNLOAD".
    Regards,
    Chen

  • Doubt on GUI_DOWNLOAD

    hi friends,
    I need to Download three files , one at a time using GUI_DOWNLOAD .
    in the perform i wrote like
    perform download using int_tab1 .
    for this in the form i will write like
    form download using int_tab1 type tfl_tab1  "  (type for int_tab1).
    so in the GUI_DOWNLOAD i can use int_tab1.
    according to my requirement i have three radiobutton  . if they click one radio button i will call one perform as i wrote before  to download one file.
    i need to know can i use only one GUI_DOWNLOAD to download three files each one each three different internal tables in GUI_DOWNLOAD using three different perform but only one
    GUI_DOWNLOAD.

    Hi,
    here a short example to have one download-forms which will
    be calle with different parameters.
    DATA: DATEI_PC      TYPE STRING.
    DATA: IMARA         TYPE TABLE OF MARA.
    DATA: ILFA1         TYPE TABLE OF LFA1.
    DATA: DO(1) VALUE 'M'.
    SELECT * FROM MARA INTO TABLE IMARA UP TO 10 ROWS.
    SELECT * FROM LFA1 INTO TABLE ILFA1 UP TO 20 ROWS.
    Here the download be called on ciditions.
    IF DO = 'M'.
      PERFORM DOWNLOAD TABLES IMARA[] USING 'MARA.TXT'.
    ELSE.
      PERFORM DOWNLOAD TABLES ILFA1[] USING 'LFA1.TXT'.
    ENDIF.
    FORM DOWNLOAD TABLES ITAB USING FILE.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_DESKTOP_DIRECTORY
      CHANGING
        DESKTOP_DIRECTORY = DATEI_PC.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      CONCATENATE DATEI_PC FILE INTO DATEI_PC.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          FILENAME = DATEI_PC
          FILETYPE = 'ASC'
        CHANGING
          DATA_TAB = ITAB[].
    ENDFORM.                    "download
    Hope it helps.
    regards, Dieter
    Message was edited by:
            Dieter Gröhn

  • Gui_Download - Suppress leading zero in EXCEL

    Hello,
    in my scenario I need to build an excel file in which some of the information they need to be displayed in excel with the leading 0 in front (type-lqua lgort 0701 ) thing does not happen in my view.
    I create the Excel file like this:
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
    = BIN_FILESIZE
           FILENAME = filename
           FILETYPE = 'ASC'
    APPEND = ''
          WRITE_FIELD_SEPARATOR = 'X'
         TABLES
           DATA_TAB = tb_out
    I have read in some posts that just insert a character " ' "   to show everything as text, however, this does not fit in my case because my file is the input to another application (not mine) that reads the file with the FM' ALSM_EXCEL_TO_INTERNAL_TABLE '
    How can I view the file directly without suppressing leading 0 ?
    Thanks in advance

    try this
    instead of gui_download use this to download into excell file.
    DATA: XL_itab type alsmex_tabline occurs 0 with header line.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = FILENAM
          I_BEGIN_COL = 1
          I_BEGIN_ROW = 2
          I_END_COL   = 3
          I_END_ROW   = 5000
        TABLES
          INTERN      = xl_itab.
    * EXCEPTIONS
    * INCONSISTENT_PARAMETERS = 1
    * UPLOAD_OLE = 2
    * OTHERS = 3 .
      IF SY-SUBRC = 0.
    * MESSAGE 'DATA UPLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
      loop at xl_itab.
        case xl_itab-col.
          when '1'.
            <your workarea-fieldname> = xl_itab-value.
          when '2'.
             <your workarea-fieldname>  = xl_itab-value.
          when '3'.
             <your workarea-fieldname>  = xl_itab-value.
        endcase.
        at end of row.
          append<work area> to <internal table>.
          clear <workarea>.
        endat.
      endloop.
    if you have more doubts just reply me

  • Doubt in code....

    Hi,
    I have following doubt. I am using a BAPI to get details regarding particular Object number. The list of object numbers are in internal table it_tab
    Loop at it_tab.
    Call Function 'ZCUSTOM'
    EXPROTING
    NUMBER = IT_TAB-NUMBER
    TABLES
    TAB1 = TAB1[]
    TAB2 = TAB2[]
    TAB3 = TAB3[].
    Now the Data from TAB1 table, TAB2 table and Tab3 table should be written in a flat file1, fil2 and file3.
    My doubt, is when the next number is passed to BAPI ZCUSTOM while looping, the data tables for that next number should be written in respective files but on next line (keeping the previous data intact)
    So,
    Data returned when NUMBER1 :- TAB1 - AAA,11; TAB2 - BBB,12; TAB3 - CCC,13
    Data returned when Number2 :- TAB1 - YYY,10; TAB2 - ZZZ,09; TAB3 - TTT,08
    Flat file1 Content should be:
    AAA,11
    YYY,10
    Flat file2 Content should be:
    BBB,12
    ZZZ,09
    Flat file3 Content should be:
    CCC,13
    TTT,08
    How can I achieve this ?
    Regards,
    Rajesh.

    Ok,  so again, I would build internal tables for you files.  Then when done in the LOOP and calling the custom BAPI,  simply download the internal tables to the PC once.  see the pseudo code below.
    Loop at itab.
        call function 'ZCUSTOM'
        append lines of ttab1 to itab1.
        append lines of ttab2 to itab2.
        append lines of ttab3 to itab3.
        append lines of ttab4 to itab4.
    endloop.
    call function 'GUI_DOWNLOAD'
             tables
                   data_tab   = itab1.
    Regards,
    Rich Heilman

  • Filename in gui_download and ws_download

    Hi Friends..
    if i using like this..
    concatenate 'C:\'
                  syst-date
                  '.xls'
        into mc_filename.
    in program and gave the mc_filname as a filename in the function module.its working fine in ws_download but it was not working in gui_download function module.
    so please give your valuable suggetion regarding this..
    Thanks
    Gowrishankar

    Hi Gowrishankar,
    In WS_DOWNLOAD Function module Filename type is char but
    In GUI_DOWNLOAD Function module Filename type is string.
    so it is going to dump. first change the type of filename in your program
    Plzz reward if it is helpful,
    Mahi.

  • Doubt in fbl1n transaction

    hi i have a doubt....
    in fbl1n transaction, there are open items and cleared items.
    in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik)
    however the cleared items for document types such as general  voucher its present in the open items table (bsik)
    is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
    plz exlain!

    Hi
    There are 2 tables(open and Closed Items)  in FI for Account Payables and Account Receivables and GL accounts
    1.Account payables: BSIK is Open Items and BSAK is Closed items
    2.Account Receivables; BSID and BSAD for OPEN and closed items
    3/GL accounts :  BSIS and BSAS  for Open and Closed Items
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Issue in conversion of output file from alv to csv file using GUI_DOWNLOAD

    hi,
    I am using GUI_DOWNLOAD to convert the internal table that am getting as the output of an alv into a csv(comma separated file) file.I am using the following code but its not generating a csv file instead it is generating a normal space delimited file.
    The code is as follows:
    data : lv_fname type string.
    lv_fname = 'C:\Users\pratyusha_tripathi\Desktop\status8.csv'. " Provide the file path & file name with CSV extention
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = lv_fname " File name including path, give CSV as extention of the file
    FILETYPE = 'DAT'
    WRITE_FIELD_SEPARATOR = '#' " Provide comma as separator
    tables
    data_tab = ITAB " Pass the Output internal table
    FIELDNAMES =
    EXCEPTIONS
    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.
    Kindly let me know what changes can be made to make my code work.Also can GUI_download be used for batch processing and storing the output in application server?
    Thanks ,
    Pratyusha

    Hi,
    the short text description for WRITE_FIELD_SEPARATOR is "Separate Columns by Tabs in Case of ASCII Download", so why do you expect a comma?
    Try SAP_CONVERT_TO_CSV_FORMAT and then download.
    And no, GUI_DOWNLOAD is only for download via SAP GUI to a users computer.
    Best regards,
    Oliver

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • Issue in GUI_DOWNLOAD

    Hi Experts,
    We are using GUI_DOWNLOAD function module to download data into presentation server in ECC6.
    DATA: T_DATX(300) OCCURS 500 WITH HEADER LINE.
    T_DATX is the one we are passing to FM which contains data to be downloaded.
    In 4.7 version, we have used DATA: _T(1) TYPE x VALUE '09' as field seperator.
    but its not accepting in ECC6 after upgrade. so to overcme this, we have used DATA: T(1) TYPE C VALUE CLABAP_CHAR_UTILITIES=>VERTICAL_TAB. but still its not downloading properly into cells in the excel sheet.
    its downloading single record into single cell. How come I overcome this.
    Pls advice. I have given the below code for your reference.
    DATA: T_DATX(300) OCCURS 500 WITH HEADER LINE.
    Modification ECC 6.0 Release Upgrade START *
    DATA: _T(1) TYPE x VALUE '09'.
      DATA: T(1) TYPE C VALUE CLABAP_CHAR_UTILITIES=>VERTICAL_TAB.
    Modification ECC 6.0 Release Upgrade END *
    *data: _t(1) type c value ';'.
      DATA: _REPID LIKE SY-REPID
           ,_COMP  LIKE RSTRUCINFO OCCURS 10 WITH HEADER LINE
           ,_IDX   LIKE SY-TABIX
           ,F_TYPE(1)
      FIELD-SYMBOLS: <FS>.
      _REPID = SY-REPID.
      CALL FUNCTION 'GET_COMPONENT_LIST'
           EXPORTING
                PROGRAM    = _REPID
                FIELDNAME  = TABNAME
           TABLES
                COMPONENTS = _COMP
           EXCEPTIONS
                OTHERS     = 1.
      LOOP AT _COMP.
        CONCATENATE T_DATX _COMP-COMPNAME T INTO TDATX.
      ENDLOOP.
      APPEND T_DATX.
      CLEAR T_DATX.
      LOOP AT T_EX.
        _IDX = 1.
        ASSIGN COMPONENT IDX OF STRUCTURE TEX TO <FS>.
        DO.
          CONCATENATE T_DATX <FS> T INTO TDATX.
          _IDX = _IDX + 1.
          ASSIGN COMPONENT IDX OF STRUCTURE TEX  TO <FS> .
          IF SY-SUBRC <> 0. EXIT. ENDIF.
        ENDDO.
        APPEND T_DATX.
        CLEAR T_DATX.
      ENDLOOP.
    Regards,
    Sujatha

    Hi Sujatha,
    As suggested by previous poster, you should use horizontal tab as a separator (or a comma) to get a tab-delimited/CSV type format that you can open in Excel. However, instead of building the output table yourself as text lines, I'd simply pass the actual output table to function GUI_DOWNLOAD in parameter DATA_TAB, use table FIELD_NAMES for the column headers (looks like you want those based on your coding) and then set the FILE_TYPE parameter to 'DAT'.
    Best wishes, harald

  • Issue with filename in gui_download fn module

    Hi,
    i have an issue with the filename of text file that was dowloaded using gui_download fn module.
    PARAMETERS : p_file TYPE rlgrap-filename.
    CONCATENATE s_laufd-low6(2) s_laufd-low4(2) INTO gv_dt.
    CONCATENATE 'HINL' gv_dt '.001' INTO p_file.
    START-OF-SELECTION.
      DATA: v_file TYPE string.
      v_file = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = v_file
          filetype                = 'ASC'
          append                  = 'X'
        TABLES
          data_tab                = it_tab[]
        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.
    data is downloaded into the textfile with filename as HINL2411 truncating the decimal part.
    How can i get the filename along with the decimal part as HINL2411.001.
    Thanks

    Hi ,
    Declare p_file  as TYPE string

  • How to get some character as a field separator while in GUI_DOWNLOAD ?

    Hi Friends,
    I have to download data from an internal table to a text file. The field separator
    between the fields should be comms (,). So, after getting the data into internal table i'm calling the Function Module GUI_DOWNLOAD. Now using this function module can i insert a comma spearator between the fields, if not what is the other way to do it?

    Hi,
    Its not possible to give the field separator as ',' directly with gui_download from you internal table.
    Below is the example through which you can achieve the following,
    this is a tested program and is working fine on the system....
    so you can use the logic to achieve the following result.... hope this logic helps you to achieve your functionality....
    DATA:
    BEGIN OF fs,
       col1(6) TYPE c,
       col2(4) TYPE c,
       col3 TYPE c,
       END OF fs.
    DATA :
    BEGIN OF line,
    line(255) TYPE c,
    END OF line.
    DATA: itab LIKE TABLE OF fs,
          itab2 LIKE TABLE OF line.
    DEFINE m_tab.
      clear fs.
      fs-col1 = &1.
      fs-col2 = &2.
      fs-col3 = &3.
      append fs to itab.
    END-OF-DEFINITION.
    m_tab '006000' '0010' 'J'.
    m_tab '006000' '0010' 'J'.
    m_tab '006000' '0010' 'M'.
    m_tab '006000' '0010' 'M'.
    m_tab '006000' '0010' 'O'.
    m_tab '006000' '0010' 'O'.
    m_tab '006000' '0010' 'T'.
    m_tab '006000' '0010' 'T'.
    LOOP AT itab INTO fs.
      CONCATENATE fs-col1
                  fs-col2
                  fs-col3
             INTO line
    SEPARATED BY ','.
      APPEND line TO itab2.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        filename                        = 'C:\filename.txt'
    *   FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        data_tab                        = itab2
    *   FIELDNAMES                      =
    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.
      WRITE sy-subrc.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Siddarth

  • Move negative sign (minus) to left side of value in gui_download

    Hi,
    While downloading data using gui_download I want to bring the negative sign to the left side of the value. Is this possible?
    Regrads,
    Madhu

    Hi,
    Use FM
    CALL FUNCTION  'CLOI_PUT_SIGN_IN_FRONT'
    Regards.
    Eshwar.

Maybe you are looking for