How to export table data to excel in albpm
Hi,
we have an requirement to export table data to excel .
we have to create an jsp in that jsp we have to have text fileds,we have to enter data to field after that we have to click on save once u click on save that data has to enter in below table and we should provide link to export that table data to excel.
this is our totatl requirement.can u please suggest me how to do,i dont have any idea..
Regards,
Sharmila
Edited by: user12171025 on Nov 5, 2009 8:44 PM
Hi Daniel
Please have a look at below docs :-
/people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache
http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d01854fd-1579-2c10-63ad-dd62edca2381?quicklink=index&overridelayout=true
Regards
Arun Jaiswal
Similar Messages
-
How to export the data to excel in OAF Page - Urgent
Hi All,
I have a developed a page wich dispaly the records based on some condition.
The Page has two regions.
1.RowLayout Region
2.Table Region
Both the regions are getting the data from two diffrent VOs.
In this case how to export the data to excel as the export button will not work if the page uses more than one VO(I think).
Please help me.
Thanks,
Srinivas
Edited by: SrinivasChanda on Oct 7, 2009 10:07 AMHi Gaurav,
Yes you are rite.When i tried exporting the data(which is coming from two different VOs altogether),i got only one region's data and then got error.
Please note: Two regions(RowLayout,Table) are getting data from two different VOs
below is one of the region(row layout) data:
Hierarchy Learning Certification Status Learning Certification Supervisor
Direct Reports Passed Only All Michael Swinnerton
below is the error:
<div CLASS="errorText">
<html lang="en-US">
<head>
<script>
function ignoreWarnAboutChanges(url)
document.location.href = url;
</script>
<title>Error Page</title>
<link rel="stylesheet" charset="UTF-8" type="text/css" href="/OA_HTML/cabo/styles/blaf.css">
<META name="fwk-error" content="Error occured while processing the request">
<META name="fwk-error-detail" content="oracle.apps.fnd.framework.OAException: Application: FND Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.io.IOException: Stream closed;
" at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)"
" at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)"
" at OAErrorPage.jspService(OAErrorPage.jsp:34)"
" at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)"
" at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)"
" at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)"
" at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)"
" at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)"
" at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)"
" at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:119)"
" at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:547)"
" at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:518)"
" at OAExport.jspService(OAExport.jsp:122)"
" at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)"
" at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)"
" at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)"
" at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)"
" at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)"
" at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)"
" at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)"
" at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)"
" at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)"
" at java.lang.Thread.run(Thread.java:534)"
## Detail 0 ##
java.io.IOException: Stream closed
" at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:98)"
" at java.io.BufferedWriter.write(BufferedWriter.java:197)"
" at OAExport.jspService(OAExport.jsp:107)"
" at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)"
" at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)"
" at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)"
" at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)"
" at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)"
" at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)"
" at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)"
" at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)"
" at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)"
" at java.lang.Thread.run(Thread.java:534)"
java.io.IOException: Stream closed
" at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:98)"
" at java.io.BufferedWriter.write(BufferedWriter.java:197)"
" at OAExport.jspService(OAExport.jsp:107)"
" at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)"
" at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)"
" at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)"
" at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)"
" at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)"
" at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)"
" at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)"
" at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)"
" at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)"
" at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)"
" at java.lang.Thread.run(Thread.java:534)"
">
</head>
<body>
<table width=100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
<tr> <td><img src="/OA_MEDIA/FNDSSCORP.gif" alt=""> </td></tr>
<tr> <td> </td>
<td> <a href= /OA_HTML/OALogout.jsp>Logout </a></td>
</tr>
<tr> <td width="100%" nowrap class="OraBGColorDark" > </td> </tr>
</table>
<p>
<center>
<table width="95%" border="0" cellspacing="0" class="OraBGAccentDark" cellpadding="0">
<tr> <td> </td> </tr>
<!-- <tr> <td class="OraErrorHeader"> <img src=/OA_HTML/cabo/images/errorl.gif> Error Page </td> </tr> -->
<tr> <td class="OraErrorHeader"> <center> Error Page </center> </td> </tr>
<tr> <td colspan=2 class="OraBGColorDark"> </td> </tr>
<tr> <td> </td> </tr>
<tr> <td colspan=2 class="OraErrorText" >You have encountered an unexpected error. Please
contact the System Administrator for assistance. </td> </tr>
<tr> <td colspan=2 class="OraErrorText"> Click <a href=javascript:ignoreWarnAboutChanges("/OA_HTML/OAErrorDetailPage.jsp")> here </a> for exception details.
</td> </tr>
</table>
</center>
</div>
</body>
</html>
Please help me to solve this issue.
Thanks,
Srinivas -
Hello, i use af:exportCollectionActionListener component to export table data to Excel.
there are 100 000 rows in my table. But only 65 535(may be is consilience that ushort = 0 to 65535) rows was exported.
what are problems? Anybody know?
Edited by: Beliansky Alexander on Sep 5, 2012 7:02 AMIf i am not wrong thats a limit of excel. Not sure but.Google
taken from "http://msdn.microsoft.com/en-us/library/office/ff700514.aspx"
"Starting in Excel 2007, the "Big Grid" increases the maximum number of rows per worksheet from 65,536 to over 1 million, and the number of columns from 256 (IV) to 16,384 (XFD). "
Edited by: in the line of fire on Sep 5, 2012 6:06 PM -
Exporting table data to Excel sheet:
Hi All
My requirement is need to export table data to Excel sheet: for this
I was done all, but I'm getting 500 Exception please contact u r system admin msg at run time, also Jxl/Workbook class not found msg but I downloaded Jxl.jar file and its showing in navigator>Lib>jxl.jar. There is no error signals in coding part.
Thanks
PolakaHi,
Copy your jxl.jar and open it with winzip. See if there is Workbook.class file inside it in the folder jxl.
Try to download jxl.jar from this link
http://www.java2s.com/Code/Jar/JKL/Downloadjxljar.htm
and add.
Best Wishes
Idhaya R -
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 Package
-
How to Export Table Data to a excel sheet using OPENROWSET
Hi Team,
I would like to Export table data to a excel sheet by using "OPENROWSET" command in SQL Server but I am getting the
below error message
Column name or number of supplied values does not match table definition.
Please help me on how to export the table data to an excel sheet by using "OPENROWSET" in SQL ServerI know this is old so I assume you've fixed this. However, for anyone else looking at this forum, I'd recommend using a union or a table join.
Select a.1, a.2, a.3 from a <where clause>
union
Select b.1, b.2, b.3 from b <where clause>
or
use a type of join.
If both table selects return the same number of columns but different data just reference them as a variable like fred, and Ted
Select fred.1, fred.2, fred.3 from (Select a.1, a.2, a.3 from a) fred
union
Select Ted.1, Ted.2, Ted.3 from (Select b.1, b.2, b.3 from b) Ted
or again some type of join of these two sets
Select * from
(Select a.1, a.2, a.3 from a) a
INNER JOIN (Select b.1, b.2, b.3 from b) b ON b.1 = a.1
This would give you 6 columns of data a1-3, and b1-3
We don't know from your description what format your spreadsheet is in. These just give you the idea. Think of the sub-selects as a Table. It's just named "fred". Once your select holds all the data you need, then export the data to the spreadsheet. Use
the horsepower of the database before trying to do a multple update of the same spreadsheet.
Does this give you enough to fix what you were trying to do? -
How to export table data with coloring of cell according to value.
Hi all,
I am using jdeveloper 11.1.1.6
i want to export table data with lot of formatting. like with coloring of cell according to value and so many.How to do that?Hi,
like with coloring of cell according to value and so many.How to do that?
Answer is, you can't
Frank -
Problem while Exporting Table Data to Excel Sheet
Hi All,
Im getting problem while downloading the table data to Excel.
Steps i was fallowed:
1)created Context node with four attributs.
2)created one attribut(resource) type: com.sap.ide.webdynpro.uielementdefinitions.Resource
3)Taken one Filedownload UI and Property resource bounded to (resource)
4)Added required jar file in the library and copied the same jar file in the navigator lib file
written the necessary coding but showing the below problem in the Browser
You must Flush before accessing the resource content
Please give me any suggestion on this
Regards
PolakaHi
Check this might help with Brian Fernandes comments.
Flush?
Regards
Arun Jaiswal -
How to export the data to a excel file from RSA3?
Hi experts,
1.I am trying to save the RSA (SRM extractor) to excel spread sheet to compare SRM data with BI data. When i run the the transaction RSA3 it just showed me 10 different data packets. How to export the data to excel spread sheet for reconciliation?
2. Does any body know if the stepup tables exist for SRM extractors?
Thank in advance
Sharat.Hello Sharat,
You have two options of saving data to excel sheet:
Step 1:
Goto RSA3, change the "Data Records / Calls" to 1000 and then execute. This way instead of 10 different packets you will get one packet.
Step2:
Click on the list button, open the packet by double clicking it. You will see all the data on your screen.
Step3:
Goto System -> List -> Save - > Local File -> Spreadsheet and give some name for your xls file.
Assign points if helpful.
Regards,
F-S -
Hi everyone, again landed up with a problem.
After trying a lot to do it myself, finally decided to post here..
I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
Because both the tables have same number of columns & column names.
Below are 2 tables with column names:
Table-1 (MONTHLY_PART_1)
Table-2 (MONTHLY_PART_2)
SL_NO
SL_NO
COMP
COMP
DUE_DATE
DUE_DATE
U-1
U-1
U-2
U-2
U-4
U-4
U-20
U-20
U-25
U-25
Since both the tables have same column names, I'm getting the following error :
Error 402 at line 103, column 4
alias required in SELECT list of cursor to avoid duplicate column names.
So How can i export the data to excel which has 2 tables with same number of columns & column names?
Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
Help me with this please.
Thank You.You'll have to *alias* your columns, not prefix it with the table names:
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id, b.id, a.val1, b.val1, a.val2, b.val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
for rData in cData loop
ERROR at line 18:
ORA-06550: line 18, column 3:
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
ORA-06550: line 18, column 3:
PL/SQL: Statement ignored
$[CHE_TEST@asterix1_impl] r
1 declare
2 cursor cData is
3 with data as (
4 select 1 id, 'test1' val1, 'a' val2 from dual
5 union all
6 select 1 id, '1test' val1, 'b' val2 from dual
7 union all
8 select 2 id, 'test2' val1, 'a' val2 from dual
9 union all
10 select 2 id, '2test' val1, 'b' val2 from dual
11 )
12 select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
13 from data a, data b
14 where a.id = b.id
15 and a.val2 = 'a'
16 and b.val2 = 'b';
17 begin
18 for rData in cData loop
19 null;
20 end loop;
21* end;
PL/SQL procedure successfully completed.
cheers -
How to export sql table data to Excel/PDf using Storedprocedure?
Hi ,
I have one table in sqlserver2008R2 that named "Customer" so that table hold the 1 Lac rows. Now I want send this table data to Excel/pdf with Columns using Storedprocedure.
I have tried this using xp_cmdshell so This is not working for me.
finally i want to get data in Excel and pdf also.
Please guide meYou can actually run an Excel Macro to grab the data from the SQL Server DB. Below are some samples.
Sub ADOExcelSQLServer()
' Carl SQL Server Connection
' FOR THIS CODE TO WORK
' In VBE you need to go Tools References and check Microsoft Active X Data Objects 2.x library
Dim Cn As ADODB.Connection
Dim Server_Name As String
Dim Database_Name As String
Dim User_ID As String
Dim Password As String
Dim SQLStr As String
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Server_Name = "Excel-PC\SQLEXPRESS" ' Enter your server name here
Database_Name = "Northwind" ' Enter your database name here
User_ID = "" ' enter your user ID here
Password = "" ' Enter your password here
SQLStr = "SELECT * FROM dbo.Orders" ' Enter your SQL here
Set Cn = New ADODB.Connection
Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
";Uid=" & User_ID & ";Pwd=" & Password & ";"
rs.Open SQLStr, Cn, adOpenStatic
' Dump to spreadsheet
With Worksheets("sheet1").Range("a1:z500") ' Enter your sheet name and range here
.ClearContents
.CopyFromRecordset rs
End With
' Tidy up
rs.Close
Set rs = Nothing
Cn.Close
Set Cn = Nothing
End Sub
Sub ADOExcelSQLServer()
Dim Cn As ADODB.Connection
Dim Server_Name As String
Dim Database_Name As String
Dim User_ID As String
Dim Password As String
Dim SQLStr As String
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Server_Name = "LAPTOP\SQL_EXPRESS" ' Enter your server name here
Database_Name = "Northwind" ' Enter your database name here
User_ID = "" ' enter your user ID here
Password = "" ' Enter your password here
SQLStr = "SELECT * FROM Orders" ' Enter your SQL here
Set Cn = New ADODB.Connection
Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
";Uid=" & User_ID & ";Pwd=" & Password & ";"
rs.Open SQLStr, Cn, adOpenStatic
With Worksheets("Sheet1").Range("A2:Z500")
.ClearContents
.CopyFromRecordset rs
End With
rs.Close
Set rs = Nothing
Cn.Close
Set Cn = Nothing
End Sub
Sub TestMacro()
' Create a connection object.
Dim cnPubs As ADODB.Connection
Set cnPubs = New ADODB.Connection
' Provide the connection string.
Dim strConn As String
'Use the SQL Server OLE DB Provider.
strConn = "PROVIDER=SQLOLEDB;"
'Connect to the Pubs database on the local server.
strConn = strConn & "DATA SOURCE=(local);INITIAL CATALOG=NORTHWIND.MDF;"
'Use an integrated login.
strConn = strConn & " INTEGRATED SECURITY=sspi;"
'Now open the connection.
cnPubs.Open strConn
' Create a recordset object.
Dim rsPubs As ADODB.Recordset
Set rsPubs = New ADODB.Recordset
With rsPubs
' Assign the Connection object.
.ActiveConnection = cnPubs
' Extract the required records.
.Open "SELECT * FROM Categories"
' Copy the records into cell A1 on Sheet1.
Sheet1.Range("A1").CopyFromRecordset rsPubs
' Tidy up
.Close
End With
cnPubs.Close
Set rsPubs = Nothing
Set cnPubs = Nothing
End Sub
Finally, you can run a SProc in SQL Server, from Excel, if you want the SProc to do the export.
Option Explicit
Sub Working2()
'USE [Northwind]
'GO
'DECLARE @return_value int
'EXEC @return_value = [dbo].[TestNewProc]
' @ShipCountry = NULL
'SELECT 'Return Value' = @return_value
'GO
Dim con As Connection
Dim rst As Recordset
Dim strConn As String
Set con = New Connection
strConn = "Provider=SQLOLEDB;"
strConn = strConn & "Data Source=LAPTOP\SQL_EXPRESS;"
strConn = strConn & "Initial Catalog=Northwind;"
strConn = strConn & "Integrated Security=SSPI;"
con.Open strConn
'Put a country name in Cell E1
Set rst = con.Execute("Exec dbo.TestNewProc '" & ActiveSheet.Range("E1").Text & "'")
'The total count of records is returned to Cell A5
ActiveSheet.Range("A5").CopyFromRecordset rst
rst.Close
con.Close
End Sub
Sub Working()
'USE [Northwind]
'GO
'DECLARE @return_value int
'EXEC @return_value = [dbo].[Ten Most Expensive Products]
'SELECT 'Return Value' = @return_value
'GO
Dim con As Connection
Dim rst As Recordset
Set con = New Connection
con.Open "Provider=SQLOLEDB;Data Source=LAPTOP\SQL_EXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"
Set rst = con.Execute("Exec dbo.[Ten Most Expensive Products]")
'Results of SProc are returned to Cell A1
ActiveSheet.Range("A1").CopyFromRecordset rst
rst.Close
con.Close
End Sub
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
How can we export table data to a CSV file??
Hi,
I have the following requirement. Initially business agreed upon, exporting the table data to Excel file. But now, they would like to export the table data to a CSV file, which is not being supported by af:exportCollectionActionListener component.
Because, when i opened the exported CSV file, i can see the exported data sorrounded with HTML tags. Hence the issue.
Does someone has any solution for this ... Like, how can we export the table data to csv format. And it should work similar to exporting the data to excel sheet.
For youre reference here is the code which i have used to export the table data..
><f:facet name="menus">
><af:menu text="Menu" id="m1">
><af:commandMenuItem text="Print" id="cmi1">
><af:exportCollectionActionListener exportedId="t1"
>title="CommunicationDistributionList"
>filename="CommunicationDistributionList"
>type="excelHTML"/> ---- I tried with removing value for this attribute. With no value, it did not worked at all.
></af:commandMenuItem>
></af:menu>
></f:facet>
Thanks & Regards,
Kiran KonjetiHi Alex,
I have already visited that POST and it works only in 10g. Not in 11g.
I got the solution for this. The solution is :
Use the following code in jsff
==================
<af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="text/csv; charset=utf-8"
>filename="test.csv"
>method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
></af:commandButton>
OR
<af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="application/vnd.ms-excel; charset=utf-8"
>filename="test.csv"
>method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
></af:commandButton>
And place this code in ManagedBean
======================
> public void test(FacesContext facesContext, OutputStream outputStream) throws IOException {
> DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
>DCIteratorBinding itrBinding = (DCIteratorBinding)dcBindings.get("fetchDataIterator");
>tableRows = itrBinding.getAllRowsInRange();
preparaing column headers
>PrintWriter out = new PrintWriter(outputStream);
>out.print(" ID");
>out.print(",");
>out.print("Name");
>out.print(",");
>out.print("Designation");
>out.print(",");
>out.print("Salary");
>out.println();
preparing column data
> for(Row row : tableRows){
>DCDataRow dataRow = (DCDataRow)row;
> DataLoaderDTO dto = (DataLoaderDTO)dataRow.getDataProvider();
>out.print(dto.getId());
>out.print(",");
>out.print(dto.getName());
>out.print(",");
>out.print(dto.getDesgntn());
>out.print(",");
>out.print(dto.getSalary());
>out.println();
>}
>out.flush();
>out.close();
> }
And do the following settings(*OPTIONAL*) for your browser - Only in case, if the file is being blocked by IE
==================================================================
http://ais-ss.usc.edu/helpdoc/main/browser/bris004b.html
This resolves implementation of exporting table data to CSV file in 11g.
Thanks & Regards,
Kiran Konjeti -
How to move large number of internal table data to excel by program
Hi,
Iam working on a classical report wherein my requirement is:
Have around 25 internal tables which I am displaying using a selection screen.I need to transfer this all internal tables data to Excel file by executing.
Now, let me know how can I transfer all those to excel by execution.
P.S.: GUI_DOWNLOAD or any other excel download related FMs are used to transfer for single/fewer internal tables.
But here I need to download 25 internal tables data through program.
How can I meet the requirement..?
Kindly advice.
Thanks,
Shiv.Hi,
Refer to the following code:
*& Report ZDOWNLOAD_PROGRAM
report zdownload_program.
parameter : p_path type rlgrap-filename default 'C:\Pdata.xls'.
data : gt_output type standard table of trdirt,
wa_output type trdirt,
p_filen type string.
at selection-screen on value-request for p_path.
clear p_path.
call function 'F4_FILENAME'
importing
file_name = p_path.
start-of-selection.
select * from trdirt
into table gt_output
where name like 'Z%'
or name like 'Y%'.
end-of-selection.
move : p_path to p_filen.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = p_filen
filetype = 'ASC'
APPEND = ' '
write_field_separator =
cl_abap_char_utilities=>horizontal_tab
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
IMPORTING
FILELENGTH =
tables
data_tab = gt_output
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.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Regards
Rajesh Kumar -
How to convert internal table data into excel format?
Hi all,
I want to convert internal table data in excel format and then
send it as email attachment in workflow.
Please tell me how do i perform this.
Regards,
Arpita.Hi Arpita,
Try this sample code::
Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = 'your receiver mail id'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'EXL'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.
Hope it will help you.
Regards,
NIkita -
How to Load the data from excel file(Extension is .CSV) into the temp.table
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinHello Sachin,
You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
Instead of copy values into forms you can save them in your temporary table.
Kind regards,
Alex
If someone's helpful or correct please mark it accordingly.
Maybe you are looking for
-
GR/IR Slip NO_Report Required
Hi I did the config for GR/IR Slip No thro OMC1 and OMJ6. Now i can able to see the GR/IR Slip no got generated internally in MB51 report. Not starigt by clicking the doc no and clicking the details i can able to see. Now the req here is whr can i ge
-
Process + Servlet to invoke process + form + database
GetMortgageForm process The following illustration shows the GetMortgageForm process (see Figure 2). Figure 2. A LiveCycle ES process that returns an interactive form. Note: This document does not describe how to create a process by using Adobe LiveC
-
Does Creative have any other flash mp3 players besides the one that is GB? I've had bad luck with players with hard dri'ves in them, because I always end up dropping them and thus killing the hard dri've. Or, is there another product I could use that
-
Hdmi sound problem since videocard upgrade to R9 290x.
Hello i recently upgraded my videocard from Radeon 6870 to R9 290x. Since the upgrade the hdmi audio playback sound realy delayed und noisy. aplay -l **** Liste der Hardware-Geräte (PLAYBACK) **** Karte 0: SB [HDA ATI SB], Gerät 0: ALC889 Analog [ALC
-
Text List Highlights Area of an Image
Hi All, I have an image of a printed circuit board with many components. I would like to help people find those components by having a text list to the right of the image, then if you click or hover over the text, the component is highlighted in the