Export data to Excel

Advertisement

Hello All,
            I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
  DATA_FILENAME             =
  DATA_PATH_FLAG            = 'W'
  DATA_ENVIRONMENT          =
  DATA_TABLE                =
  MACRO_FILENAME            =
  MACRO_PATH_FLAG           = 'E'
  MACRO_ENVIRONMENT         =
  WAIT                      = 'X'
  DELETE_FILE               = 'X'
EXCEPTIONS
  NO_BATCH                  = 1
  EXCEL_NOT_INSTALLED       = 2
  INTERNAL_ERROR            = 3
  CANCELLED                 = 4
  DOWNLOAD_ERROR            = 5
  NO_AUTHORITY              = 6
  FILE_NOT_DELETED          = 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.
This FM when executed without passing any data is able to open an empty excel sheet but when I try to pass an internal table to DATA_TABLE  its giving a dump. The run time error is CALL_FUNCTION_CONFLICT_TYPE.
Error:
**"The function module interface allows you to specify only fields      
of a particular type under "TABNAME". The field "ITAB1" specified here
has a different field type."**
Please let me know if Im missing something.
Thanks in advance.

Advertisement

Hi SAP,
Simply List -> Save -> File -> spreadsheet -> file.xls
Or check this weblog..
<a href="/people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel:///people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel
or
try this code..
DATA : file_name TYPE ibipparms-path,
lc_filename TYPE string.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
file_name = file_name .
lc_filename = file_name.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = lc_filename
filetype = 'DAT'
TABLES
data_tab = gt_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Revert back for more help
Reward points if helpful
Regards
Naresh

October 11, 2015

Problem while exporting data to Excel sheet.......

Hi I have written the following code to export data to excel sheet... data:        conv_out TYPE REF TO cl_abap_conv_out_ce,        content TYPE xstring. data : itab_slsrl type table of znslsrlitm. data: xml_out TYPE string. Data: Node_slsrl type ref

Export data to Excel

Hello All,             I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM CALL FUNCTION 'RH_START_EXCEL_WITH_DATA' EXPORTING   DATA_FILENAME             =   DATA_PATH_FLAG            = 'W'   DATA_

Export Data into Excel Sheet in UNIX

Hi All How to export the table data into excel sheet in unix. ThanksCreate a csv file. A csv file is just an ascii file, so it doesn't matter what OS you are on.Read other 2 answers

Problems in exporting data to Excel from WebDynpro

Hi, I'm trying to transport data to Excel using the WebDynpro Binary Cache. The table data I have has certain special characters like & , < and > . I get an XML Parse error while trying to retrieve the XML List from the Binary Cache. The detaile

EXPORT DATA TO EXCEL FROM PORTAL

HELLO user has saved one of the web reports in his favourites...he has customized the report according to his needs and then saved it in his favourites...now when he acesses the report from his favourites and.. enters the values for the variables the

Using oracle reports designer can we export data to excel sheet

using oracle reports designer can we export oracle data to excel sheetThere is a big discussion on this topic in the following link. I think you might be helpfull . The link is: A newbie question for a newbie user Regards Samujjwal BasuRead other 3 a

Questions when export data to excel

My platform Windows2000(Chinese version). Oracle 9i R2 charset ZHS16GBK Patch 2323002,2632931,2499827 JDev903 + BI Beans 903a There are two problems 1. Everything goes well. But when the project is deployed, the Export function will return a error pa

Error exporting data to excel file

Hello, I have written a macro to export some channels into an excel file, skipping the excel wizard by using the following code: EXCELChnCount = intChannels - 1 For i = 1 To intChannels     ExcelExpChn(i) = ChannelList(i - 1) Next Call EXCELExport ("

Export dates to Excel

Hi, id like to know if theres a way to ensure that dates exported from any exportable document or report in SAPB1 are all in correct date formats once its in Excel?Izak, When you export a report to Excel....the date formats would automatically appear

Exporting data into excel sheet from CRM

Hi All, I am facing problem while extracting data from CRM - Service Process Monitor. I tried to extract data(records) from executed service process monitor through System -> List ->Save->Local file->Spreadsheet I am not getting actual records

Export Data to Excel using PL/SQL

Hello..... Can anyone tell me of a straight-forward way to export a result set to an excel file using PL/SQL? Thanks, Christinemy oracle DB is on unix box and i created that directory on unix server... SQL> select directory_path from all_directories

Need help in exporting data in to Excel by integrating XML publisher in OAF

Hi All, I am facing issue while exporting data into Excel by integrating XML publisher in OAF. Everything is working fine except that the report is not uploaded in the Excel sheet. Excel sheet is opening empty. In OC4J server log an getting the below

Hyperion Web Analysis Studio - Excel Export Data PATH TO EXCEL

I have a problem with Hyperion Web Analysis Studio by Export Data (Path to Excel) function on every client (windows Vista - IE 7 - Office 2007) The problem is when I try to use the Export data to Excel, the Path to the excel program is missing and I

Import data from Excel to list in Sharepoint Online site

I need to upload data from excel to SharePoint list in SharePoint online site. I can extract data from excel but how can i connect to the SharePoint online site and upload the data programmatically from a console exe. Kindly advice. Anand BHi Anand,

Data from Excel to ADF table

Hi, I need to export data from excel to ADF table and edit the data and finally send it back to database. Would you kindly let me know how to proceed in this? Many thanks in advance RegardsThis depends on your excel file structure. You can use ADF De

How to export data to specified format as EXCEL(XXL)

Dear Experts, Good day! Who can help me that to export data in SAP by KE30 Transaction Code? We planed to do some things on browser using SAP GUI for HTML and ITS 6.20 in SAP R/3 640. Now, our end-user occur one problem that they need outgoing the da

Export data to MS excel dynamically, randomly fail

Hello, there, I developed a package to export data from SQL 2005 to xlsx file. In the package, I have a foreach loop to loop through a recordset, ie. Group_Name, Group_ID Inside the foreach loop, I create a spreadsheet using the Group_Name (passed by

How we export report data into excel in report 10g

hi can any one tell me how we export report data into excel in report 10g (except spreadsheet)We can use TEXT_IO PackageRead other 2 answers

Export data to MS Excel in Adobe interactive form

Hello Experts, I am using Webdynpro Java and ALCD 8.2.  Can anyone help me out with functionality of Exporting adobe form data to excel file. Thanks in advance, SwamiHi Swami, When you say exporting data to a excel spread sheet. Does that mean once t

SSIS: Export data from ODBC source to Excel only 5000 rows at a time

Greetings, Im inserting data into Excel using SSIS. Im getting the following exception: '[Excel Destination [32]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "M