Create spool file
hi @all,
I search a way to create a spool file in a htmldb application (intranet) which writes a xls.file on a default place of the client filesystem.
I dont't know whether it works with pl/sql or javascript.
any ideas?
What about calling your job from dbms jobs?
Similar Messages
-
Creating spool file for Mass printing of smartforms
Hi all
My requirement is Mass printing of Development Plans,
In this case is i need to select all the smartforms depending upon the selection screen data.& i need to pass all the smartforms to newly created spool file..
how should I use TSP01 & Function Module 'GET_PRINT_PARAMETERS' for this smartform spool.
so can any body explain me in detail..
How to create spool ID, ?
how to create spool file in this case..??
How to pass smartform data to that new spool file../??
Any sample codes for this ./??
Thanx in advance,
Regards,
Kalam A.Check the links -
Re: How to create a spool?
How to create a spool request
Regards,
Amit
Reward all helpful replies. -
Hi,
I've problems in creating spool file. I've some PL-SQL scripts, running monthly with sqlplus on Windows 2000, that have always generated spool file using the statements "spool filename.log".
Two days ago, I run this scripts and I noticed that they didn't create the log file, but nothing has been changed.
I noticed that changing the script with "spool c:\filename.log" the spool file is correctly generated.
I run the script using sqlplus user/pwd@db @c:\script.sql and in the body of the script there is:
whenever oserror exit SQL.OSCODE rollback
whenever sqlerror exit SQL.SQLCODE rollback
spool faXXXXX_X.log
Set autocommit off timing on echo on feedback on termout on serveroutput on
set escape ^
DECLARE
Why "spool filename.log" suddenly stop to work? There is some enviroment variable who determine the default directory of spooled file?My PATH variable has a lot of directories, some of them are "C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;"
I make a "search" for the spooled file in all the directories of the hard disk; the problem is that the spooled file has not been created but the SQL script terminated succesfully. What's the possible reason? -
How create spool file with current date and time?
I want to create spool file like xyz_28062010.
Please, suggest.like:
In SQL*Plus this is what you can do to get the current date/time as part of the spool file:
============================================================================================
SQL> column tm new_value file_time noprint
SQL> select to_char(sysdate, 'YYYYMMDD') tm from dual ;
1 row selected.
SQL> prompt &file_time
20020816
SQL> spool C:\Temp\logfile_id&file_time..log Reference: Creating a spool file with date/time appended to file name
Edited by: Gj on Jun 28, 2010 11:45 AM -
SP2-0110: Cannot create save file "afiedt.buf"
i have a remote database connectivity authenticated by a username/pwd.
i connect into the database(SQLPLUS) thro a CITRIX SERVER client.i have all the privileges of an oracle developer for my username and i have complete access to my
schema objects.
But when i try invoking the editor afiedt.buf using the command < ED > in SQLPLUS i get the
following message
SP2-0110: Cannot create save file "afiedt.buf"
when i try to spool an output to a file (one.txt) i get the following error
SQL> spool one.txt
SP2-0332: Cannot create spool file.
could anybody suggest how i could resolve these issues.
ThanxJust be aware, because you are connecting through a Citrix server, that your "current directory", as far as sqlplus is concerned, is on the Citrix server.
Depending on your site, you may have a hard time convincing the Citrix admin to give you write access on their server. You should try to get the Oracle client, which includes sqlplus, installed on your local machine.
TTFN
John -
How/Where to check the path for SPOOL File in SQL.
I am getting the following error while spooling:
SP2-0606: Cannot create SPOOL file "A.LST"
Pls suggest.If you SPOOL without specifying a full path it will create the file in the current directory that you started SQL*Plus from.
So if I was in:
C:\Documents and Settings\joe.user\
And logged into SQL*Plus and typed SPOOL it would create a file in the directory specified above.
While you are in SQL*Plus you can check the current working directory by doing the following
Windows: SQL> host cdLinux: SQL> !pwdHTH. -
Printer spool files in v11 vs v8?
Why does Acrobat version 11 create spool files that are up to 10 times larger than version 8 for the same document? Version 11 is running on Mac )S 10.8.3, version 8 running on 10.5.8. Both print to a shared laser printer on a windows server, and usually the v11 file will never print - it just gets dumped.
Any clues?
ThanksThe same thing happened to me:
http://discussions.apple.com/message.jspa?messageID=662944#662944
But To be honest (and I dont know if this really had anything to do with it)... The tech support at apple said that the print server had to be stopped when you create a print queue. I hadn't, I shut the server down trashed and recreated my queues since then everything has been working lovely. -
Extraction of oracle pkg and pkg bodies into spool file??
Hi,
I need to extract all packages and its bodies into spool file. can you give me script or guide how to do this.. i have more than 200 packages.. need to create spool file for each package. great thanks for help.
/mr
Edit/Delete MessageFrom 10g, DBMS_METADATA is designed for ! :)
[http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_metada.htm#i1019414]
Edited by: Leo Anderson on 1 sept. 2008 14:22 -
Hi All,
Is it possible to create a mutiple spool files which contains different data from the abap program at once.
Please let me know your thoughts.
Thanks & Regards
SanthoshIf you execute the program in BACKGROUND, it will automatically create spool.
ONLINE EXECUTION: you need to write your statements to be taken to spool within NEW_PAGE PRINT ON & OFF.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
COVER_PAGE = WC_X
DESTINATION = <Printer Name>
EXPIRATION = 2
IMMEDIATELY = SPACE
LAYOUT = 'X_65_255'
LINE_COUNT = 65
LINE_SIZE = 255
LIST_NAME = <LIST_NAME>
LIST_TEXT = <SPOOL_TITLE>
*NEW_LIST_ID = WC_X* "New Spool
NO_DIALOG = WC_X
SAP_COVER_PAGE = WC_X
IMPORTING
OUT_PARAMETERS = WA_PRINT_PARA
VALID = WS_VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4.
IF WS_VALID <> SPACE AND SY-SUBRC EQ 0.
NEW-PAGE PRINT ON PARAMETERS WA_PRINT_PARA NO DIALOG.
PERFORM DISPLAY_REPORT. "Write Statements
NEW-PAGE PRINT OFF.
endif.
Reward if useful. -
hi i am running a unix loop and in that creating a sql statement. now i want to spool the result to a file . but the problem is the spool file should have time as the name. loop runs after every 2 mins.
while [ true ];
do
sudo su - BATPBL<<!
sqlplus hr/hr<<!
spool /ankur/ank_XXXX #XXXX should be the time
select * from guard_usr order by guard_usr_id;
spool off
sleep 9
done
Please helpYou could implement in your spool project something like this :
[oracle@g5 ~]$ sqlplus fas_admin
SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 18 11:27:25 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> !export DATE=$(date +"%m_%_d_%y %H:%M:%S")
SQL> spool datefile.txt$DATE
SQL> select me from you;
select me from you
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> spool off;
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@g5 ~]$ ls -l datefile.txt*
-rw-r--r-- 1 oracle oinstall 137 2009-05-18 11:28 datefile.txt05_18_09 11:23:39
[oracle@g5 ~]$also you can visit http://en.wikipedia.org/wiki/Date_(Unix) -
Creating a spool file with date/time appended to file name
In Oracle Sql*Plus, I want to spool out a file, with the date-time stamp as part of the file name. Any idea how to do this?
Here's what I have right now:
SQL>
set serveroutput on size 200000;
rem
rem $OFSA is a UNIX alias so sql plus is talking to UNIX
rem
spool $OFSA/logs/OFSAP/common_coa_id.log;
prompt 'Enter date in mmddyyyy format, without quotes';
exec upd_common_coa_id_driver ('&date_mmddyyyy');
spool off;
As an example, I'd like to have a file with this name: common_coa_id083002.log
Thanks.In SQL*Plus this is what you can do to get the current date/time as part of the spool file:
============================================================================================
SQL> column tm new_value file_time noprint
SQL> select to_char(sysdate, 'YYYYMMDD') tm from dual ;
1 row selected.
SQL> prompt &file_time
20020816
SQL> spool C:\Temp\logfile_id&file_time..log
. /* put your code here */
. /* it will go to a file called C:\Temp\logfile_id20020816.log */
SQL> spool off
SQL> -
How to create spool in an online report
Hi All,
I have a requirement where the ALV report output has customers and details related to it.For example My report output has three customers(with a check box against it) and each customer has 5 line items.The user will select first and the last customer and press a push button provided.Once he clicks this push button, I should get the customers which are selected by the users and the line items related to this customers.I am able to capture all this.Now the real problem here is that I have to create a pdf document for each customer along with line items and send it as an email.In effect, in this scenario I have to create two pdf documents since the user has selected two customers on the output screen and send it to the email of that particular customer.Is there any FM available to create spool in the background for each of these customers(along with line items data) and make use of this spool number to generate a pdf document using CONVERT_ABAPSPOOLJOB_2_PDF.Once I get this I can send the email.
Please help!
Thanks in advance
SandeepThe following steps shows how to download the output data in to PDF.
1.Provide Spool Parameters using following function module 'GET_PRINT_PARAMETERS'.
--This function module will provide the print parameters for creating the output in the spool; the required parameters are passed to the OUT_PARAMETERS import parameter.
2.Submit the report to generate the output in the spool.
SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_mstr_print_parms
WITH SELECTION-TABLE i_int_tab
AND RETURN.
--Submit the report to generate the output in the spool as i_int_table is an internal table with structure RSPARAMS. As variant allows you to set the names and contents of the parameter and selection options dynamically at runtime, we need to use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table i_int_table with the structure RSPARAMS and pass that internal table in above manner.
3.To Find the spool number from the table TSP01
Data: l_rq2name LIKE tsp01-rq2name.
*Concatenate the report and User name as per the value available in the table
TSP01.
CONCATENATE f_repid+0(9)
f_uname+0(3)
INTO l_rq2name.
*Fetch the most recent spool from the TSP01 table
SELECT * FROM tsp01 WHERE rq2name = l_rq2name
ORDER BY rqcretime DESCENDING.
l_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
4.Convert Spool to PDF using the FM : CONVERT_ABAPSPOOLJOB_2_PDF.
5.Download to local file by using the FM : DOWNLOAD
This function module returns an internal table data_tab contains the PDF formatted output.
Using above points your can create the output in the PDF from there you can send the email.
Hope your reqirement can met using the above five points.
Reward points please
Thanks,
Ravi Kanth -
How to get the number of rows written to the header of the spool file.
Hi
I need to create a header line for the spool file .
the header line should include fixed length values .
The header should include the number of records found in the table with a maximum begin date (begin_date is the column of the table)
To get the header in the spool file , i wrote a select query has :-
--SPOOL 'C:\Documents and Settings\abc\Desktop\output.TXT'
select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
rpad(' ',76,' ')
from dad.school
group by sysdate;
SPOOL OFF
which gets me all the rows in the table , but i only want the rows with the latest school_begin_date .
how can i achieve that ...
I know that a subquery should be written in the from clause to get the number of rows found with a maximum school_begin_date.
select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
rpad(' ',76,' ')
from dad.school where
select rownum from dad.school
where school_begin_date = max(school_begin_date) ;
the error i get is
ORA-00934: group function is not allowed here
I NEED HELP ..IN GETTING THE ROWNUM JUST FOR THE LATEST BEGIN_DATE ?
PLS HELP ME IN WRITING THE QUERY .
THANKS IN ADVANCE .Try this:
select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000')||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) || rpad(' ',76,' ')
from dad.school
where school_begin_date = (select max(school_begin_date)
from dad.school); -
Can I download a spool file from ALV payroll recon report in Fixed Ascii?
We have a process that imports the spool files from our various nightly payroll recon reports but have recently upgraded to ECC 6.0 and the ALV formatted report does not appear to create a fixed format spool file - the width of the columns changes from spool to spool based on the contents.
Does anyone know how to accomplish our need?
Thanks,
DeWayneDoes the printer show up in the Windows Printers folder? We've used PDF995 or Cute pdfwriter for years. All of these create virtual windows printers. When you print to them, a dialog box pops up asking for the filename for the pdf. If you have Activex calls to Excel in order to open a file, you should be able to make ActiveX calls to print it to a print driver such as this. I don't know if any of these drives have a way to bypass the filename dialog box. That may take some research and experimentation. I don't know where the postscript file comes into play in the scenario you are describing.
-
Creation of Spool File with Triggers
Hi,
I have created an OnUpdate trigger using the Essbase Console. I am using a calculation script to change the value of an account that is being used in the trigger. The trigger doesnot craete a spool file. Can anyone help me with it.Are you sure that the data value that should change did change?
Here I am plugging Glenn's presentation twice in like five minutes. Check out this (unrelated) thread -- it explains how to get to his Kaleidoscope presentation.
How to use a substitution variable in a load rule?
FWIW, this part of the presentation was really good (it was all good, but I particularly enjoyed this bit).
Regards,
Cameron Lackpour
Maybe you are looking for
-
Ok. So as far as I understand it, here are the steps for using the new iTunes movie rental feature: 1) Upgrade to the lastest (and greatest) iTunes. 2) Download a movie. 3) Try to play the movie. When your computer hangs, run Task Manager and attempt
-
How to find out where sap error messages stored in our system
How to find out where sap error messages stored in our system.like sometime we will get a error message with message number.whr it will be stored and whch table it is?
-
Re: Satellite A100 shuts down for no reason then starts buzzing
Hi there, I have had this A100-200 laptop for 18 months with no trouble so far. Today it suddenly turned off, all lights still on showing that is was still had power, but there was a worrying buzzing sound. I turned it off and then rebooted, fine for
-
Can't find retail purchase/sales info in BAPI_MATERIAL_MAINTAINDATA_RT
We are trying to convert articles from our legacy system to SAP Retail. We are using the function BAPI_MATERIAL_MAINTAINDATA_RT. I have found most of the data for MM41, but am missing the following: Listing Tab: Need to set up assortments. This is
-
Removed effects showing in Master File
I removed a gausian blur effect and when I watch in FCPX it is gone but when I export a file the blur is still there. i tried deleting all render files and re-exporting but it is still there