Reading File in native format and attaching it.
Hi all,
I am reading file in native format(Without schema) and wish to attach it before sending it accross.
I am assigning .csv instead of .html .
I am getting the following error
<mismatchedAssignmentFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>Cannot assign a non-element value to a message part. (The value is of type java.lang.String.)</summary>
</part></mismatchedAssignmentFailure>
How do you read the fille ?
- with a file adapter ?
- with the BPEL Extension XPath function ora:read ?
B.
Similar Messages
-
File Adapter - Native Format Builder
Dear All,
In File Adapter - Native Format Builder exists option "Number of rows to skip". But this means how many rows from beginning of file to skip,
can somebody help to define how to skip n rows from the end of file.
Thanks in advance!There is no option available to skip rows from end. But if you know how many rows are there in the file and how many you want to skip, then you can use the option of "Number of data rows to process" and process only number of rows you want to actually process.
- Achilles -
File Adapter - Native format Builder button not Appearing
Hi,
When We go through the file adapter wizard and on the screen where we define the schema, there is a button 'Native format builder'. But on Jdeveloper Version - 11.1.1.3.0, it is not appearing. Has this been removed in this release?
regards,
Rajeshat step 8 of 9 of the file adapter wizard, the icon appears as a cog, on the right, with caption "define schema for native format".
I have JDev 11..1.1.3.0
The problem might be with the version of the SOA extensions you have installed.... -
How to convert cXML dtd files into xsd format and use them into BPEL application
Hi,
In my BPEL application I have to use cXML dtd files by converting them into xsd format.
I have used 'Microsoft Visual Studio' for converting cXML.dtd file into xsd format, for this 1 dtd file I am getting three xsd files (cXML.xsd, cXML1.xsd and cXML2.xsd).
Please check this once and let me know
1. why I am getting three xsd files for one dtd file,
2. how can I use cXML.xsd file in my application, do I ll have to use all the three files in my BPEL app and
3. what should I include in main xsd file (cXML.xsd) to import other two xsd files.
kindly check this once and let me know your suggestions .
ThanksHi,
While downloading the cXML dtd there will be example xml files. Using this xml's we can generate xsd.
Regards,
KANN. -
Native format and MPEG-4 project
The recent topic called "native format" was flagged as answered so I thought I'd better start a new thread but it really follows on from it...
If I choose MPEG-4 format when I open up a new project does iMovie actually convert MPEG-4 into DV? That seems counter intuitive to say the least.
This is my situation: I have a Miglia "Evolution TV" which is a hardware encoder taking in analogue video and outputting in real time either to MPEG-2 or MPEG-4. I thought it would be a smart move to convert my VHS tapes into MPEG-4 which I can edit in iMovie and play back on the iMac. If I want to watch it on DVD I can always burn a DVD and take the hit on the lengthy conversion process if I need to.
The snag is that the output from the Miglia device is MPEG-4 but still takes an age to be imported into iMovie.
Is there a "flavour" of MPEG-4 that will import into iMovie without conversion or at least very quickly?I have found out the answer to my question:
In order to import MPEG-4 movies into an iMovie HD MPEG-4 project it must be 640 x 480 otherwise it gets transcoded.
If you are using MigliaTV you must turn off the "Overscan" mode in the on-screen menu and then the following formats will be 640 x 480: iMovie HD, Apple TV. (iPod Best is 640 x 480 whatever the Overscan setting)
This applies to the version of iMovie running on Tiger I don't know if later versions are different. -
HowTo read file from app. server and store it in binary format (SDOKCNTBIN)
Hi
I need to upload Documents to Document Repository by using to function module RSOD_DOC_MAST_CHANGE.
My question is: How can I fill the "parameter" i_t_file_content_binary from a file which is stored on an application server.
br, michaelHi
I need to upload Documents to Document Repository by using to function module RSOD_DOC_MAST_CHANGE.
My question is: How can I fill the "parameter" i_t_file_content_binary from a file which is stored on an application server.
br, michael -
Reading file from ftp server and importing data into table
Hi experts,
Well basically i have text files with different layout that have been uploaded on an ftp server. Now i have to write a procedure to fetch those files, read them and insert data in a table... can that be done?
your precious help would be greatly helpful.
Thanksdeclare
file1 UTL_FILE.FILE_TYPE;
filename varchar2(1000) := 'GTECHFILES';
str long;
begin
file1 := UTL_FILE.FOPEN (filename,'agent_dump_csv.rep','r',32767);
loop
UTL_FILE.GET_LINE ( file1, str );
--dbms_output.put_line('Value is :'||to_char(str));
end loop;
UTL_FILE.FCLOSE( file1 );
exception
when no_data_found then
dbms_output.put_line('END OF FILE');
UTL_FILE.FCLOSE( file1 ) ;
when others then
UTL_FILE.FCLOSE( file1 ) ;
dbms_output.put_line('ERROR: '||sqlcode||':'||sqlerrm) ;
end;
i have managed to write this piece of code and all lines are being read and now i need to insert data into my table and the fields are seperated by a `|` i am strill trying to figure how to do that now. help ...
Edited by: Kevin CK on 17-Jan-2010 22:40 -
Reading files from different directories and exceuting them
D:\>cd PROC_PKG_FUNC
mkdir FUNCTIONS
mkdir PACKAGES
mkdir PACKAGES_BODY
mkdir PROCEDURES
mkdir TYPES
mkdir TYPES_BODY
SQL> create directory FUNCTIONS as 'D:\PROC_PKG_FUNC\FUNCTIONS';
Directory created.
SQL> create directory PACKAGES as 'D:\PROC_PKG_FUNC\PACKAGES';
Directory created.
SQL> create directory PROCEDURES as 'D:\PROC_PKG_FUNC\PROCEDURES';
Directory created.
SQL> create directory PACKAGES_BODY as 'D:\PROC_PKG_FUNC\PACKAGES_BODY';
Directory created.
SQL> create directory TYPES as 'D:\PROC_PKG_FUNC\TYPES';
Directory created.
SQL> create directory TYPES_BODY as 'D:\PROC_PKG_FUNC\TYPES_BODY';
Directory created.
suppose,
there is a D:\PROC_PKG_FUNC directory in my local machine where the database server exists.
And in that directory there are different directories like FUNCTIONS,PACKAGES,PACKAGES_BODY,PROCEDURES,TYPES,TYPES_BODY, now I've created all the remote schemas obejcts in these folders using utl_file, with the help of the following package
SQL> CREATE OR REPLACE PROCEDURE Get_Db_Ddl_Scripts AS
2 v_file Utl_File.FILE_TYPE;
3 v_file_dir VARCHAR2(50);
4 i_first_line NUMBER := 1;
5 BEGIN
6
7 v_file_dir := 'PROC_PKG_FUNC';
8
9 FOR REC_OBJ IN
10 (SELECT DISTINCT NAME,TYPE,DECODE(TYPE,'FUNCTION','FUNCTIONS','PACKAGE','PA
CKAGES','PACKAGE BODY','PACKAGES_BODY','PROCEDURE','PROCEDURES','TYPE','TYPES','
TYPE BODY','TYPES_BODY') v_file_dir
11 FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER='FRISKDEVI41B'
12 AND TYPE IN ('FUNCTION, PROCEDURE','PACKAGE','PACKAGE BODY','TYPE'))
13 LOOP
14 v_file := Utl_File.FOPEN(location => REC_OBJ.v_file_dir,
15 filename => REC_OBJ.NAME || '.sql',
16 open_mode => 'w',
17 max_linesize => 32767);
18 i_first_line := 1;
19 FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_
OBJ.NAME AND TYPE=REC_OBJ.TYPE AND OWNER='FRISKDEVI41B' ORDER BY LINE)
20 LOOP
21 IF i_first_line = 1 THEN
22 Utl_File.PUT_LINE(v_file,'CREATE OR REPLACE ' || REPLACE(REC.TEXT,CHR(10),N
ULL));
23 ELSE Utl_File.PUT_LINE(v_file, REPLACE(REC.TEXT,CHR(10),NULL));
24 END IF;
25 i_first_line := i_first_line + 1;
26 END LOOP;
27 Utl_File.FCLOSE(v_file);
28
29 END LOOP;
30
31 END;
32 /
Procedure created.
SQL>exec Get_Db_Ddl_Scripts ;
PL/SQL procedure successfully completed.
Thus the files are created in the location.
now what i want to do is i want to read each file and run in my current schema to create these objects in my local scehma ,is that possible? Help required._ORCHYP wrote:
once these files are written in respective folders, you can open them with utl_file('read') in current schema and very well you can execute them.
Try it onceTry it as many times as you like, you won't execute the files with utl_file, that's for sure. ?:|
Using something like DBMS_SCHEDULER you could issue a one off job for each script, as that package can call o/s commands.
However, what's the point?
You may as well, in the code above, just build up your DDL commands or whatever inside your code and, rather than write them out to scripts, use the EXECUTE IMMEDIATE command to execute the DDL against the database.
Of course may not be the best thing to be doing, but we have very little information about what it is that is trying to be achieved, and no reason given why all the functions, packages etc. aren't just put together in a single script that is executed from the command line in the first place. Why try and write PL/SQL to do it? -
Reading File line by line and storing in a collection?
I'm trying to figure out how I can read a file that has a bunch of internet address.
For example:
www.google.com
www.blah.com
www.hardyharhar.com
I would like to store them either in a hashtable or a vector so I could use the address in my program. Could someone tell me the best approach to go about doing this ? Should I be using the FileInputStream or what?
ThanksNeed a little help with how to use the bufferedreader with the FileInputStream. This is what I have so far:
import java.io.*;
public class ReadFile {
private static File file;
private static FileInputStream fis;
private static BufferedReader bdr = null;
private static String record = null;
private static String str[] = new String[100];
public static void main(String[] args) {
try {
displayAddress("hosts.txt");
} catch(IOException ex) {
log("IOException in main");
public static void displayAddress(String fileName) throws IOException {
try {
FileInputStream fis = new FileInputStream(fileName);
} catch(FileNotFoundException ex) {
log("File Not Found");
bdr = new BufferedReader(new InputStreamReader(fis));
for(int i = 0; i < 100; i++) {
if(str.equals("[stop]")) break;
System.out.println(str[i]);
public static void log(String msg) {
System.out.println(msg + "\n");
The file i'm using looks like the one above:
www.google.com
www.blahblah.com
www.hardyharhar.com
[stop]
I seem to be getting a null pointer exception(my personal favorite) near the for loop. My educated guess for why is that I don't have a 100 names in the file I'm trying to read. But not sure could someone tell me how I can fix this? For right now i'm just trying to print them one by one to the output. -
Reading file in application sever
Hi all,
How to read data from a file which is in application server.The file which i have in application server is excel file ...and what delimiter we have to use to separate the columns in excel...Hi,
Hi
U need to ask a little help to your basis in order to transfer the file from pc to Server SAP.
Usually there are some paths defined to place the file for BI.
The easy solution is to convert the excel file in CSV format and transfer it to SAP Server, in this way you'll be able to work on ASCII file.
Now you need to change your program in order to replace the fm to upload the file with statament OPEN DATASET/READ DATASET and CLOSE DATASET.
Probably now you're using fm like GUI_UPLOAD, this fm inserts the data into an internal table, so your program should become:
OPEN DATASET <FILE> IN TEXT MODE.
DO.
READ DATASET <FILE> TO ITAB.
IF SY-SUBRC <> 0. EXIT. ENDIF.
APPEND ITAB.
ENDDO.
CLOSE DATASET <FILE>.
U can use fm TEXT_CONVERT_CSV_TO_SAP in order to transfer the data in CSV format in your internal table.
Reward if useful! -
Convert PO into PDF format and send by an email to vendor
We are using SAP version ECC 5.0. We want to convert SAP PO into PDF format and attached it in an email and send it to vendor. Please give me some tips to achieve this?
Thanks in advance!
MrudulaHi!
The way to achieve your goal depends on how you get PO printed - by sapscript, smartform or abap list.
As have been mentioned you can create spool request and process it. But for sapscript and smartform you can proceed without spool request - just get back OTF data from corresponding FM and convert it to PDF.
In case of smartform:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFORMNAME'
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
i_otf[] = w_return-otfdata[].
In case of sapscript:
options-tdgetotf = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
options = options
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
OTHERS = 5.
Then convert to PDF
DATA:
pdf LIKE tline OCCURS 100 WITH HEADER LINE,
v_len_in LIKE sood-objlen.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = pdf
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
Then send as attachment as Max proposed.
Regards,
Maxim. -
XML formatted Email Attachment created by CL_IXML is too big to be received
Dear all,
I followed the excellent web blog http://wiki.sdn.sap.com/wiki/display/Snippets/FormattedExcelasEmailAttachment
to pass an internal table (2MB in size, 18 columns * 6300 rows) to CL_IXML DOM and send this XML file as an formatted Excel attachment, it perfectly works, but the size of this XML attachment exceeded 8 MB, although I reduced it to 6MB successfully by simplying its Cell Attribute from
<Cell ss:StyleID="s62"><Data ss:Type="String">1E2</Data></Cell>
TO <Cell*><Data ss:Type="String">1E2</Data></Cell>.
but I cannot do the same on its Data Attribute, and it is still too big to be received by the mailbox of my third party users, is there any way to reduce it below to 3MB?
we need the attachment to be formatted Excel, and cannot request my third party receiver to do anything in Excl.
I am using ECC 6.0, 32 bit no-unicode, and SAP Gui 7.20.
looking forwarding to your reply
Peter DingYou can try zipping the file and send it as attachment.
Use the FM SCMS_XSTRING_TO_BINARY to convert the XML to Binary. Do the ZIP using the method COMPRESS_BINARY of the class CL_ABAP_GZIP.
Regards,
Naimesh Patel -
Lines appear on technical illustrations (whose native format is CGM) after printing
Good morning everybody.
I'm a technical author and since many years, We've got always and always the same problems when we publish the customer's technical manuals.
We work with SGML and XML files and CGM files for the illustrations.
When the update of the technical documents is done, we print the document for the customer.
There's 2 years, we used distiller to convert the files towards PDF format and nowadays, we use Adobe pdf (converter).
In the past (my ancient company), we had two problems: Straight lines on the illustrations IN the pdf and on the printing.
But it would be too easy if these lines appeared always at the same locations !
No ! They appear randomly...
So we have tried a lot of solutions:
- Check and try other export parameters for the generation of the CGM (in the drawing software but we have hands tied because of normes),
- Print with different printers (because we had and have 3 or four different printers),
- Print, for every printer, the post script drivers and the other driver.
- Generate new pdf files with different distiller issues
- Print the file with different acrobat or reader issues...
But the result is always the same: there's some straight lines on some illustrations.
In my new company, with the electronic technical documentation, we don't have to publish.
But with the previous generation of documentation or for validation purpose, we have to publish and print.
And todays, it's always the same problem: lines appear on illustrations but not in the pdf file. Only on the printing.
This bug is old like the world but as I work with formats that are not common (SGML, XML, CGM: common for technical authoring but not for the people), I don't find any discussion or question about my problem.
I saw problems which look like similary but in these kind of bugs, it's important to be accurate and pdf is a final format for so many formats before the conversion...
What's the matter ?
Is there a issue or are we compulsary to have this troubles for the eternity ?
It's boring.
The publication is a non-value added work and we spend hours and hours to publish documents which make us loose money and time.
Todays, I'm going to try to put a area (rectangle) with a white background to, perhaps, hide these unwanted lines. I hope the area will be pasted at the same location without to move and adjust it or else I kill a dog !
I must do that on all illustrations (if it works) of the document because the problem appear randomly and on the screen where these lines doesn't appear: very, very boring when you are prefessionnal (and even for a particular).
I tried to print with the 3 different printers and with acrobat 7.0 and Reader 10: with no effect...
So I really hope that I will find an answer on this forum.
Thanks for your answers and for the time you spent to read me.
Best regards.Hi,
Is this problem only affect Word program with Electronic Signatures?
Please try to test Printing with different printer drivers.
If the Word printing problem occurs only when you print documents with a certain font or a certain type of graphics image, try to print to another printer.
If no other printer is available, contact the manufacturer to find out whether there is an updated version of the driver or a different driver that works with your printer model.
You may also follow other methods in this KB article troubleshoot print issue in word:
http://support.microsoft.com/kb/826845
Best regards.
William Zhou
TechNet Community Support -
Giving file path in unix and windows
hi,
i'm having problem with reading file from both windows and unix as now i give
if (os == win)
file="mydir\\mydir1\\myfile"
else
file="mydir/mydir1/myfile"
wherei get mydir* from environment.
and then open that file.
but i feel the above is clumsy and is more like C #ifdef
Can you please help me out on this.
Thanks & Regards
Rajkumarhi,
use the System property "file.separator" to figure out the seperator.
for eg
java.util.Properties prop = System.getProperties();
String separator = prop.getProperty("file.separator");
System.out.println("separator :" + separator);hope that helpz
cheerz
ynkrish -
New to J2ME, dont know how to read files on phone mem
i check all the .io packages, still cant find any class that would help me to read files on phone memory.
and i see that javax.microedition.media.Manager.createPlayer(String locator), require a string input argu. how can i make this string locator point to a media file on phone memory of TF-card.
i heard Kjava has some packages from j2se, is there any class would help me? plz someone give me a link of Kjava reference, i cant find it anywhere, thx a lot!oh~~~no!
i am afraid i cant enjoy myself with file conn.
i tried several times, only to get a "Security Exception", and i contacted with moto dev center, they say that unless i have a cert, i cant use file conn API and many other APIs that is defined as restricted!!!
and for the cert, if i have a biz relation with moto, they could give a "Develop Certification", or i must pay a third party to get a cert...
what a world~~~~~~~~~~~is unfair!!!
Maybe you are looking for
-
I am trying to view an iMovie I made on my iPad 2 on my tv. I bought a a av digital output kit and when I plug it i to the tv I only get sound. Not sure what I'm doing wrong so any help would be great.
-
Hi All Im using Windows 2003 professional J2SDK 1.3.0, J2SDKEE1.2.1 Please help me in this...can't able to start the server. When I gave j2ee -verbose, it gave the following result. D:\>j2ee -verbose J2EE server Listen Port: = 1049 org.omg.CORBA.INTE
-
Hi All, In the last two months, we have observed that due to OS upgrade issues and some java script issues, some of the PSE 8 Mac users were not able to go past "Checking System Profile" check initialization dialog after 80-90% progress and installer
-
iTunes was working fine until I installed an update iTunes promted me to install. iTunes has never ran since. Since the update the below error occurs when trying to start iTunes. The instruction at "0x10001040" referenced memory at "0x10001040". The
-
SBOP BI Platform Servers 4.0 SP02 Patch 11
Hello, Does any of the experts know when will SBOP BI Platform Servers 4.0 SP02 Patch 11 Release Notes be available? We really must know when it will be available... Thank you! Ricardo Russo