How to write a file into UNIX!
Hi Group!
I am trying to write an error file into UNIX directory using 'OPEN DATASET ERRFILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT'. But unfortunately i am getting a dump as it is giving the subrc 8 and dumping with CX_SY_FILE_OPEN_MODE.
The path looks like /sap/DE1/batch/data/SCM_YM/partfiles/HGMEH011.20071001150344
Is there any special command or way to write the file into UNIX?
Quick response would be of great help.
Suresh
The detailed error is
The file '&FILENAME&' was not opened, or was opened in the wrong mode.
Can you please try to create a new file that does not exist.
then we can check whether you have authorization or not.
OPEN DATASET to a file already opened - in the same internal mode - triggers the exception.
THtas why you just create a file with some rough name ( may be ur name) intially and then check.
bye sasi
Similar Messages
-
How to write a file in unix server through oracle plsql code
Hi All,
My requirement is to create and write a file (any file for eg txt file) in unix box with in a specified directory through oracle plsql code.
Oracle sits in windows server.
using utl_file package we can create directory where oracle resides and write it there in oracle server in our case windows..
But here we need to create,write a file but in unix server which is different server than where the oracle server resides..
we are using Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
Can any one one please help me out in this issue...
Thanks in Advance.
PrakashMr Prakash,
Why are you asking this question multiple times in every forum you can spell?
Valid responses have been presented to you already two times.
Can you explain why you can't follow them up, but continue to abuse this forum by repeating doc questions?
Sybrand Bakker
Senior Oracle DBA -
How to write the resultset into a text file
how to write the resultset into a text file
You can use the java.io.* package to write to files.
API: http://java.sun.com/j2se/1.5.0/docs/api/java/io/package-summary.html
Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/index.html -
About download file into unix file
Hi expert,
i use the openset to write file into unix file server.
but why there are some space at the end of every line.
by the way, i works very well in windows server
DATA: DATA_TRANSFER(70).
Data: DATA_TRANSFER type string.
data: fine_riga1(1) TYPE X VALUE '0D0A'.
DATA: gt_data TYPE STANDARD TABLE OF ty_data.
Constants: ascii_tab type x value ','.
field-symbols: <f> type any, <delim> type any.
"Assign delimiter field such as tab or comma.
assign ASCII_tab to <delim>.
CLEAR VN_CNT.
concatenate DSNU 'employee' PN-BEGDA SY-UZEIT into P_UNIX.
OPEN DATASET P_UNIX in legacy text MODE FOR OUTPUT. " IN TEXT MODE encoding UTF-8.
IF SY-SUBRC <> 0.
WRITE: / 'Error on file open:', P_UNIX.
ELSE.
LOOP AT TI_DATA .
CLEAR DATA_TRANSFER.
concatenate TI_DATA-TYPE
TI_DATA-PERNR
TI_DATA-ZAUSW
TI_DATA-ENAME
TI_DATA-TERID
INTO DATA_TRANSFER separated by cl_abap_char_utilities=>HORIZONTAL_TAB.
CONDENSE DATA_TRANSFER NO-GAPS.
TRANSFER DATA_TRANSFER TO P_UNIX.
ADD 1 TO VN_CNT.
CLEAR DATA_TRANSFER.
ENDLOOP.
CLOSE DATASET P_UNIX.
ENDIF.
WRITE: / P_UNIX,
/ 'Transfered', VN_CNT, 'records'.
Best Regards,
KevinHi,
Try this way...
TRANSFER dobj TO dset [LENGTH len]
[NO END OF LINE].
Addition 1
... LENGTH len
Effect
This addition determines how many characters or how many bytes of data object dobj are written to the file. len is expected to be a data object of type i that contains the number of characters or bytes. In text files, the content of len specifies the number of characters that are written from the storage. For binary files, legacy text file, and legacy binary files, len specifies the number of bytes that are written to the file. The first len characters or bytes are transferred and alignment gaps are included in the structures. If the addition LENGTH is not specified, all characters or bytes are transferred.
If the value of len is less than or equal to 0, no characters or bytes are transferred. If the file is opened as a (legacy) text file, however, a line end marker is inserted into the file by default. If the value of len is greater than the number of characters or bytes in dobj, hexadecimal 0 or blank characters are transferred to the file instead of the missing bytes or characters, depending on whether the file was opened as a (legacy) text file or a (legacy) binary file. -
How to put html file into a canevas?
How to put html file into a canevas?
Hi,
would require you to write a JavaBean that interprets the HTML (there are commercial versions of this available)
Frank -
How to upload a file into server using j2ee jsp and servlet with bean?
How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
Anyone help me please!u don't need j2ee and struts to do file uploading. An example is as such
in JSP. u use the <input> file tag like
<input type="file"....>You need a bean to capture the file contents like
class FileUploadObj {
private FormFile srcFile;
private byte[] fileContent;
// all the getter and setter methods
}Then in the servlet, you process the file for uploading
* The following loads the uploaded binary data into a byte Array.
FileUploadObj form = new FileUploadObj();
byte[] byteArr = null;
if (form.signFile != null) {
int filesize = form.srcFile.getFileSize();
byteArr = new byte[filesize];
ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
bytein.read(byteArr);
bytein.close();
form.setFileContent(byteArr);
// Write file content using Writer class into the destination file in the server.
... -
*** Question How to load a file into BI-Integrated Planning and use WAD 7.0
Hi, I created an manual DTP upload to my planning infocube and it works fine. The transformation rules convert 0CALMONTH into the relevant Calendar and Fiscal characteristics. So all of my Time Characteristics are fine, both Calendar and Fiscal.
However, When using the "How to load a file into BI-Integrated Planning and use WAD 7.0" solution, only the Calendar Characteristics are populated and not the Fiscal. The upload application somehow knows to populate the 0CALMONTH2, 0CALQUART1, 0CALQUARTER, and 0CALYEAR.
How can I get the upload to populate my Fiscal Period Characteristics?
Would it be best to modify the "Upload Application, or can I write a planning function to update the fiscal characteristics, or some other way?
Thanks!My planning data is being uploaded via the SDN Planning File Upload Solution. What I did was end up modifiying the upload class ZCL_RSPLF_FILE_UPLOAD Method EXECUTE.
I added the following code if anyone is interested.
*{ INSERT BWDK902323 1
THIS SECTION OF CODE POPULATES THE FISCAL PERIOD CHARACTERISTICS
USING THE FISCAL YEAR VARIANT 'NK' AND THE CALENDAR MONTH/YEAR
FIELD-SYMBOLS <0FISCVARNT> TYPE /BI0/OIFISCVARNT. " Fiscal Year Variant
FIELD-SYMBOLS <0FISCYEAR> TYPE /BI0/OIFISCYEAR. " Fiscal Year
FIELD-SYMBOLS <0FISCPER> TYPE /BI0/OIFISCPER. " Fiscal Year/Period
FIELD-SYMBOLS <0FISCPER3> TYPE /BI0/OIFISCPER3. " Posting Period
FIELD-SYMBOLS <0CALMONTH> TYPE /BI0/OICALMONTH. " Calendar Month/Year
ASSIGN COMPONENT '0CALMONTH' OF STRUCTURE <L_S_DATA> TO <0CALMONTH>.
ASSIGN COMPONENT '0FISCPER' OF STRUCTURE <L_S_DATA> TO <0FISCPER>.
ASSIGN COMPONENT '0FISCVARNT' OF STRUCTURE <L_S_DATA> TO <0FISCVARNT>.
ASSIGN COMPONENT '0FISCPER3' OF STRUCTURE <L_S_DATA> TO <0FISCPER3>.
ASSIGN COMPONENT '0FISCYEAR' OF STRUCTURE <L_S_DATA> TO <0FISCYEAR>.
<0FISCVARNT> = 'NK'.
CALL FUNCTION 'FISCPER_FROM_CALMONTH_CALC'
EXPORTING
IV_CALMONTH = <0CALMONTH>
IV_PERIV = <0FISCVARNT>
IMPORTING
EV_FISCPER3 = <0FISCPER3>
EV_FISCPER = <0FISCPER>
EV_FISCYEAR = <0FISCYEAR>.
*} INSERT -
How do I burn files into a CD other than by burning music through iTunes?
How do I burn files into a CD other than by burning music through iTunes?
Hi,
see here: http://support.apple.com/kb/HT1328
Happy New Year
Stefan -
How to convert jpeg files into word
How to convert jpeg files into Word
Hi Eugene,
I don't think you can convert an image to a Word document, but you could place the JPEG into a Word document using the Insert > Object command in Word.
For other questions relating to Word, you will probably have more luck getting an answer if you post on the Microsoft forums (we can help if you're using Acrobat, or another Adobe product, but you'll find the Word experts on the Microsoft forums.)
Best,
Sara -
How to create pdf files in UNIX directory from oracle reports
I would like to know how to create pdf files in UNIX directory from oracle reports.
Thanks,Please make your question more clear . Also mention the reports version.
1) If you are runnning reports in Unix, you can give
.... destype=file desformat=pdf desname=<filename>
in command line
Please refer docs below.
2) If by your question you mean
"My reports server is running in Windows but I want to ftp my files to Unix after creating it"
then the answer is that you can use pluggable destination "ftp"
.... destype=ftp desformat=pdf desname=<ftp url>
Pluggable destinations download
http://otn.oracle.com/products/reports/pluginxchange/index.html
Thanks
Ratheesh
[ All Docs ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i ]
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf -
How to add PDF files into a slides? (Flash 8)
I am new to flash and I am using Macromedia Flash 8. My task is simple enough: I need create a Presentation with Screens from PDF files: I have 10-12 PDF files which I want convert into flash presentation.
I have read this tutorial:
http://w3.id.tue.nl/fileadmin/id/objects/E-Atelier/Phidgets/Software/Flash/fl8_tutorials.p df
Chapter 11: Basic Tasks: Create a Presentation with Screens.
I'm having trouble how to add PDF files into a slides: I want insert a whole pdf file as separate slide, without splitting pdf file into separate elements: pictures, text, etc. I tried import pdf file into Flash, wheen import there is shown prompt how program should process this pdf file(add in stage, library, as keyframes, etc) , not clear which option is correct for my task. What I got is pdf file splitted into multiple images, text, - which is not what I want. I want keep PDF files without changes, preserve original design and formatting, just convert this pdf into flash, so presentation will consist of PDFs organized in correct order, then add navigation buttons and some effects. How to solve this task?Just to avoid potential confusion... PDF is an Adobe format, but Flash 8 is/was not. Flash 8 came out before Adobe bought Macromedia. Even today, I don't believe anything has been done to accomodate direct integration of PDF content in Flash.
-
How to import .pdf files into iBooks?
How to import .pdf files into iBooks?
Or send the file from your computer to your ipod by emailing yourself the pdf. Then if you open the Mail client and you open the pdf there is an option to select open in ibooks. It will save it to your device for remote viewing.
-
How to write WSDD file to deploy web service
I write a server code,I want to deploy it as service,but I don't know how to write WSDD file?I use AXIS and SOAP
I need help,thanks a lot.
Regards
William
2.24Yes, put your wsdd with your class files. But if you want AdminClient to work correctly, be sure all environement variables are set correctly.
Me, I never use it, I prefer to modify directly the server-config.wsdd -
How TO DEPLOY JAR FILES INTO XI Server using SDM
Hi XI Gurus,
im working on adapter development. we have created jar file in NWDS.
now going ahead to deploy into XI server through SDM.
can we deploy jar files directly into xiserver through SDM. or it needs to convert to any other formate like EAR, SDA. then how would i convert to SDA.
i any have clear idea on this... pls throw the ways how to convert........
JAR File to EAR format
JAR file to SDA format
EAR file to SDA format
can any one explain the procedure step by step how to convert jar file into deployment archive file in order to succesfully into XI server.
thanks i advance. points will be rewarded.
Regards
RajeshHi Rajesh,
JAR file in itself in not deployable.
So v need to envelop this jar file into an EAR file and then v deploy this EAR file on SDM.
Creating Jar
Inside NWDS --> Windows --> Open perspective --> J2EE Development --> right click on ur proj --> Build EJB Archive
Converting .EAR file to .SDA
Converting .EAR file to .SDA
Regards,
Prateek -
How to write a file using mod pl/sql
hi,
i am having a submit button in my procedure. which should inturn create .sql file in a file path.
is there any way to create a fileusing htp and htf methods.
Thanks in advance
Hari>
i am having a submit button in my procedure. which should in turn create .sql file in a file path.
is there any way to create a file using htp and htf methods.
>
Why are you wasting your time coding from scratch using the PL/SQL Web Toolkit instead of the APEX framework?
From Re: how to write a file using mod pl/sql it appears that you are not using APEX, so a number of the approaches APEX offers are not relevant. You appear to be looking for a file download solution using the <tt>wpg_docload.download_file</tt> method, such as:
create or replace procedure download_file (
p_filename in varchar2
, p_mimetype in varchar2
, p_content in out nocopy blob)
is
begin
-- Set up HTTP header.
-- Use "application/octet" as default MIME type.
owa_util.mime_header(nvl(p_mimetype, 'application/octet'), false);
-- Set the size so the browser knows how much to download.
htp.p('Content-length: ' || dbms_lob.getlength(p_content));
-- Filename will be used as default by the browser in "Save as..."
htp.p('Content-Disposition: attachment; filename="' || p_filename || '"');
-- Close header.
owa_util.http_header_close();
-- Stream the file content to the browser.
wpg_docload.download_file(p_content);
end download_file;
Maybe you are looking for
-
Is there a software that will allow me to take a video from off my screen, like a youtube vid or something? I used to have the software but must have deleted it.. what is it called???
-
Transaction Code for Marketing Attributes
Hi Experts, Can someone tell me what is the transaction code to maintain Marketing Attributes in SAP CRM 5.2? Thanks a lot,
-
Program to Insert BI Objects in a Transport
Hi Experts, I am looking for a function module/program to insert BI Objects in a transport request (i need to include this in another code). Thanks in advance for your help. Arminder
-
Hi All, I am new to web development platform. I know core java, now as I need to proceed to web development I would like to know certain concepts / languages used. Jsp - Jsp is used to develop webpages, how does it differ from html. Applets - We can
-
Does anyone from Apple support read the forum?
Just wondering cause a lot of people have unanswered threads here.