Read velocity from QUAD-510 using single phase sensor
Hello, for my application I'm using a proximity sensor to count pulses using the CTR-400. To obtain velocity, I can make some calculations based on frequency or period but I was wondering if I can delegate this annoying task to the QUAD-510 module At the moment I'm able to read velocity using an encoder, but what if I use a single phase sensor like a proximity?
Hi,
Take a look at this document that talks about measurement with single phase and QUAD-510:
http://digital.ni.com/public.nsf/allkb/5E1CBFCBF821822686256CBB005B5305?OpenDocument
Best regards
Luca Gallo
Sales Engineer
Attachments:
PID Velocity Control.vi 34 KB
Similar Messages
-
Read date from an email using sender mail adapter.
Hi All,
I am working on a scenario, which reads emails from mail box using POP3 protocol and Mail adapter. How to get the mail attributes like received date? I have to take some decisions based on that field.
Also can we tell to move that mail to different folder in that mail box after successfully read? it is like archiving folder in that mail box.
Regards,
HariHi Hari,
You use IMAP4 (Internet Message Access Protocol) to retrieve e-mails from a folder of an e-mail server.
You use POP3 (Post Office Protocol Version 3) to retrieve e-mails from an e-mail server.
AFAIK, you have to use IMAP4 protocol for moving email to another folder are reading email successfully. And i don't think POP3 will allow this functionality.
Regarding email date , If you maintain Message protocol as XIPAYLOAD you will receive all header details(Subject , TO ,FROM ,CC,DATE ,etc ) in your payload.
Thanks
Hari. -
Read data from ODS table using value mapping
hi all;
can anyone help on how to read data from ODS table using value mappingMudit,
Take a look at this blog,
<a href="/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler">DB Lookup in Mapping</a>
Regards,
Bhavesh -
Data retrieval from JMS queue using single SOA composite in a clustered env
Hi,
I have following situation:
1) A requester SOA composite (Composite1)is reading data from a File
2) Mediator is routing data received from Composite1 and writing in a JMS queue.
3) A provider composite (Composite2) is reading from the JMS queue.
Both Composite1 and Composite2 is deployed in a clustered environment.
Problem is Composite2 is not able to read data sequentially from JMS Queue sometime (for example out of 30000 transactions its failing once). Here it's a queue and only one producer and only one consumer is there.
What may cause this issue? I thought a single producer and single consumer on a queue will guarantee FIFO retrieval . Could you please advise where may be the gap?
Thanks
Edited by: user1054373 on Sep 18, 2012 11:29 PMHi,
I thought a single producer and single consumer on a queue will guarantee FIFO retrieval Java Message Service Specification does not guarantee ordered message delivery when applications use distributed queues...
Using Weblogic Message Unit-of-Order may solve your issue...
http://docs.oracle.com/cd/E23943_01/web.1111/e13727/uoo.htm#JMSPG389
Hope this helps...
Cheers,
Vlad -
Reading data from flat file Using TEXT_IO
Dear Gurus
I already posted this question but this time i need some other changes .....Sorry for that ..
I am using 10G forms and using TEXT_IO for reading data from flat file ..
My data is like this :-
0|BP-V1|20100928|01|1|2430962.89|27|2430962.89|MUR|20100928120106
9|2430962.89|000111111111|
1|61304.88|000014104113|
1|41961.73|000022096086|
1|38475.65|000023640081|
1|49749.34|000032133154|
1|35572.46|000033093377|
1|246671.01|000042148111|
Here each column is separated by | . I want to read all the columns and want to do some validation .
How can i do ?
Initially my requirement was to read only 2 or 3 columns so i did like this ...
Procedure Pay_Simulator(lfile_type varchar2,lac_no varchar2,lcur varchar2,lno_item number,ltotal number,ldate date,lpay_purp varchar2,lfile_name varchar2)
IS
v_handle utl_file.file_type;
v_filebuffer varchar2(500);
line_0_date VARCHAR2 (10);
line_0_Purp VARCHAR2 (10);
line_0_count Number;
line_0_sum number(12,2);
line_0_ccy Varchar2(3);
line_9_sum Number(12,2);
line_9_Acc_no Varchar2(12);
Line_1_Sum Number(12,2);
Line_1_tot Number(15,2) := 0;
Line_1_flag Number := 0;
lval number;
lacno varchar2(16);
v_file varchar2(20);
v_path varchar2(50);
Begin
v_file := mcb_simulator_pkg.GET_FILENAME(lfile_name); -- For the file name
v_path :=rtrim(regexp_substr( lfile_name , '.*\\' ),'\'); For the Path
v_path := SUBSTR (lfile_name,0, INSTR (lfile_name, '\', -1));
v_handle := UTL_FILE.fopen (v_path, v_file, 'r');
LOOP
UTL_FILE.get_line (v_handle, v_filebuffer);
IF SUBSTR (v_filebuffer, 0, 1) = '0' THEN
SELECT line_0 INTO line_0_date
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
SELECT line_0 INTO line_0_Purp
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 4;
SELECT line_0 INTO line_0_count
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 7;
SELECT line_0 INTO line_0_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 8;
SELECT line_0 INTO line_0_ccy
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 9;
ELSIF SUBSTR (v_filebuffer, 0, 1) = '9' THEN
SELECT line_9 INTO line_9_Acc_no
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_9, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
SELECT line_9 INTO line_9_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_9, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 2;
ELSIF SUBSTR (v_filebuffer, 0, 1) = '1' THEN
line_1_flag := line_1_flag+1;
SELECT line_1 INTO line_1_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_1, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
Line_1_tot := Line_1_tot + line_1_sum;
END IF;
END LOOP;
DBMS_OUTPUT.put_line (Line_1_tot);
DBMS_OUTPUT.PUT_LINE (Line_1_flag);
UTL_FILE.fclose (v_handle);
END;
But now how can i do ? Shall i use like this select Statement for all the columns ?Sorry for that ..
As per our requirement ...
I need to read the flat file and it looks like like this .
*0|BP-V1|20100928|01|1|2430962.89|9|2430962.89|MUR|20100928120106*
*9|2430962.89|000111111111|*
*1|61304.88|000014104113|*
*1|41961.73|000022096086|*
*1|38475.65|000023640081|*
*1|49749.34|000032133154|*
*1|35572.46|000033093377|*
*1|246671.01|000042148111|*
*1|120737.25|000053101979|*
*1|151898.79|000082139768|*
*1|84182.34|000082485593|*
I have to check the file :-
Validation are 1st line should start from 0 else it should raise an error and insert that error into one table .
The for 2nd line also same thing ..it should start from 9 else it should raise an error and insert that error into one table .
Then the 3rd line should start from 1 else it should raise an error and insert that error into one table .
After that i have to do a validation like i will read the 1st line 2nd column .. It should be like this BP-V1 else raise an error and insert that error to a table . Then i will check the 3rd column which is 20100928 , it should be YYYYMMDD format else same thing ERROR.
Then like this for all columns i have different validation .......
Then it will check for the 2nd line 3rd column . this is an account no .1st i will check it should be 12 char else ERROR .Then I will check that what user has imputed in the form.Like for example User putted 111111111 then i will check with this 000111111111 which is there in the 2nd line . I have to add 000 before that Account no which user imputed .
Then the lines which is starting from 1 , i have to take all the 2nd column for all the lines which is starting from 1 and i have to do a sum . After that i have to compare that sum with the value in the 1st lines ( Starting from 0) 6th column . It should be same else ERROR ...
Then same way i have to count all the lines which is starting from 1 . Then i have to compare with the 7th column of 1st line . It should be same . Here in this file it should be 9.
MY CODE IS :-
Procedure Pay_Simulator(lfile_type varchar2,lac_no varchar2,lcur varchar2,lno_item number,ltotal number,ldate date,lpay_purp varchar2,lfile_name varchar2)
IS
v_handle TEXT_IO.file_type;
v_filebuffer varchar2(500);
line_0_date VARCHAR2 (10);
line_0_Purp VARCHAR2 (10);
line_0_count Number;
line_0_sum number(12,2);
line_0_ccy Varchar2(3);
line_9_sum Number(12,2);
line_9_Acc_no Varchar2(12);
Line_1_Sum Number(12,2);
Line_1_tot Number(15,2) := 0;
Line_1_flag Number := 0;
lval number;
lacno varchar2(16);
v_file varchar2(20);
v_path varchar2(50);
LC$String VARCHAR2(50) ;--:= 'one|two|three|four|five|six|seven' ;
LC$Token VARCHAR2(100) ;
i PLS_INTEGER := 2 ;
lfirst_char number;
lvalue Varchar2(100) ;
Begin
v_file := mcb_simulator_pkg.GET_FILENAME(lfile_name); For the file name
v_path :=rtrim(regexp_substr( lfile_name , '.*\\' ),'\'); For the Path
--v_path := SUBSTR (lfile_name,0, INSTR (lfile_name, '\', -1));
Message(lfile_name);
v_handle := TEXT_IO.fopen(lfile_name, 'r');
BEGIN
LOOP
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
--Message('First Char '||lfirst_char);
IF lfirst_char = '0' Then
Loop
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
Message('VAL - '||LC$Token);
lvalue := LC$Token;
EXIT WHEN LC$Token IS NULL ;
i := i + 1 ;
End Loop;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (9999,'0002','First line should always start with 0');
Forms_DDL('Commit');
raise form_Trigger_failure;
End if ;
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
--Message('Row '||LC$Token);
IF lfirst_char = '9' Then
Null;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (8888,'0016','Second line should start with 9');
Forms_DDL('Commit');
raise form_Trigger_failure;
End IF;
LOOP
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
--Message('Row '||LC$Token);
IF lfirst_char = '1' Then
Null;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (7777,'0022','The third line onward should start with 1');
Forms_DDL('Commit');
raise form_Trigger_failure;
End if;
END LOOP;
--END IF;
END LOOP;
EXCEPTION
When No_Data_Found Then
TEXT_IO.fclose (v_handle);
END;
Exception
When Others Then
Message('Other error');
END;
I am calling the FUNCTION which you gave SPLIT as mcb_simulator_pkg.Split. -
How to read records from Relationship table using ABAP API's
Hi All,
I need to retrieve the records from Relationship table. In Java API's I came to know there is an option to retrieve this. I could not find anything in ABAP API's. Is there any option in ABAP API's to do this.
Please Suggest.
Thank You,
Gajendra.Hi Gajendra,
You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
You will find all these methods in the following interface
Interface : IF_MDM_CORE_SERVICES
Hope it helps.
*Please reward points if found useful.
Thanks and Regards
Nitin Jain -
Read records from VALUES OBJECT using the INTERATOR
Hi
I'm trying to read records from my value object with interator these way:
ValidaUsu usuVO = new ValidaUsu();
for (Iterator it = usuVO it.hasNext(); ) {
System.out.println(" User from VO: " + usuVO.getUsuario());
But i don't know what i`m doing wrong ?
Could help me?
ThanksHi Gajendra,
You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
You will find all these methods in the following interface
Interface : IF_MDM_CORE_SERVICES
Hope it helps.
*Please reward points if found useful.
Thanks and Regards
Nitin Jain -
Trouble reading data from GPIB instrument using VISA
Hello, I am having trouble with reading data from a GPIB instrument in LabVIEW. It appears that the data that is returned from VISA read is incorrect. (I used NI Spy to verify what it should be and what I get, they are different) The odd thing is that when I use the VISA interactive control utility to get the data, it works perfectly. Is there some sort of VISA property that I need to set to get it to work right? Writing to the device seems to work correctly. If you need more info, please e-mail me @ [email protected] Thanks in advance!
What exactly do you mean when you say the data you are getting is incorrect? I'm guessing that you are dealing with some sort of data type issue. The VISA Read VI will return a set number of bytes in string (ASCII) format. If you are expecting a different data type, you will have to do some conversion by either using a type cast or string conversion function. The type cast function can be found in the Advanced-> Data Manipulation palette, while the string conversion functions can be found in the String palette.
-
Reading values from JTextField and using them?
Hello,
I am trying to make a login screen to connect to an oracle database. Im pretty new to creaing GUI. I need help with reading the values from the JTextField and to be able to use them for my connection. So do I need to apply a listener? How do I go about doing that in this project. Thanks for any code or advice.
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.sql.*;
public class UserDialog
String databaseURL;
String driver;
String database;
String username;
String password;
String hostname;
String port;
UserDialog() {
getInfo();
static String[] ConnectOptionNames = { "Login", "Cancel" };
static String ConnectTitle = "Login screen";
public void getInfo() {
JPanel connectionPanel;
JLabel databaseURLLabel = new JLabel("Database URL: ", JLabel.LEFT);
JTextField databaseURLField = new JTextField("");
JLabel driverLabel = new JLabel("Driver: ", JLabel.LEFT);
JTextField driverField = new JTextField("");
JLabel databaseLabel = new JLabel("Database: ", JLabel.LEFT);
JTextField databaseField = new JTextField("");
JLabel usernameLabel = new JLabel("User Name: ", JLabel.LEFT);
JTextField usernameField = new JTextField("");
JLabel passwordLabel = new JLabel("Password: ", JLabel.LEFT);
JTextField passwordField = new JPasswordField("");
JLabel hostnameLabel = new JLabel("Host Name: ", JLabel.LEFT);
JTextField hostnameField = new JTextField("");
JLabel portLabel = new JLabel("Port: ", JLabel.LEFT);
JTextField portField = new JTextField("");
connectionPanel = new JPanel(false);
connectionPanel.setLayout(new BoxLayout(connectionPanel,
BoxLayout.X_AXIS));
JPanel namePanel = new JPanel(false);
namePanel.setLayout(new GridLayout(0, 1));
namePanel.add(databaseURLLabel);
namePanel.add(driverLabel);
namePanel.add(databaseLabel);
namePanel.add(usernameLabel);
namePanel.add(passwordLabel);
namePanel.add(hostnameLabel);
namePanel.add(portLabel);
JPanel fieldPanel = new JPanel(false);
fieldPanel.setLayout(new GridLayout(0, 1));
fieldPanel.add(databaseURLField);
fieldPanel.add(driverField);
fieldPanel.add(databaseField);
fieldPanel.add(usernameField);
fieldPanel.add(passwordField);
fieldPanel.add(hostnameField);
fieldPanel.add(portField);
connectionPanel.add(namePanel);
connectionPanel.add(fieldPanel);
// Connect or quit
databaseURL = databaseURLField.getText();
driver = driverField.getText();
database = databaseField.getText();
username = usernameField.getText();
password = passwordField.getText();
hostname = hostnameField.getText();
port = portField.getText();
int n = JOptionPane.showOptionDialog(null, connectionPanel,
ConnectTitle,
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE,
null, ConnectOptionNames,
ConnectOptionNames[0]);
if (n == 0) {
System.out.println("Attempting login: " + username);
String url = databaseURL+hostname+":"+port+":"+database;
// load the JDBC driver for Oracle
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con = DriverManager.getConnection (url, username, password);
System.out.println("Congratulations! You are connected successfully.");
con.close();
System.out.println("Connection is closed successfully.");
catch(SQLException e){
System.out.println("Error: "+e);
else if (n == 1)
System.exit(0);
public static void main (String args []) {
UserDialog ud = new UserDialog();
}thanks again,
Jamesthe reason why you can't get the text is because you are reading the value before some actually inserts anything in any fields.
Here is what you need to do:
Create a JDialog/JFrame. Create a JPanel and set that panel as contentPane (dialog.setContentPane(panel)). Insert all the components, ie JLabels and JTextFields. Add two buttons, Login and Cancel to the panel as well. Now get the username and password field values using getText() inside the ActionListener of the Login.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class LoginDialog extends JDialog
String username, password;
public LoginDialog( ){
setTitle( "Login" );
JPanel content = new JPanel(new GridLayout(0, 2) ); // as many rows, but only 2 columns.
content.add( new JLabel( "User Name" ) );
final JTextField nameField = new JTextField( "" );
content.add( nameField );
content.add( new JLabel( "Password" ) );
final JTextField passField = new JTextField( "" );
content.add( passField );
JButton login = new JButton( "Login" );
login.addActionListener( new ActionListener(){
public void actionPerformed( ActionEvent ae ){
username = nameField.getText();
password = passField.getText();
// call a method or write the code to verify the username and login here...
content.add( login );
JButton cancel = new JButton( "Cancel" );
cancel.addActionListener( new ActionListener( ){
public void actionPerformed( ActionEvent ae ){
dispose(); // close the window or write any code that you want here.
content.add( cancel );
pack( ); // pack everything in the dialog for display.
show(); // show the dialog. -
Reading Data from a Table using loop
I have a dynamic table inside the PDF form. I want to loop through the table rows and read the cell contents. I successfully get the rows count in the table. But can't read the values from the cells. I have put editable TextField (txtName) control in each cell and trying to read its value.
screenshot is below.
Code I am using is:
form1.Page1.Subform1.btnReadTable::click - (JavaScript, client)
var rowCount = MyTable._Row1.count;
app.alert("Row Count: " + rowCount);
var i = 0;
for(i=0 ; i<rowCount ; i++)
//app.alert(MyTable.Row1[i].txtName.rawValue); // NOT WORKING
app.alert(MyTable.Row1.txtName.rawValue); // WORKING, But just giving the value for the first row.
Please tell me how can I get the value of each name in every row by looping.
Thanks in advance.
AbhinavHi, Abhinav,
You need to resolve the node for the particular instance of i. The syntax is:
xfa.resolveNode("MyTable.Row1[" + i + "].txtName").rawValue;
There is an example here that will show the loop in action:
http://www.assuredynamics.com/index.php/category/portfolio/two-way-binding-in-tables/
Hope that helps,
Niall
Assure Dynamics -
How can I read bytes from std input using nextByte()
Hi. I am trying to read input text from std input into a byte array. I used the following procedure but have been getting errors
Scanner myScanner = new Scanner(System.in);
do{
List[i] = myScanner.nextByte();
i++;
}while(i<List.length);
When i try to print the List array after this loop, i get an InputMismatchException and Unknown Source error. What could be responsible for this?
Thanksi don't really know what you're trying to do, but try this:
maybe it helps you out.
byte List[] = new byte[10];
for (int i = 0; i < List.length; i++) {
Scanner myScanner = new Scanner(System.in);
List[i] = myScanner.nextByte();
}this code creates an array of byte elements. the length of the array is 10 ( = new byte[*10*]). the for loop let's you fill the array with byte numbers over the keyboard.
good luck -
How to read xmlfile from a directory using plsql
Hi all.
Any body please help me in reading an xml file from a directory by using plsql or sql
ThanksI would say you are looking for
BFILENAME
In addition to the example from the documentation, here is one of the many examples from the forum
insert .xml file into xmltype table? -
How to Read Message from JMS Queue using Business Service(ALSB3.0)
Hi,
My Project Set up is as follows(using ALSB3.0).
1>One Proxy Service with transport as HTTP.
2>The Proxy service is calling another Business Service.
3>The Business Service has transport layer as JMS.
So here the business service is posting Request Message into the JMS queue.
I want at the same time it(The Business Service) should listen to another queue and from there it should read Response Message and forward back to the caller proxy service.
Can any one help me regarding this...
Thanks in advance...
DebaHi ,
Problem in : Reading / writing messages to the JMS Queue -
I am stuck with the same problem and I am not able to proceed futher, Can you please help me out in sending an example of how to do right configurations in ALSB and on the server. I read the documentation but still I dont see messages in the queues.
please help me out. can you post a small sample example
thanks
adi -
How to read message from Active MQ using OSB
Hi All
I want to read from Active MQ ( situated on another server) using OSB (11g). My condition is
Active MQ---> OSB---> DB Tables
I know how to use BPEL to do this but I need to use OSB to do this. Client which puts data to Active MQ also puts data ( like eventtype)to its header and on basis of header(eventtype) I need to route the message to proper tables. Please let me know how can I do this and if any step by step info is available for this ( I checked on many blogs but couldn't find any).
Thanks very much
Regards
GauravDid you try creating a MQ transport proxy service in OSB -
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/mq.htm#BGEFJHAF
Regards,
Anuj -
Reading File from Application Server using Read Dataset
Hi,
i am trying to read excel file from Application Server and has multiple records in that based on structure below. but when i execute its giving me error message.here is the code, can sumone suggest me on this please ??
FORM f_data_upload .
DATA:
l_filename TYPE string, "file name
l_wa_string TYPE string. "file record
l_filename = p_inp_as. "File path from Application Server
OPEN DATASET l_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Read the data from the file in Application server.
READ DATASET l_filename INTO l_wa_string.
IF sy-subrc = 0.
SPLIT l_wa_string AT cl_abap_char_utilities=>horizontal_tab
INTO w_data-tcode
w_data-matnr
w_data-mtart
w_data-werks
w_data-vkorg
w_data-vtweg
w_data-lgort
w_data-meins
w_data-maktx
w_data-spart
w_data-kosch
w_data-mstae
w_data-brgew
w_data-ntgew
w_data-groes
w_data-matkl
w_data-prdha
w_data-mstde
w_data-mtpos_mara
w_data-gewei
w_data-spart
w_data-mstav
w_data-mstdv
w_data-dwerk
w_data-taxkm
w_data-versg
w_data-kondm
w_data-ktgrm
w_data-mtpos
w_data-mtvfp
w_data-tragr
w_data-ladgr
w_data-herkl
w_data-ekgrp
w_data-webaz
w_data-dismm
w_data-beskz
w_data-prctr
w_data-bklas
w_data-bwtty
w_data-vprsv
w_data-verpr
IN CHARACTER MODE.
APPEND w_data TO i_data.
CLEAR w_data.
ENDIF.
ENDDO.
CLOSE DATASET l_filename.
Error Message while executing
What happened?
At the conversion of a text from codepage '4110' to codepage '4102':
- a character was found that cannot be displayed in one of the two
codepages;
- or it was detected that this conversion is not supported
The running ABAP program 'ZHDI_LOMM_VEHI_MAT_MASS_CREATE' had to be terminated
as the conversion
would have produced incorrect data.
The number of characters that could not be displayed (and therefore not
be converted), is 449. If this number is 0, the second error case, as
mentioned above, has occurred.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
caught in
procedure "F_DATA_UPLOAD" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
Characters are always displayed in only a certain codepage. Many
codepages only define a limited set of characters. If a text from a
codepage should be converted into another codepage, and if this text
contains characters that are not defined in one of the two codepages, a
conversion error occurs.
Moreover, a conversion error can occur if one of the needed codepages
'4110' or '4102' is not known to the system.
If the conversion error occurred at read or write of screen, the file
name was '/usr/sap/interfaces/conversion/pioneer/ddm/data/test_data1.xls'.
(further information about the file: "X 549
24064rw-rw----200812232135082008122307293120081223072931")
Please help me
Thank YouWoah ... perfect guru
but data looks like all junk characters ? its filling with special characters, hashes # and other characters but not with Excel data.. any idea ??
Temesh
Edited by: New2Sap Abap on Dec 24, 2008 6:42 AM
Maybe you are looking for
-
Combined Reports: Contact with Account Team History
How can we combine Contacts subject area with Accounts Team History subject area? The fields which i want to display in the report are: Last Name and First Name from Contacts Account Name, Last Name, First Name and Team Role from Accounts Team Histor
-
Forms 10g crashes while opening an oversize Oracle seeded form
Hi, I am trying to open Oracle R12 seeded form 'PAXPREPR' using forms 10g. I connect to the database before opening the file. The size of the file is 11.8MB. But when i open this file, oracle forms crashes without any error message. I checked the 11i
-
I recently purchased PS CS6 as a student. At TAFE today we were shown how to convert NEF (nikon) files to dng in Bridge. C an anyone help me find the converter please?
-
TM does not see my disk, but it shows up in finder.
I have connected an external hard drive through a USB connection. Finder sees it, and it comes up on my desktop. My problem, however, is when I try to connect to Time Machine. It doesn't show up when I click "choose backup disk." I also plugged in a
-
Does Adobe Download Assistant Resume Downloads?
If my internet connection is lost or stopped during download will it resume or will the download have to start over?