Regarding Excel file creation.

Hi experts,
I retrieved the ALV output into an internal Table which is containing Text(1024) as member.
After getting Data I need to pass this data to Excel file.
Excel file should contain exact format of ALV.
Please suggest me..............
Regards,
Subash

hi,
after getting data into EXCEL File and i need to pass this one as attachment to mail. If i use  GUI_DOWNLOAD is saved into presentation server and i need to pick that file from presentation server  and i will send. But this one won't work in BACK Ground. That is the reason after getting data from ALV report into Text Variable and i need to pass this data to excel file, and that excel file as to go an attachemnt to mail,.Everything in Background only.

Similar Messages

  • Excel file creation on application server

    Gurus,
    I have seen a lot of threads on excel file creation in application server, but failed to see if anyone had a solution.
    Problem: In background execution I need to create an excel sheet on application server, the data would be contained in internal table, The FM like WS_DOWNLOAD etc..cannot support these as they have GUI component.
    All the documentation that I have been through states to use dataset which saves the file in.csv or txt format seperated by delimiter, is it possible to save as a true excel file.
    same as this thread:
    Re: Excel download in Application Server
    let me know,
    Thanks in advance .

    * Write column headers, if required
      IF column_headers = 'X'.
    *   ... override field names with LABELS_IN, if specified
        IF NOT labels_in[] IS INITIAL.
          DESCRIBE TABLE labels_in LINES num_lines.
          IF num_lines > num_fields.
            RAISE too_many_labels.
          ELSEIF num_lines < num_fields.
            RAISE too_few_labels.
          ENDIF.
          ASSIGN COMPONENT 1 OF STRUCTURE labels_in TO <f>.
          LOOP AT fields_in.
            READ TABLE labels_in INDEX sy-tabix.
            fields_in-name = labels_in-name.
            MODIFY fields_in.
          ENDLOOP.
        ENDIF.
    *   ...write column headers to file...
        position = 0.
        LOOP AT fields_in.
          IF fixed_length NE space.
    *** INSERT: DAR was here for Issue 17817 --------------- dar012009 ---v
            field_len = STRLEN( fields_in-name ).
    *** INSERT: DAR was here for Issue 17817 --------------- dar012009 ---^
            DO fields_in-len TIMES.
              offset = sy-index - 1.
    *          IF sy-index > 15.                                 dar012009
              IF sy-index > field_len.                          "dar012009
                line_out+position(1) = space.
              ELSEIF fields_in-name+offset(1) NE space.
                line_out+position(1) = fields_in-name+offset(1).
              ELSE.
                line_out+position(1) = space.
              ENDIF.
              position = position + 1.
            ENDDO.
          ELSE.
            CONCATENATE line_out fields_in-name INTO line_out
              SEPARATED BY delimiter.
          ENDIF.
        ENDLOOP.
        IF fixed_length EQ space.
          SHIFT line_out LEFT DELETING LEADING delimiter.
        ENDIF.
        IF no_write IS INITIAL.                                 "dar041505
          TRANSFER line_out TO file_out.
        ENDIF.                                                  "dar041505
        data_out = line_out.  APPEND data_out.                  "dar041505
      ENDIF.
    * Write lines to file...
      LOOP AT data_in.
        CLEAR line_out.
        position = 0.
        DO num_fields TIMES.
          ASSIGN COMPONENT sy-index OF STRUCTURE data_in TO <f>.

  • IBot Issue regarding excel files

    Hello All,
    I am facing an iBot Problem .
    Problem description:
    Application running in Oracle Business Intelligence 11.1.1.6.0
    OBI scheduler server is working fine, so scheduled iBots are being delivered successfully. However, whenever the agent is supposed to send an excel file attached, it results truncated or corrupted. In contrast, the pdf report is delivered correctly. On the other hand, in other all cases, the exports to excel are working fine.
    I restarted the server twice, but I am facing the same error.
    Please suggest any solution.
    Thanks & regards,
    Yessenia

    from html to xls format.
    Try with this
    http://prasadmadhasi.com/2012/08/02/reduce-file-size-by-downloading-a-requestanalysis-to-native-excel-format-directly-instead-of-mhtml-obiee-11-1-1-6-0/
    Pls mark if helps

  • Help Regarding excel file download

    Hi,
    I have developed a object with alv list display aand in the selection screen maintained a checkbox for EXPORT TO EXCEL..
    and for each and every field in the field catlog  wriiten the code like
    IF P_EX = 'X'.
          LS_FIELDCAT-ROW_POS    = '1'.
          LS_FIELDCAT-COL_POS  = 1.
    But this output is not flowing into excel file when executing...can anyone help me how to download the output data into excel file when we execute.because this report runs in the background and after execution data should be flown into excel file.
    Regards,
    Venkat.

    Hi Venkat,
    use this Function module to download the file
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = 'C:\Documents and Settings\sap\Desktop\Hierarchy.xls'
       WRITE_FIELD_SEPARATOR           = '#'
        TABLES
          DATA_TAB                        = gt_target.
    Here gt_target is the internal table which holds the data.
    Hope this solves your purpose...
    Regards
    Sajid

  • Regarding Excel file generation from xml

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Regarding Excel file generation from java

    Hi all,
    I want export my JTable information to an excel when a specified action is occured.
    I already completed this task using some third party api.
    Some body told me, there is api in j2sdk itself for export data to excel file. but i didnt find that.
    Could anybody help me out , if sun java api is providing any api for dealing excel files.

    hi
    i've found this:
    http://jexcelapi.sourceforge.net/
    but i had trouble trying to make it works!
    pratically my textpad, we�hen i import the package, tell me tha the package doesn't exists!
    bye! ;)

  • Regarding Excel file reading

    HI All,
    I am trying to read a EXCEL file from Jakarta POI Excel Api.All works fine.But When the reading file if the cell value is like 74100000000000 I am getting the output like this 7.41E13.Even i formatted the cell to the number,Text etc But no luck

    All right, I'm the first to admit things need to be "dumbed down" for me.
    One of my problems with technology in general is that too often it is assumed one is born with some specialized knowledge.
    When I clicked on the above link, my first thought was, "What does POI stand for?"
    I searched the site for a definition and also "googled" it.
    Nothing.
    My second thought was that it seems another layer of software, which looks just as complex as Java itself, is required to be able to read a spreadsheet. Why is there no package equivalent to java.sql? Is this just another result of the old battle between Sun and Microsoft and the browser wars of the nineties?

  • Regarding jar file creation

    hi friends
    i created jar file using export in eclipse...Successfully created the jar file..but i want to include libarary files also with that jar..for example jdbc connector jar file with that jar..please help
    regards

    [Creating JAR file|http://java.sun.com/docs/books/tutorial/deployment/jar/build.html]

  • Regarding excel file download from webdynpro table element

    Hi All,
            I want steps to do excel download from webdynpro table element.
    Thanks in advance.
    Regards,
    Muneesh Gitta.

    Hi Gitta,
    There are 2 ways in doing it, one is using GUI DOWNLOAD FM or using class clwd_runtime_services.
    DATA:
        node_node_alv                       TYPE REF TO if_wd_context_node,
        elem_node_alv                       TYPE REF TO if_wd_context_element,
        stru_node_alv                       TYPE wd_this->element_node_alv,
        itab_node_alv                       TYPE TABLE OF wd_this->element_node_alv..
    navigate from <CONTEXT> to <NODE_ALV> via lead selection
    @TODO handle not set lead selection
      IF ( node_node_alv IS INITIAL ).
      ENDIF.
    get all declared attributes
      node_node_alv->get_static_attributes_table(
        IMPORTING
          table = itab_node_alv ).
      DATA:
        node_file_download                  TYPE REF TO if_wd_context_node,
        elem_file_download                  TYPE REF TO if_wd_context_element,
        stru_file_download                  TYPE wd_this->element_file_download ,
        item_fname                          LIKE stru_file_download-fname.
      navigate from <CONTEXT> to <FILE_DOWNLOAD> via lead selection
      node_file_download = wd_context->get_child_node( name = wd_this->wdctx_file_download ).
      get element via lead selection
      elem_file_download = node_file_download->get_element(  ).
      get single attribute
      elem_file_download->get_attribute(
        EXPORTING
          name =  `FNAME`
        IMPORTING
          value = item_fname ).
      CALL FUNCTION  'GUI_DOWNLOAD'
        EXPORTING
          filename                        = item_fname
        FILETYPE                        = 'ASC'
        TABLES
          data_tab                        = itab_node_alv.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    OR
    check this blog for
    Re: Export to Excel Sheet functionality

  • Regarding excel file

    Hi,
             my reqirement on excelsheet.one of the condition is that file will be rejected when more than one company code or more than 200 line item per document...the comapny code in the excelsheet is col06,and the line item is col24.how can we write code for this ..?wht am i checking the coding is not working so,send me useful code.it isreally very urgent..
    <b>I repeat per document not per file</b> .
    Thanks In advance

    Hi,
              what i can understand from your question that only you want to write those records which have lt 200 items for the document.
    sort it_datatab by col06.
    itab[] = it_dbtab[].
    loop at it_datatab into wa_datatab.
    at new col06.
    *<or you can use on change of it_dbtab-col06 if col06 is not your first field>
    v_bukrs = wa_datatab-col06. " take the company code into a variable
    clear count.
    endat.
    cnt = cnt + 1 .
    if cnt Gt 200 .
    delete itab where col06 = v_bukrs.
    endif.
    endloop.
    now your itab contains the value which document no have lt 200 line items.
    if it is also not satisfying your requirement then let me know.
    regards

  • How to create a New Excel File programmatically

    Hi !
    I am documenting acquired data continuously in an excel file, what I need to do is to create a new excel file automatically when the size of the previous file exceeds a certain limit lets say 1MB.
    I have tried using the simple 'Create/Open File' function and the 'Write to Spreadsheet File' function to create the new excel file. I does create a file but when I open the file it says the format of the file is not what you have opened it with.
    Also when the new file is created, three new worksheet are to be added programmatically with pre-defined worksheet name and also Column headers for each of the worksheet are to be added.
    I am also using 'Labview Report Generation Toolkit for Office'.
    Regards,
    Reeves
    Solved!
    Go to Solution.

    @ Aldo A
    Thanks for the reference to tutorial, I didn't know about them. They are useful in general but unfortunately they don't answer the problem of creating an altogether new excel file programmatically.
    @ ben64
    The template thing simplifies the issue of formatting the new file. But I am still working on the new excel file creation challenge.
    Let me put my problem in a different way.
    Certain data is being acquired continually and is being written to a certain excel file, when the size of the file exceeds lets say 1MB the program should start saving the data in a NEW FILE instead of the previous file.
    I have attached the VI to explain what I am trying to achieve here.
    Reeves
    Attachments:
    New Microsoft Office Excel Worksheet.zip ‏30 KB

  • Excel File Upload In Webdynpro For ABAP

    Hi All,
    I have a doubt regarding EXCEL file upload for Webdynpro for ABAP.
    I am able to get the path of file using 'FILEUPLOAD' UI element.Now I need to upload the EXCEL file into ALV.I have tried out with GUI_UPLOAD and other excel upload function module.But these Function Module throws Dump.
    Can you please suggest how to go about it.It will be a great help if u can suggest any function module or method.

    Hi Amita,
    Insetad of using GUI_UPLOAD use 'HR_KR_XSTRING_TO_STRING'
    Here is the sample code,
    TYPES :BEGIN OF str_itab,
                  name(10) TYPE c,
                  age(10) TYPE c,
                 END OF str_itab.
    DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
           i_data TYPE STANDARD TABLE OF string,
                   lo_nd_sflight TYPE REF TO if_wd_context_node,
                    lo_el_sflight TYPE REF TO if_wd_context_element,
                    l_string TYPE string,
            fs_table TYPE str_itab,
                    l_xstring TYPE xstring,
    fields TYPE string_table,
    lv_field TYPE string.
    DATA : t_table TYPE if_main=>elements_data_tab,
    data_table TYPE if_main=>elements_data_tab.
      * get single attribute
    wd_context->get_attribute(EXPORTING name =  `DATASOURCE`  
                              IMPORTING value = l_xstring ).
    CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
    in_xstring = l_xstring
    IMPORTING
    out_string = l_string.
    SPLIT l_string  AT
    cl_abap_char_utilities=>newline INTO TABLE i_data.
      * Bind With table Element.
    LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE
    fields.
    READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
    READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    APPEND fs_table TO t_table1.
    ENDLOOP.
    lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_sflight->bind_table( t_table1 ).
      ENDMETHOD.
    if correct give correct answer
    Thanks & Regards,
    Meenachi.R

  • Regarding ALV output  to Excel file download

    Hi all,
    i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the  Excel file that was downloaded.
    Can i know how this can be implemented

    Hi,
    Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
    Regards,
    Sharat

  • Creation of Excel files using XSLT

    Hi frnds,
    From the blog provided by the Michal
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    I came to know that we can create excel files using XSLT mapping but here inthis blog the example provides creation of only one column but I have a scenario where in I want 3 columns ex:Name,Age,***
    Shiva 26 Male
    Ravi   25 Male
    Rani   24 Female
    but using the code provided in Michal blog Im getting the output as
    Shiva
    26
    Male
    Ravi
    25
    Male
    Rani
    24
    Female
    Can anyone help me in modifying the code given in Michal blog to get the output as required.
    Please share your ideas or suggestion onthis...
    Thanks in advance,
    Shiva.

    Please change the code as
    <xsl:template match="file_SDN/recordset/data/*">
    <Row>
    <Cell>
    <Name ss:Type="String">
    <xsl:apply-templates/>
    </Name>
    <Age ss:Type="Integer">
    <xsl:apply-templates/>
    </Age>
    <*** ss:Type="String">
    <xsl:apply-templates/>
    </***>
    </Cell>
    </Row>          
    </xsl:template>

  • Regarding ME2L - Download output to Excel File

    Hi Friends,
    In ME2L, I have requirement to download the Purchasing Documents Per Vendor Report Output to a Excel File.
    Could be helpful is there any UserExit or Enhancement point to modified or Can let me know how to do this.
    Regards,
    sg.

    Hi,
    Go to me2l tcode.....then change the "Scope of List" into "ALV".....and execute it.....now on the tool bar...click on "LOCAL FILE"....now select the radio button "Spreadsheet".....and perform your work..
    Arunima

Maybe you are looking for

  • I have pages, numbers and keynote on my macbook pro, but when i try to use the apps on my new iMac it will not let me save

    I purchased Pages, Numbers and Keynote for my MacBook Pro and iPad last year.  I just purchased a new iMac for my wife and it came with iWorks.  When I try to save a document on the iMac it tells me I must buy an iWorks serial number, but the App Sto

  • SELECT * FROM table WHERE id NOT IN?  Help with statement.

    Hi, Two tables. Orders (orderID = PK) and Paid Orders (orderID = FK) I want to display a recordset of orders from the Orders table where the order ID doesn't appear in the Paid Orders table. I have tried something like this: SELECT * FROM dbo.tblOrde

  • Two event handler

    I am using two event handler     CLASS-METHODS:         handle_data_changed_finished             FOR EVENT data_changed_finished OF cl_gui_alv_grid                 IMPORTING e_modified                           et_good_cells.     CLASS-METHODS: catch

  • Price zero in material master:MM01

    When I create a material , system is asking moving avg price, std price (Accounting 1 view). It is mandatory. In some cases I want to maintain price as zero which system is not allowing. How to make system to accept proce as zero for a material.

  • Apple iPhone 4S locked after Upgrade to iOS 7: How can i fix this?

    My Sister got an iPhone with iOS 6 and wanted to upgrade it to iOS 7.  We tried it via iTunes through the USB cable but something went wrong. I think iOS 7 downloaded correctly but, When the phone started up it had the message on the screen and the s