How to convert raw data to wav files??
Hi AnyOne,
Can anyone know how to do convert raw data in hex format into wav file format??
Please show some guideline.
Thank You.
Hi Craig,
Thanks for the reply.
I do follow according the the wav creation standard and save it as wav file. However, i still fail to read back the wav file.
I using LV8.2. Attach with my testvi and data. Please guide if i make any mistake in my testvi
Thx and Regards,
Simon76
Attachments:
data.txt 7 KB
testvi.JPG 39 KB
header.txt 1 KB
Similar Messages
-
How to convert raw data to original data
Hi,
I'm using db10g.
I have stored the blob of a word doc into the database using dbms_lob package.
Now during retrieval, i'm getting the raw data using the code
dbms_lob.read( l_lob, l_amt, l_off, l_raw );
l_raw is of type raw.
I want to convert the raw data to original string.
Please Help
ThanksDivya wrote:
I think I have clearly told that i have blobs of different files in my database.
The files are of different type, I have blob of pdf,doc,html,xml,gif etc...
and in the procedure i have posted(get_file_contents), it is a database procedure and i'm calling it from the forms.
So i'm passing the file_name and file_id to the procedure(file_name and file_id are the columns in the table.
Table 'Blob_Details' have 4 columns file_id,file_name,file_type,theblob) and a varchar variable final_data.
final_data varchar(32000)
and in the procedure i'm taking the blob from database, reading it using dbms_lob.read in a loop and casting it to varchar and storing the contents in the variable final_data.
So coming out of the loop, the variable final_data will have the contents of the given file.BLOB data (such as word or excel documents and PDFs containing images etc.) are Binary data, not Character data. Converting that raw binary data to VARCHAR will cause issues.
If you have loaded a binary file and stored it on the database as a BLOB (Binary data) and you now want to create the original file from that BLOB, you will simply need to read the BLOB data from the database into BLOB variable and process it in chunks, using UTL_FILE to write out, in Binary mode, that data to a file with the appropriate filename. The actual process is quite simple...
As sys user:
CREATE OR REPLACE DIRECTORY MY_FILES AS 'c:\myfiles';
GRANT READ,WRITE ON DIRECTORY MY_FILES TO myuser;As myuser:
DECLARE
-- Data Variables
v_blob BLOB;
v_data_length NUMBER;
-- Loop Control Variables
v_offset NUMBER := 1;
v_chunk CONSTANT NUMBER := 32767; -- maximum chunk size
-- UTL_FILE variables
fh UTL_FILE.file_type;
BEGIN
v_blob := ... populate the blob variable here
v_data_length := DBMS_LOB.getlength (v_blob);
-- Open the file
fh := UTL_FILE.fopen ('MY_FILES', 'myfile.dat', 'wb', v_chunk);
LOOP
-- Exit when our file offset is bigger than our file
EXIT WHEN v_offset > v_data_length;
-- Write the output chunk by chunk
UTL_FILE.put_raw (fh, DBMS_LOB.SUBSTR (v_blob, v_chunk, v_offset), TRUE);
-- Increment the offset by the amount written
v_offset := v_offset + v_chunk;
END LOOP;
-- Close the file
UTL_FILE.fclose (fh);
END; -
How to Convert Binary Data in Binary File
hi,
my telecom client puts a binary file which is asn.1 encoded with BER.
how to handle binary data in java.
how to convert binary to hexa to ascii format
how to convert binary to octet to ascii format
please help me in this.
regards,
s.mohamed asifYou don't need to convert the data.
Only you can do is print it in that formats, like it:
public static String byteArrayToHex(byte[] b) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < b.length; i++)
sb.append(Integer.toHexString(b&255) + " ");
return sb.toString();
take a look at this
http://java.sun.com/docs/books/tutorial/essential/io/ -
How to convert SAPScript data to Excel file
Hi Experts,
Curenntly I am converting SAP Script data to PDF file and send an e-mail with attachment (PDF file).
Same like this, is that possible to covert thda Script data to Excel file to send mail with attachment.???
If, yes please sugget with respective Function Modules.
Thanks In Advance.
Best Regards.Hi,
Thanks for response, Here providing more inforamation.
Presently my report displaying Customer information. As per user requirement, coverting the Script data to PDF by using
CALL FUNCTION 'CONVERT_OTF_MEMORY'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = doc_size
TABLES
lines = htline.
Now user want to add two radiobuttons on selection screen for PSF file & Excel file
If user seleacts Excel fiel radio button, then I need to covert the SAP Script data to Excel file lik I have done for PDF.
I'd like to know is that possible covert the Script data to Excel file. If yes, suggest with FMs or process.
Best Regards. -
How to convert raw data into pdf ?
Hi everyone,
I have a requirement where I have to print the document present in application server.
I used below code to do this
* Open the file in binary mode
OPEN DATASET gv_filepath FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
DO.
TRY.
* Since the file is opened in Binary mode, the entire contents of the
* file is read in one go!
READ DATASET gv_filepath INTO gv_filedata.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CATCH cx_sy_conversion_codepage.
ENDTRY.
APPEND gv_filedata TO gt_file_table.
CLEAR gv_filedata.
ENDDO.
CLOSE DATASET gv_filepath.
DESCRIBE TABLE gt_file_table LINES lv_lines.
lv_pages = lv_lines.
lv_dest = 'LP01'.
lv_spoolname = 'LOCW'.
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
* NAME = lv_spoolname
DEST = lv_dest
ROWS = lv_lines
STARTROW = 1
PAGES = 99
RQTITLE = 'Print Spool'
RQCOPIES = 1
RQOWNER = sy-uname
IMMEDIATELY = ' '
IMPORTING
RQID = lv_spoolid
TABLES
TEXT_DATA = gt_file_table
EXCEPTIONS
NAME_MISSING = 1
NAME_TWICE = 2
NOT_FOUND = 3
ILLEGAL_LAYOUT = 4
INTERNAL_ERROR = 5
SIZE_MISMATCH = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
Passed the spool id generated to below FM but it is not converting into pdf
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = lv_spoolid
NO_DIALOG = ' '
DST_DEVICE = 'LOCW'
PDF_DESTINATION = 'X'
* NO_BACKGROUND =
* GET_SIZE_FROM_FORMAT =
* USE_CASCADING = ' '
* IMPORTING
* PDF_BYTECOUNT = lv_bytecount
* PDF_SPOOLID = lv_pdf1
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
* BIN_FILE = lv_pdf
TABLES
PDF = lt_pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
When I go to SP01 and check the spool generated it is in raw document type.
How can I convert this raw document to pdf type ??
Please help me to resolve this.
Regards,
KrishnaOk, since I can't edit the post anymore, here the new version of code, without the use of SCMS_XSTRING_TO_BINARY for intermediate table. Reasons: effectively doubles the memory use and I don't want to check if the kernel is cutting off the hexdecimal nulls when the last spool line is written, or to relay of that behaviour.
Matthew Billingham, and other mods: it would be really nice if you could hide the old version please (this post here). The number of google results for that FM is scary and I really don't want to contribute to promoting its use...
REPORT zjbtst2.
PARAMETERS: p_file TYPE string
LOWER CASE
DEFAULT '/usr/sap/....'
OBLIGATORY.
PARAMETERS: p_dest TYPE rspopname
DEFAULT 'LP01'
OBLIGATORY .
PERFORM main USING p_file p_dest.
*& Form main
FORM main
USING
i_file TYPE string
i_dest TYPE rspopname.
DATA: lo_handle TYPE REF TO cl_rspo_spool_handle .
DATA: l_spoolid TYPE rspoid.
DATA: l_content TYPE xstring .
DATA: l_message_text TYPE string .
PERFORM get_file USING i_file CHANGING l_content .
PERFORM new_spool USING i_dest CHANGING lo_handle l_spoolid.
PERFORM write_spool USING lo_handle l_spoolid l_content .
l_message_text = |Spool { l_spoolid } created| .
MESSAGE l_message_text TYPE 'I' .
ENDFORM . "main
*& Form get_file
FORM get_file
USING i_file TYPE string
CHANGING c_content TYPE xstring.
DATA: l_message_text TYPE string .
CLEAR c_content .
OPEN DATASET i_file FOR INPUT IN BINARY MODE
MESSAGE l_message_text.
IF sy-subrc NE 0 .
MESSAGE l_message_text TYPE 'E' .
ELSE.
READ DATASET i_file INTO c_content .
CLOSE DATASET i_file.
ENDIF .
ENDFORM . "get_file
*& Form new_spool
FORM new_spool
USING
i_destination TYPE rspopname
CHANGING
co_handle TYPE REF TO cl_rspo_spool_handle
c_spoolid TYPE rspoid .
cl_rspo_spool_handle=>open(
EXPORTING
dest = i_destination
name = 'Test'
layout = 'G_RAW'
doctype = 'BIN'
IMPORTING
ref = co_handle
spoolid = c_spoolid
EXCEPTIONS
device_missing = 1
name_twice = 2
no_such_device = 3
operation_failed = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM . "new_spool
*& Form WRITE_SPOOL
FORM write_spool
USING
io_handle TYPE REF TO cl_rspo_spool_handle
i_spoolid TYPE rspoid
i_content TYPE xstring .
DATA: l_buffer(128) TYPE x ."Hmm, 128 does work, 4096 doesn't...
DATA: l_buffer_length TYPE i .
DATA: l_full_buffers_count TYPE i .
DATA: l_part_buffer_length TYPE i .
DATA: l_offset TYPE i .
DATA: l_length TYPE i .
l_buffer_length = xstrlen( l_buffer ) .
l_full_buffers_count = xstrlen( i_content ) DIV l_buffer_length .
l_part_buffer_length = xstrlen( i_content ) MOD l_buffer_length .
DO l_full_buffers_count + 1 TIMES .
IF sy-index LE l_full_buffers_count .
l_length = l_buffer_length .
ELSEIF l_part_buffer_length GT 0 .
l_length = l_part_buffer_length .
ELSE.
EXIT .
ENDIF .
l_buffer = i_content+l_offset(l_length) .
ADD l_length TO l_offset .
io_handle->write_binary(
EXPORTING
data = l_buffer
length = l_length
EXCEPTIONS
not_open = 1
operation_failed = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDDO .
io_handle->close(
EXPORTING
final = 'X'
EXCEPTIONS
operation_failed = 1
already_closed = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM . "write_spool -
How to convert Raw data to string in Unicode conversion
Hi All,
I want to convert my report in Unicode while conversion we are getting error as "The key of internal table "IRESBD" contains components of type "X" or "XSTRING". The "READ TABLE IRESBD" statement is not permitted for such tables"
Regards,Thanks for reply ,
I tried to use the FM but not able to get any value ? is this FM converts all internal table or used to convert one field value.
My report is Unicode so i need to internal table while reading Internal table which contains fiield as GUID_16 type Raw is showing error.
Regards, -
HOW TO CONVERT RAW FILES TO JPEG RGB 8 BIT in iphoto
Can someone please tell me how to convert RAW files to jpeg RGB 8 bit in iphoto on an iMac?
How are you trying to "export to Mypics"? The only way to get a Raw out of iPhoto is to export with the Kind set to Original.
Regards
TD -
How to convert raw files from new fujifilm x-t1 ?
how to convert raw files from new fujifilm x-t1 ?
The work around of converting the CR2 to dng either with the dng converter or ACR 6.7 will allow working in LR and CS5 but not with the latest raw conversion engine from Adobe i.e PV 2012.
Remember to keep a copy of the CR2 files if you wish to utilize the Canon software. -
Audio capture and converting the audio data to .wav file
hi,
i am new to applet and javax.sound and trying to build online recorder SDK in applet. I could captured the audio data and play the sound from microphone and also store the audio data to .wav file successfully. But when try to play that file from Window Media Player, i got the message "Windows Media Player cannot play the file. The file is either corrupt or the Player does not support the format you are trying to play." I have tried it all in different way but it's not working for last 5-6 days. Is there anyone who could help me , my work is stocked b'coz of this.
Thanksthis is the thread in which i am storing the audio data from audio stream to .wav file
class CaptureThread extends Thread{
public void run(){
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File audioFile = new File("junk.wav");
try{
final AudioFormat format = getFormat();
line.open(format);
line.start();
AudioSystem.write(
new AudioInputStream(line),
fileType,audioFile);
}catch (Exception e){
e.printStackTrace();
}//end catch
}//end run
}//end inner class CaptureThread -
How is the Raw data used in iPhoto? I currently shoot both jpeg and raw and import them both into iPhoto. What do I gain by collecting Raw data?
ThanksYou get more parameters for making adjustments to the image. This is not really an iPhoto question but more a general photography one. In rather simple terms here's how a digital camera works:
You expose an image. A lot of data is gathered in by the sensor. But it's just a bug lump of data and not very useful in that form.
In cameras that shoot jpeg that mass of data is interpreted/processed into an actual image, and the image is stored in a jpeg file. (that's a process broadly analogous to developing a film). The decisions that go into making that interpretation are all made by an engineer somewhere, back when the camera was developed.
If you shoot Raw, then what you do is take that mass of data, and rather than working to the decisions made by that engineer, you develop the shot - you run the digital darkroom.
Why would you do this? Take on all this extra work? Well one of three reasons: a: you think you can do a better job than that engineer. b: you just prefer the result you get when you develop yourself or c: you're a hopeless shooter and raw means you have more options to fix the mistakes you made in the camera. (That's why I do it.)
Here endeth the two dollar tour. So, basically, if you're happy with what your camera produces in Jpeg then there's really no need to shoot Raw.
There's no need at all to shoot Raw+Jpeg as iPhoto creates a jpeg preview when you import, so you're just wasting space. -
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com -
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. -
How to load the data from .csv file to oracle table???
Hi,
I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
Thanks in advance981145 wrote:
Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
the command is
sqlldrType it and see if you have it installed.
Have a look also at the FAQ link posted by Marwin.
There are plenty of examples also on the web.
Regards.
Al -
How to load the data from excel file into temprory table in Forms 11g?
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,
SachinDeclare
v_full_filename varchar2(500);
v_server_path varchar2(2000);
v_separator VARCHAR2(1);
v_filename VARCHAR2(400);
filename VARCHAR2 (100);
v_stop_load varchar2 (2000);
v_rec_error_log varchar2(4000);
v_error_log varchar2(4000);
ctr NUMBER (12);
cols NUMBER (2);
btn number;
RES BOOLEAN;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
cellType ole2.OBJ_TYPE;
args ole2.obj_type;
PROCEDURE olearg
IS
args ole2.obj_type;
BEGIN
args := ole2.create_arglist;
ole2.add_arg (args, ctr);
ole2.add_arg (args, cols);
cell := ole2.get_obj_property (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
END;
BEGIN
v_full_filename := client_get_file_name(directory_name => null
,file_name => null
,file_filter => 'Excel files (*.xls)|*.xls|'
||'Excel files (*.xlsx)|*.xlsx|'
,message => 'Choose Excel file'
,dialog_type => null
,select_file => null
If v_full_filename is not null Then
v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
v_filename := v_separator||v_full_filename ;
:LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);
RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));
--Begin load data from EXCEL
BEGIN
filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', 'false');
workbooks := ole2.get_obj_property (application, 'Workbooks');
args := ole2.create_arglist;
ole2.add_arg (args, filename); -- file path and name
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'Sheet1');
worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
ole2.destroy_arglist (args);
ctr := 2; --row number
cols := 1; -- column number
go_block('xxx');
FIRST_RECORD;
LOOP
--Column 1 VALUE --------------------------------------------------------------------
olearg;
v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
:item1 := v_stop_load;
cols := cols + 1;
--Column 2 VALUE --------------------------------------------------------------------
olearg;
:item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
cols := cols + 1;
--<and so on>
ole2.invoke (application, 'Quit');
ole2.RELEASE_OBJ (cell);
ole2.RELEASE_OBJ (worksheet);
ole2.RELEASE_OBJ (worksheets);
ole2.RELEASE_OBJ (workbook);
ole2.RELEASE_OBJ (workbooks);
ole2.RELEASE_OBJ (application);
END;
--End load data from EXCELPlease mark it as answered if you helped. -
How to load the data from excel file into table in oracle using UTL_FI
How to load the data from excel file into table in oracle
and from table to excel file
using UTL_FILE package
Please give me some exampleThis is something i tried in oracle apex
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Regards,
CKLP
Maybe you are looking for
-
Deployed application does not contain javascript files
Hello, I am a unexperienced user of the BPM Studio. When I start my application in Oracle BPM my application does not contain the javascript files. It is quite weird, because the path to the .js files is proper - the application works on other comput
-
Where can acrobat 9.0 be downloaded, seems all I can find are patches
Where can acrobat 9.0 be downloaded, seems all I can find are patches
-
Please if somebody can help. My TNS Listener is running and database us up.Connecting to portal home page is giving me "Proxy log on failed" together with the message "TNS could not resolve service name" In http://192.168.1.101/pls/portal30/admin_/da
-
Exporting movie file from iPhoto
I have a Panasonic Lumix that takes both still photos and movies. The movies and still photos are transferred from the memory card to iPhoto. I would like to use some of the movie clips (.mov format) in an iMovie project. I transferred the movie file
-
5800 after software update. Phone black screen and...
I use nokia Ovi software to update my 5800 after update when i turn on my phone it keep vibrating none stop, the screen is black. When i call your customer care they advice me to call the local care centre and they are charging me $50 for the checkin