Webi and Excel sheet universe

Hi gurus,
I created an universe based on Ms Excel sheet.
I have created a webi report , but when iI run the report, it does not work ==> DataBase eroor : [Microsoft][ODBC driver manager] Data source name does not found and no default driver specified. (WIW 10901)
However, this data source name exist , I cretaed it via odbc.
So i don't understand the matter. Am I missing some settings ?
Thanks for your help

Hi Firmin
Are you able to browse the data from Universe Designer?
Suggest you to try the below:
1. Open the Excel spreadsheet
2. Select all the data values, make sure the remaining blank cells donu2019t get selected
3. Click on Insert>>Name>>Define to give a name to the table
4. Save the Excel
5. Go to Start>>Control Panel>>Administrative tools>Data Sources(ODBC)
6. Select System DSN>>Add>>Microsoft excel Driver(*.xls)
7. Give a new data source name and click on Select workbook and point the saved excel sheet and 8. click on OK
Note: Make sure the parameter <Parameter Name="Transactional Available">No</Parameter> is set to Yes under the Generic ODBC datasource in below location
C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\dataAccess\connectionServer\odbc\odbc.sbo
1. Create a new connection in Universe designer by using the Generic ODBC connection
2. Create a new universe and insert the table which we have defined in the Excel sheet.
3. Save and export this universe to the repository.
4.Now create a webi report based on this Universe.
Hope this helps!!
Regards
Sourashree

Similar Messages

  • SSRS/Powerview to compare SQL table and excel sheet

    I have a SQL table and an excel sheet with some data...
    I want to be able to compare the two and find out which Excel rows are missing in the SQL table...
    Would it be easier to do this report in SSRS or would it be better to do it in Excel PowerView?
    If so how do I go about it?
    Thanks in advance for your help...
    Dhananjay Rele

    Hi Dhananjay,
    According to your description, you want to compare the data of a SQL table and an excel sheet. To achieve this goal, we can create two tables in Reporting Services report, one for SQL table with SQL Server connection type, another for excel sheet with ODBC
    connection type.
    For more details about how to create the report, please see the following steps:
    Create a report server project with SQL Server Data Tools (SSDT) Business Intelligence Templates list.
    Create a new report definition file in Solution Explorer.
    Create a Data Source named DataSource1 with Microsoft SQL Server Type, then select the SQL table database from the corresponding server.
    Create a Data Source named DataSource2 with ODBC Type, then select the excel file.
    Create two datasets which returns the SQL data and Excel sheet data based on the two data source, one for DataSource1, another for DataSource2.
    Create two table next to each other based on the datasets on the design surface.
    References:
    Create a Basic Table Report (SSRS Tutorial)
    Create SSRS report using Excel Data Source Step by Step
    If there are any other questions, please feel free to ask.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • CR2008 , WebI and Excel 2010

    Hi There
    I have CR2008 SP1 and Excel 2010, when I tried to export CR report to excel, I got the error and the program will be terminated,  if I select "constant column width( in points)", the report can be exported to excel, but if I select the default setting "column width based on the objects in the whole report", it will give me the error
    The instruction at "0xff168b1c" referenced memory at "0xff168b1c". The memory could not be "read", click on OK to terminated the program, then second error will show up
    The exception unknown software exception (0xc0150010) occured in the application at location 0x7c94487f. Click on Ok to terminated the program...
    also I have BO XI 3.1 SP3, when I tried to export my WebI report to excel, it does not use Excel 2010 feature(support over 65536 rows), it will split the report with over 65536 rows into two sheets like with Excel 2003
    does anyone know how to fix these two issues?
    thanks

    Hello,
    Excel 2010 is not supported in CR 2008. It is in the next version of CR 2011.
    No option to not get sheets for more than 65k rows, limitation of Excel.
    Install CR 2008 SP 3, requires an uninstall first. Be sure to have your CR keycode available.
    https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip
    As for WEBI, post your question to the [WEBI forum|SAP BusinessObjects Web Intelligence;
    Thank you
    Don

  • Embedding Macros in the BEx web exported excel sheet

    Hi all Advanced reporting gurus,
    I have to embed a macro in the excel sheet, when the user clicks the button Export to excel sheet in the BEx web. This needs to be generic, it means every BEx web user should be able to avail this macro. Can any one suggest me the methods to do so ?? Its really urgent and ur quick response is awaited....
    Thanking you in advance,
    Bret

    Hi Heike,
    Thanks for your help. I searched the office XML documents and one the help file specifys this tag
    IntlMacro Element (Microsoft Excel)
    Specifies whether a worksheet is an international macro sheet.
    Contained In
    WorksheetOptions
    Remarks
    If <x:IntlMacro/> is specified, the worksheet is an international macro sheet.
    so I guess, if Office XML standards are used in BW then this tag also shld work. I read few topics on SAP ABAP class files such as ZCL_RSR_XLS_HELP_WINDOW_PRINT and it has one the method to trigger rendering of data. Can I use this class and method to send the tag values so that macro is also embedded while sending data ????
    your thought are highly awaited,
    thanks
    D Bret

  • Alv and excel sheet out put.

    hi friends,
    now i am working on sales and purchase order report. For this i have created three radio button on selection screen one for sales 2nd for purchase and 3rd for both. when i click sales radio button it is going to display only sales data in ALV out put list as well as in EXCEL sheet.
    problem:-
    Some layout fileds (out put fields) i am storing in VARIENT and when i have passed this VARIANT in a SELECTION-SCREEN so here the output is ok for me, and i am unable to display these same fields in EXCEL sheet for this Please could u tell that how we do this. please send the logic for this.
    thands and regards.
    sagi.

    Hi Amol,
    you are not getting me ...
    see your itab will have all the fields irrespective of variant used. so you can directly use itab to download.
    i guess you are using alv tool bar option to download.
    but i am telling to use your own button to download the report using your own button with GUI_DOWNLOAD Fm.
    for this you pass your ITAB and and then give the file name then this will save all the fields to excel file.
    Regards
    vijay

  • Changes in the Dimensions not reflected in the Current View and Excel Sheet

    Hi Experts,
    We're using BPC MS Platform Version 7.0.112 and we're having problems. When we make changes in the dimension members like adding members or making changes in the hierarchy or groupings, it takes time for the changes to reflect in current view or in the excel sheet. After full processing of the dimension we can see the changes we've made when we reopen the dimension member but when we try to use the member we've added in the template, it's not yet in the current view. I've already tried, full processing of all the dimensions, processing application and reassigning aql index, refresh dimension members and yet the changes we've made doesnt appear in the current view. And what's odd is that sometimes the changes we've made would appear after a day or two or nothing at all.
    What could be possibly causing this issue?
    Thanks,
    Marvin

    Hi Dzmitry,
    Thanks for your response, I'm just wondering whats causing this? We never had this issue on older versions of BPC though, so it would really help if we would know the cause of this. Basicaly when do changes in a dimension, after processing (Full Process, System Offline and Process through member sheet), we just had to set the AppSet status to available and refresh the dimension members in Excel and all the changes would already be visible.
    Thanks,
    Marvin

  • Java and Excel sheet (hssf poi) creating back up  please help!!

    Dear friends , i have a problem i saved some data into some excel file using HSSF POI . after raeching some lines say a maximum of 1000 lines ) i have to save the EXCEL sheet as backupfile with the extention .bak and then delete the original Excel file . did any body have some idea about this . i know you guyz are gurus so please give some advise
    thanks in advance
    cheers
    harsha

    you would actually have a counter to count the number of rows you inserted into the spreadsheet..once counter hits 1000, just save it as .bak extension?

  • How to run save for web and contact sheets at the same time

    Hi
    my question is simple and a means to save time-
    Lets suppose I have 3 camera images and I want to run either save for web applications on 2 cameras at the same time, how/can i do that to save time or lets say contact sheet action on 1 and save for web on the other to save time or photoshop files and this runs in the background?
    would really help save me time.

    Even if you could run the three process in the background at the same time I do not think the duration of the total execution time would be any shorter. You would still be executing the same number of processor instruction reading and writing the same number of files. If the whole processor was constrained by the processing power running them cuncurrenly may increase the processing time because of contention for the processor. If the processes are IO bound that will not change a overlaping the processes may cause more hard disk seaking because of contention of the hard disk arm.

  • How to read only particualr columns from excel sheet to internal table

    Hi,
    I have and excel sheet which has around 20 columns, in which i want to read only 6 columns. They are at different column positions, means the 1st column, 6thcolumn, 8th column so on..
    Can we do this in sap? do we have any FM to do this?
    Thanks.
    Praveena.

    hi,
    Use the below logic to fetch the data into internal table..You need to read the data cell by cell and update the internal table,
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO <fs_source> .
           MOVE i_data-value TO <fs_source> .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF .

  • Do Web Intelligence Support Linked Universes in BO XI 3.1 sp3

    Hi Folks!
    I know WebI in XIR2 doesnt support Linked Universes. So we used to build reports in Deski as we need to generate reports on liniked universe.(one core and three derived) now we are upgrading the version to Xi3.1 Sp3 and i am curious to know whether XIr 3.1 WebI support linked universes.
    Thanks in Advance
    Regards
    Aditya!

    Hi Aditya,
    Yes, I used Web Intelligence (never actually used Deski in my life!) I am surprised to hear that XIR2 Webi reports did not work with linked universes. I remember reading several long forum entries regarding linked universes and the pros and cons. And I am pretty sure they were back 2-3 years ago.
    But maybe they were using Deski.
    We have a main Universe that we have been using for a couple of years that we have typically just added to when required. Then we were confronted with having to add data from a new department, which was not very easily related to the existing data. So we have been considering linked Universes. We still have not decided which way to go.
    I built a new Universe based on this department's data, and then linked it to a test copy of our original main Universe. Then I took an existing complex report in Webi and changed the Universe to the new linked Universes. Then I had to remap the data (it makes you do this automatically) and do some other adjustments, but it all worked fine.
    Funny thing is, once I got it working, I did a "save as" on the universe, knowing I needed a backup in case something went wrong, and when I tried to switch back between InfoView and Rich Client, it got all messed up! I spent another few weeks trying to figure that out. But that was not related directly to the linked Universe. I can refer you to messages about that.
    So, my point is, yes, linked Universes do work with Webi in 3.1. Have I done thorough testing? No. But I have taken one rather complex report and migrated it to a linked Universe in Webi, and it works.

  • Excel sheet attached mail when opened shows a error message

    hi all,
        i have created a report for sending the output to the sap inbox as excel attachment . my problem is ;it always shows an error message when ever the attachment is opened.
        I have used the function 'SO_NEW_DOCUMENT_ATT_SEND_API1' and in the table parameters,   TABLES
                                   packing_list   =
    passing the .XLS format and excel sheet name.
       please provide me a solution to stop the display of this error message having the contents 'this file is not in a recognizable format'.
    thanks and regards\
    Thomas
    Coding :
    FORM sub_output_timeadm  USING lv_usrid TYPE gty_timhours-usrid.
      DATA : lv_emp1(10) TYPE c,
            lv_ename(40) TYPE c,
              lv_hour(10) ,
              lv_lgart(15),
              lv_scc(10),
              lv_rcc(10),
              lv_order(15),
              lv_ordtext(40),
              lv_act(10).
      DATA : lwa_content TYPE solisti1.
      DATA : lit_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,"#EC *
             lit_objbin  LIKE solisti1   OCCURS 0 WITH HEADER LINE,
             lit_objtxt  LIKE solisti1   OCCURS 2 WITH HEADER LINE,
             lit_reclist LIKE somlreci1  OCCURS 2 WITH HEADER LINE,
             lwa_docdat  LIKE sodocchgi1 OCCURS 1 WITH HEADER LINE,
             lv_tab_lines LIKE sy-tabix.
      DATA : lv_file LIKE rlgrap-filename,
             lv_line LIKE solisti1-line,
             lv_vt TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
      DATA : lwa_receivers   TYPE somlreci1 .
    *Object text details
      PERFORM sub_objtxt_data TABLES lit_objtxt
                                     lit_objpack
                              USING  lv_tab_lines.
    *Document data details
      PERFORM sub_document_data TABLES lwa_docdat
                                       lit_objtxt
                                USING  lv_file
                                       lv_tab_lines.
      PERFORM sub_topofpage TABLES lit_objbin
                            USING  lv_line
                                   lv_vt.
      PERFORM sub_fill_columnhead TABLES lit_objbin.
      LOOP AT git_content INTO lwa_content.
        lv_emp1 = lwa_content+2(10).
        CONDENSE lv_emp1.
        lv_ename = lwa_content+15(40).
        SHIFT lv_ename LEFT.
    *    CONDENSE lv_ename.
        IF lv_ename+0(7) = text-024.
          WRITE lv_ename TO lv_ename RIGHT-JUSTIFIED.
        ELSE.
          CONDENSE lv_ename.
        ENDIF.
        lv_hour = lwa_content+58(10).
        CONDENSE lv_hour.
        lv_lgart = lwa_content+70(15).
        CONDENSE lv_lgart.
        lv_scc = lwa_content+90(10).
        CONDENSE lv_scc.
        lv_rcc = lwa_content+103(10).
        CONDENSE lv_rcc.
        lv_order = lwa_content+115(15).
        CONDENSE lv_order.
        lv_ordtext = lwa_content+132(40).
        CONDENSE lv_ordtext.
        lv_act = lwa_content+174(10).
        CONDENSE lv_act.
        CONCATENATE lv_emp1
                    lv_ename
                    lv_hour
                    lv_lgart
                    lv_scc
                    lv_rcc
                    lv_order
                    lv_ordtext
                    lv_act INTO lv_line SEPARATED BY lv_vt.
        CONCATENATE gc_add lv_line lv_vt INTO lv_line.
        APPEND lv_line TO lit_objbin.
        CLEAR :lv_emp1,
                   lv_ename,
                   lv_hour,
                   lv_lgart,
                   lv_scc,
                   lv_rcc,
                   lv_order,
                   lv_ordtext,
                   lv_act ,lv_line,lwa_content.
      ENDLOOP.
      DESCRIBE TABLE lit_objbin LINES lv_tab_lines.
      lv_tab_lines = lv_tab_lines + 1.
    *  Object pack details
      PERFORM sub_objpack_data TABLES lit_objbin
                                      lit_objpack
                               USING  lv_tab_lines
                                      lv_file.
    *Receiver list details
      PERFORM sub_reclist_timeadm TABLES lit_reclist
                                  USING lv_usrid.
      READ TABLE lit_reclist INDEX 1.
      IF sy-subrc  = 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = lwa_docdat
            put_in_outbox              = gc_x
            commit_work                = gc_x
          TABLES
            packing_list               = lit_objpack
            contents_bin               = lit_objbin
            contents_txt               = lit_objtxt
            receivers                  = lit_reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
        CASE sy-subrc.
    *    WHEN 0.
    *      MESSAGE i014.
    *    WHEN 1.
    *      MESSAGE i016.
    *    WHEN 2.
    *      MESSAGE i016.
    *    WHEN 4.
    *      MESSAGE i015.
    *    WHEN OTHERS.
    *      MESSAGE i017.
        ENDCASE.
      ENDIF.
      REFRESH git_content.
      CLEAR gwa_content.
    FORM sub_objtxt_data TABLES xt_objtxt STRUCTURE solisti1
                                xt_objpack STRUCTURE sopcklsti1
                         USING  xv_tab_lines .
      DATA : lv_zdat(10)  TYPE c,
             lv_zdat2(10) TYPE c.
      CONSTANTS: lc_hiphen(1) TYPE c VALUE '-'.
    *  write sy-datum to lv_zdat mm/dd/yyyy.
    *  concatenate text-022 lv_zdat into xt_objtxt separated by space.
    *  APPEND xt_objtxt.clear xt_objtxt.
      WRITE pnpbegda TO lv_zdat  MM/DD/YYYY.
      WRITE pnpendda TO lv_zdat2 MM/DD/YYYY.
      CONCATENATE text-080
                  lv_zdat
                  lc_hiphen
                  lv_zdat2   INTO xt_objtxt SEPARATED BY space.
      APPEND xt_objtxt.CLEAR xt_objtxt.
      xt_objtxt = text-067.
      APPEND xt_objtxt.CLEAR xt_objtxt.
      CLEAR: lv_zdat,
             lv_zdat2.
      DESCRIBE TABLE xt_objtxt LINES xv_tab_lines.
      READ TABLE xt_objtxt INDEX xv_tab_lines.
      CLEAR xt_objpack-transf_bin.
      xt_objpack-head_start = 1.
      xt_objpack-head_num   = 0.
      xt_objpack-body_start = 1.
      xt_objpack-body_num   = xv_tab_lines.
      xt_objpack-doc_type   = gc_raw.
      APPEND xt_objpack.
      CLEAR xt_objpack.
    ENDFORM.                    " sub_objtxt_data
    *&      Form  sub_document_data
    *To fix the size of the document
    *      -->XT_DOCDAT
    *      -->XT_OBJTXT
    *      -->XV_LV_FILE
    *      -->XV_TAB_LINES
    FORM sub_document_data TABLES xt_docdat STRUCTURE sodocchgi1
                                  xt_objtxt STRUCTURE solisti1
                           USING  xv_lv_file
                                  xv_tab_lines.                 "#EC *
      DATA : lv_subject     TYPE string,
             lv_open        TYPE c VALUE '(',
             lv_close       TYPE c VALUE ')',
             lv_slash       TYPE c VALUE '/'.
      xt_docdat-obj_name = xv_lv_file.
      CONCATENATE lv_open sy-sysid
                  lv_slash sy-mandt lv_close INTO lv_subject.
      xt_docdat-obj_descr = lv_subject.
      xt_docdat-doc_size
          = ( xv_tab_lines - 1 ) * 255 + STRLEN( xt_objtxt ).
    ENDFORM.                    " sub_document_data
    *&      Form  sub_topofpage
    *       text
    *      -->P_LIT_OBJBIN  text
    FORM sub_topofpage TABLES xt_objbin STRUCTURE solisti1
                       USING  xv_lv_line
                              xv_vt.
      DATA: lwa_line TYPE slis_listheader.
      LOOP AT git_header INTO lwa_line.
        CONCATENATE lwa_line-key lwa_line-info
                    INTO xv_lv_line SEPARATED BY xv_vt.
        CONCATENATE gc_add xv_lv_line xv_vt
                    xv_vt     "TAB space
                    xv_vt
                    xv_vt
                    xv_vt
                    xv_vt
                    xv_vt
    *                xv_vt
    *                xv_vt
    *                xv_vt
    *                xv_vt
    *                xv_vt
    *                xv_vt
    *                xv_vt
                    INTO xv_lv_line.
        APPEND xv_lv_line TO xt_objbin.
      ENDLOOP.
    ENDFORM.                    " sub_topofpage
    *&      Form  sub_fill_columnhead
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_fill_columnhead TABLES xt_objbin STRUCTURE solisti1.
      DATA:  lv_line LIKE solisti1-line,
             lv_vt TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
             lv_zdat(10).
      DATA : lv_line1(40),
             lv_line2(10),
             lv_line3(10),
             lv_line4(3),
             lv_line5(40).
      lv_line1 = text-008.
      WRITE sy-datum TO lv_zdat MM/DD/YYYY.
      lv_line2 = lv_zdat.
      CONCATENATE lv_vt
                  lv_line1
                  lv_vt
                  lv_vt
                  lv_line2
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
    *              lv_vt
             INTO lv_line.
      CONCATENATE gc_add lv_line lv_vt INTO lv_line.
      APPEND lv_line TO xt_objbin.
      CLEAR : lv_line, lv_line1, lv_line2, lv_zdat.
      lv_line1 = text-009.
      lv_line2 = text-010.
      WRITE pnpbegda TO lv_zdat MM/DD/YYYY.
      lv_line3 = lv_zdat.
      CLEAR lv_zdat.
      lv_line4 = ' - '.
      WRITE pnpendda TO lv_zdat MM/DD/YYYY.
      lv_line5 = lv_zdat.
      CONCATENATE lv_vt
                  lv_line1
                  lv_vt
                  lv_vt
                  lv_line2
                  lv_vt
                  lv_line3
                  lv_line4
                  lv_line5
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
             INTO lv_line.
      CONCATENATE gc_add lv_line lv_vt INTO lv_line.
      APPEND lv_line TO xt_objbin.
      CLEAR : lv_line, lv_line1,
              lv_line2,lv_line3,
              lv_line4, lv_line5, lv_zdat.
      CONCATENATE lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
                  lv_vt
             INTO lv_line.
      CONCATENATE gc_add lv_line lv_vt INTO lv_line.
      APPEND lv_line TO xt_objbin.
      CLEAR lv_line.
      CONCATENATE text-013
                  text-014
                  text-015
                  text-016
                  text-017
                  text-018
                  text-019
                  text-026
                  text-020
             INTO lv_line
        SEPARATED BY lv_vt.
      CONCATENATE gc_add lv_line
                  lv_vt         "TAB space
                  INTO lv_line.
      APPEND lv_line TO xt_objbin.
    ENDFORM.                    " sub_fill_columnhead
    *&      Form  sub_objpack_data
    *To fix the actual document size
    *      -->XT_OBJBIN
    *      -->XT_OBJPACK
    *      -->XV_TAB_LINES
    *      -->XV_LV_FILE
    FORM sub_objpack_data  TABLES  xt_objbin STRUCTURE solisti1
                                   xt_objpack STRUCTURE sopcklsti1
                            USING  xv_tab_lines
                                   xv_lv_file.                  "#EC *
      DATA : lwa_objpack TYPE sopcklsti1.
      lwa_objpack-transf_bin = gc_x.
      lwa_objpack-head_start = 1.
      lwa_objpack-head_num   = 0.
      lwa_objpack-body_start = 1.
      lwa_objpack-body_num   = xv_tab_lines.
      lwa_objpack-doc_type   = gc_xls.
      lwa_objpack-obj_name   = xv_lv_file.
      lwa_objpack-obj_descr = gc_descr.
      lwa_objpack-doc_size
                = ( xv_tab_lines - 1 ) * 255 + STRLEN( xt_objbin ).
      APPEND lwa_objpack TO xt_objpack.
      CLEAR lwa_objpack.
    ENDFORM.                    " sub_objpack_data
    *&      Form  sub_reclist_timeadm
    *       text
    *      -->P_LIT_RECLIST  text
    *      -->P_LV_USRID  text
    FORM sub_reclist_timeadm  TABLES xt_reclist STRUCTURE somlreci1
                              USING  lp_usrid TYPE gty_timhours-usrid."#EC *
    *local constant
      CONSTANTS :      lc_b TYPE   c VALUE 'B'.
    *local workarea.
      DATA : lwa_receivers   TYPE somlreci1 ,
             lwa_usrid       TYPE gty_usrid ,
             lwa_docdata     TYPE sodocchgi1.
      REFRESH : git_receivers.":, LIT_DOCDATA .
      CLEAR : lwa_receivers,lwa_docdata.
      IF p_timadm EQ 'X'.
        MOVE: lp_usrid TO lwa_receivers-receiver,
              text-002   TO  lwa_receivers-express,
              lc_b       TO lwa_receivers-rec_type.
        APPEND lwa_receivers TO xt_reclist.
      ELSEIF p_manger EQ 'X'.
        READ TABLE git_usrid INTO lwa_usrid WITH KEY pernr = gwa_emphours-magpernr
                                                    usrty = '0001' BINARY SEARCH.
        IF sy-subrc EQ 0.
          MOVE: lwa_usrid-usrid TO lwa_receivers-receiver,
                  text-002       TO  lwa_receivers-express,
                  lc_b       TO lwa_receivers-rec_type.
          APPEND lwa_receivers TO xt_reclist.
        ENDIF.
        CLEAR : lwa_usrid .
      ENDIF.

    Hi Tona,
                  Please go through the code and cross check....
              REPORT zcyborg_5 NO STANDARD PAGE HEADING.
    TABLES : eket.
    DATA : p_date TYPE d.
    DATA : w_lines TYPE sy-tabix.
    TYPES : BEGIN OF types_eket,
                ebeln TYPE eket-ebeln,
                ebelp TYPE eket-ebelp,
                eindt TYPE eket-eindt,
            END OF types_eket.
    DATA : t_eket TYPE STANDARD TABLE OF types_eket.
    Declaration for ALV display *********************
    DATA : w_grid TYPE REF TO cl_gui_alv_grid,
           w_custom_container TYPE REF TO cl_gui_custom_container.
    RANGES : r_eindt FOR eket-eindt.
    FIELD-SYMBOLS: <fs_eket> TYPE types_eket.
    INITIALIZATION.
      CALL FUNCTION 'CALCULATE_DATE'
           EXPORTING
                days        = '60-'
                months      = '0'
                start_date  = sy-datum
           IMPORTING
                result_date = p_date.
      r_eindt-low     = p_date.
      r_eindt-high    = sy-datum.
      r_eindt-sign    = 'I'.
      r_eindt-option  = 'BT'.
      APPEND r_eindt.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM disp_data.
      PERFORM email_data.
    perform disp_alv.
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      SELECT ebeln
             ebelp
             eindt
             FROM eket
             INTO TABLE t_eket
             WHERE eindt IN r_eindt.
    ENDFORM.                    " get_data
    *&      Form  disp_data
          text
    -->  p1        text
    <--  p2        text
    FORM disp_data.
      DESCRIBE TABLE t_eket LINES w_lines.
      WRITE :/5 'No of rows : ', w_lines.
      WRITE :/5 'EBELN', 30 'EBELP', 50 'EINDT'.
      SORT t_eket DESCENDING BY  eindt.
      LOOP AT t_eket ASSIGNING <fs_eket>.
        AT NEW ebeln.
          ULINE.
        ENDAT.
        WRITE : /5 <fs_eket>-ebeln, 30 <fs_eket>-ebelp, 50 <fs_eket>-eindt.
      ENDLOOP.
    ENDFORM.                    " disp_data
    call function 'SEND_TABLE_TO_EXCEL'
       exporting
         structure_name       = 'EKET'
       tables
         exceltab             = t_eket
    FORM email_data.
    *Structures and internal table used to send data vai mail
      DATA : objpack     LIKE sopcklsti1 OCCURS 2  WITH HEADER LINE,
             objhead     LIKE solisti1   OCCURS 1  WITH HEADER LINE,
             objbin      LIKE solisti1   OCCURS 0  WITH HEADER LINE,
             objtxt      LIKE solisti1   OCCURS 10 WITH HEADER LINE,
             reclist     LIKE somlreci1  OCCURS 5  WITH HEADER LINE,
             tab_lines LIKE sy-tabix,
             doc_chng LIKE sodocchgi1.
    DATA  : it_attach  TYPE STANDARD TABLE OF solisti1,
             w_attach   TYPE solisti1.
      CONSTANTS : c_car TYPE x VALUE '0D',
                  c_tab TYPE x VALUE '09'.
      CONCATENATE 'EBELN'
                   c_tab
                  'EBELP'
                   c_tab
                  'EINDT'
                  c_car INTO w_attach.
      APPEND w_attach TO it_attach.
      LOOP AT t_eket INTO <fs_eket>.
         CONCATENATE <fs_eket>-ebeln
                     c_tab
                     <fs_eket>-ebelp
                     c_tab
                     <fs_eket>-eindt
                     c_car INTO w_attach.
         APPEND w_attach TO it_attach.
      ENDLOOP.
      MOVE it_attach[] TO objbin[].
    *assign a name to the email document
      doc_chng-obj_name  = 'Output'.
      doc_chng-obj_descr = 'Old Scheduling lines'."gives the subject line
      objtxt-line = 'Regards'.
      APPEND objtxt.
      objtxt-line = 'Shivaji'.
      APPEND objtxt.
    *determine the size of the body of the email
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ TABLE objtxt INDEX tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    *fill the fields of the packing list for the body of the email
    *doc needs no header
      objpack-head_start = 1.
      objpack-head_num   = 0.
    *but it has a body
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'RAW'.
      APPEND objpack.
    *************fill the fields for packing list ***
         for attachment        ********
      DESCRIBE TABLE objbin LINES tab_lines.
    *************if it has no header ****************
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 1.
    *************if it has a body ********
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'XLS'.
      objpack-obj_name   = 'Attachement'.
      objpack-obj_descr  = 'file'.
      objpack-doc_size   =  tab_lines * 255.
      APPEND objpack.
    ************fill the mail recipient list*******
      reclist-receiver = sy-uname.
    **rec_type 'B' indicates sap user ,rec_type 'U' indicates internet user
      reclist-rec_type = 'B'.
      reclist-express  = 'X'.
      APPEND reclist.
    Function Module to send the data as an excel attachement ****
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = doc_chng
          put_in_outbox                    = 'X'
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = objpack
      OBJECT_HEADER                    =
          contents_bin                     = objbin
          contents_txt                     = objtxt
      CONTENTS_HEX                     =
      OBJECT_PARA                      =
      OBJECT_PARB                      =
          receivers                        = reclist
       EXCEPTIONS
         too_many_receivers               = 1
         document_not_sent                = 2
         document_type_not_exist          = 3
         operation_no_authorization       = 4
         parameter_error                  = 5
         x_error                          = 6
         enqueue_error                    = 7
         OTHERS                           = 8
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.

  • Upload the the ABAP output in Excel sheet

    Hi Frds
    i want this ABAP report output in display and excel sheet.i got output in display but im not geting in Excel sheet.Kindly tell me how to do the coding for geting in Excel for this report.
    *& Report  Z_CONS_STOCK_ROL5                                           *
    REPORT  Z_CONS_STOCK_ROL5                       .
    data : Mat_no like mara-matnr,
           Plant1 like ekpo-werks,
           com_co like mseg-bukrs,
           store  like mseg-lgort.
    SELECTION-SCREEN: BEGIN OF BLOCK 01.
    SELECTION-SCREEN: BEGIN OF BLOCK 02 WITH FRAME TITLE text-001.
    SELECT-OPTIONS MATERIAL FOR mat_no.
    SELECT-OPTIONS Plant    FOR plant1.
    SELECT-OPTIONS COMPANY  FOR COM_CO.
    SELECT-OPTIONS STROAGE  FOR STORE.
    SELECTION-SCREEN: END OF BLOCK 02.
    SELECTION-SCREEN: END OF BLOCK 01.
    Data : begin of itab occurs 0,
           matnr like mara-matnr,
           maktx like makt-maktx,
           meins like mara-meins,
           minbe like marc-minbe,
           lgnum like mseg-lgnum,
           ebeln like ekpo-ebeln,
           menge like ekpo-menge,
           banfn like eban-banfn,
           meng1 like eban-menge,
           mblnr like mseg-mblnr,
           end of itab.
    select a~ebeln
           a~menge
           a~werks
           b~banfn
           b~menge
           c~matnr
           c~meins
           d~maktx
           e~minbe
           f~lgnum
           f~mblnr
           f~bukrs
           f~lgort
    INTO CORRESPONDING FIELDS OF TABLE ITAB FROM EKPO as a
          inner join EBAN as b on aBANFN = bBANFN
          inner join MARA as c on cMATNR = aMATNR
          inner join MAKT as d on dMATNR = cMATNR
          inner join MARC as e on eMATNR = cMATNR
          inner join MSEG as f on fMATNR = cMATNR
          where cmatnr in MATERIAL and awerks in PLANT and f~bukrs in
    COMPANY and f~lgort in STROAGE.
    if itab-mblnr = ' '.
    loop at itab.
    write : / itab-matnr, itab-maktx, itab-meins, itab-minbe, itab-lgnum,
    itab-ebeln, itab-menge, itab-banfn, itab-menge.
    endloop.
    endif.
    Thank You
    Pari Vendhan.R

    check the below FM's to downlaod into excel sheet are :
    1) CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    filename = 'C:\output.xls'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    2.Use the following FM:
    RH_START_EXCEL_WITH_DATA starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user!
    DOWNLOAD is obsolete..so check,
    function module SAP_CONVERT_TO_XLS_FORMAT .
    Check also this weblog /people/thomas.jung3/blog/2005/02/14/bsp-and-microsoft-excel--learning-to-live-together
    look at demo program SAPRDEMO_TABLES_IN_EXCEL,
    Edited by: Mahalakshmi Padmanaban on Feb 17, 2008 7:54 AM

  • Create a visual web part which get data from excel sheet and import it into sql server database in sharepoint 2010 (development)

    Hi,
    I want to create a visual webpart which will read data from excel sheet and import it in to sql server database.(using sharepoint development)
    I want to do it using visual webpart.
    Please help to solve the issue.
    Thanks in advance!
    Regards
    Rajni

    Hi  Rajni,
    Microsoft.Office.Interop.Excel assembly provides class to read excel file data, in your web part solution, reference the assembly, and following blog contains samples about how to read the excel file data,
    and import it to SQL  database.
    1.Create a Visual Web Part Project:Create
    Visual Web Parts in SharePoint 2010
    2.Read the excel workbook by using SPFile class:
    http://alancejacob.blogspot.in/2012/06/read-data-from-excel-file-and-insert-in.html
    http://stackoverflow.com/questions/14496608/read-excel-file-stored-in-sharepoint-document-library
    3.Export the excel workbook to SQL Server:
    http://www.c-sharpcorner.com/UploadFile/99bb20/import-excel-data-to-sql-server-in-Asp-Net/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to connect to excel sheet and create a universe on top of that

    hi,
    can any tell me how to connect to excel sheet and create a universe on top of that.what connection should i keep.

    Hi Vishal,
    Here is how you can create a universe from an excel file:
    Here are the steps to follow:
    1. Launch Designer, select the Quick Design Wizard if not already open, and click "Begin".
    2. Type in a universe name then click "New".
    3. Select the Network layer "ODBC Drivers" and then click OK.
    4. In the ODBC Drivers window, select the "Login" tab and then type in a name for this connection.
    5. Select "Generic ODBC data source" from the drop-down list for database engine.
    6. Click the "ODBC Admin" button to define data source name.
    7. In the ODBC Data Source Administrator window, click Add.
    8. Select "Microsoft Excel Drivers" and click Finish.
    9. Enter a data source name.
    10. Click "Workbook", select the file you want to access, and click OK.
    11. Locate and select the data source name from the drop-down list.
    12. Click "Test" to make sure that the server is responding.
    You will be back at the Quick Design Wizard "Step 1 of 4". Click the "Next" button and follow through the rest of the steps in order to complete the universe.
    -Shreyash

  • Universe created from a Ms Excel sheet --

    Hi Good Morning,
    I created One webi report in BO .Now i want to create a universe from MS Excel File .Please tell me step by step Process .
    Thanks In Advance
    Praveen Kumar Yagnamurthy.

    Please try the following steps to create a universe on excel file
    1. Open the Excel spreadsheet
    2. Select all the data values, make sure the remaining blank cells donu2019t get selected
    3. Click on Insert>>Name>>Define to give a name to the table
    4. Save the Excel
    5. Go to Start>>Control Panel>>Administrative tools>Data Sources(ODBC)
    6. Select System DSN>>Add>>Microsoft excel Driver(*.xls)
    7. Give a new data source name and click on Select workbook and point the saved excel sheet and click on OK
    8. Create a new connection in Universe designer by using the Generic ODBC connection
    9. Create a new universe and insert the table which we have defined in the Excel sheet
    Note:
    1. Make sure the parameter <Parameter Name="Transactional Available">No</Parameter> is set to Yes under the Generic ODBC data source in below location
    C:\Program Files\Business Objects\Business Objects Enterprise 11.5\win32_x86\dataAccess\connectionServer\odbc\odbc.sbo
    2. If you would like to export the excel universe to CMC try these steps on your BO server machine
    3. This workaround only works for windows server machine
    Regards
    Manoj Kumar

Maybe you are looking for

  • External Drive Failure

    Hi all excuse me if I'm in the wrong place but whilst running Techtool Pro my perfectly running Ext Firewire hard drive has failed to display a desktop icon, is not recognised anywhere and now runs at full speed from power on, I have tried all the us

  • How can a session have an ACTIVE status with a WAITING state

    Hi all, I would like to know the difference between status and state of a session ? The documentation says : for status ACTIVE : Session currently executing SQL for state WAITING : The session is currently waiting... How can a session execute a SQL s

  • Two loops in a table in main window

    Hi all, I have a main window and under it I have created a table with header main window and footer for 6 fields with 6 cells and 6 texts, each text under each cell. I want to run a loop for first 3 fields and another loop for the other fields. I mea

  • Internet signin problem

    I cannot sign in to the university of Miami website https://wireless.med.miami.edu/login? the wireless network is Medical_Wireless I have removed the Network then let the MacBook Pro find it again. Safari stalls with a blank page when loading the pub

  • ITunes is billing me for a mystery account.

    I am currently being charged £39.99 on a quarterly basis from my business account.  I don't receive invoices or emails regarding the amount being taken. It being taken by direct debit and I can't stop it as the bank won't let me. I have contacted app