Store data in a String array getting from access table
Hai all,
i an new to java.
i have a problem regarding database connectivity, in my bean class i have written code to retrieving data from a access table. It is successfully retrieving data as System.out.println(rs.getString(rows)) is working fine but i want to store the data in String array
My code is like follows
String[ ] listTitle;
rs.next();
for(int i;i<8;i++)
rows="F"+i;
System.out.println(rs.getString(rows));
listTitle=rs.getString(rows);
when control coming to
listTitle[i]=rs.getString(rows);
it is giving some error like :::: No data found.
how to solve this any one??
Hi,
U r trying to get the value two times. To avoid this store the value in variable, then manipulate.
Try this,
String[ ] listTitle;
String temp;
rs.next();
for(int i;i<8;i++)
rows="F"+i;
temp = rs.getString(rows);
System.out.println(temp);
listTitle =temp;
Regards,
Ram.
Similar Messages
-
How to avoid NullPointerException---String array created from JTextArea
Hi,
I use the method getText() to put the contents of a JTextArea into a String object. Then I use split("\\s+") on that String object to get a String array. Before the contents of the String array are output, I get a NullPointerException. How do I avoid this exception? My code is below.
//: net/mindview/util/SwingConsole.java
package net.mindview.util;
import javax.swing.*;
public class SwingConsole {
public static void
run(final JFrame f, final int width, final int height) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
f.setTitle(f.getClass().getSimpleName());
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(width, height);
f.setVisible(true);
} ///:~
//: gui/Charts.java
package gui;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import net.mindview.util.SwingConsole;
public class Charts extends JFrame {
private int[] numbers;
private JTextArea input = new JTextArea();
private JScrollPane areaScrollPane = new JScrollPane(input);
private JButton b1 = new JButton("Submit");
private JButton b2 = new JButton("Clear");
public Charts() {
add(areaScrollPane);
areaScrollPane.setPreferredSize(new Dimension(250, 250));
b1.addActionListener(a1);
b2.addActionListener(a2);
add(b1);
add(b2);
private ActionListener a1 = new ActionListener() {
public void actionPerformed(ActionEvent e) {
String data = input.getText();
String[] stringArray = data.split("\\s+");
for (String s:stringArray)
System.out.print(s + " ");
int i = 0;
for (String s:stringArray)
numbers=Integer.parseInt(s);
i++;
private ActionListener a2 = new ActionListener() {
public void actionPerformed(ActionEvent e) {
input.setText("");
* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
SwingConsole.run(new Charts(), 400, 400);
Edited by: gluedtothecomputer on Feb 1, 2009 7:59 PMdon't forget to init your int array:
String[] stringArray = data.split("\\s+");
numbers = new int[stringArray.length]; -
Help with a store function that takes string array
Hi All,
I have a function that takes in two string arrays, status_array, and gender_array. You can see the partial code below. Somehow if the value for the string array is null, the code doesn't execute properly. It should return all employees, but instead it returns nothing. Any thoughts? THANKS.
for iii in 1 .. status_array.count loop
v_a_list := v_a_list || '''' || status_array(iii) || ''',';
end loop;
v_a_list := substr(v_a_list, 1, length(trim(v_a_list)) - 1);
for iii in 1 .. gender_array.count loop
v_b_list := v_b_list || '''' || gender_array(iii) || ''',';
end loop;
v_b_list := substr(v_b_list, 1, length(trim(v_b_list)) - 1);
IF v_a_list IS NOT NULL and v_b_list IS NOT NULL THEN
v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') and gender in (' || v_b_list || ')';
ELSIF v_a_list IS NOT NULL and v_b_list IS NULL THEN
v_sql_stmt := 'select distinct full_name from t_employee where status in (' || v_a_list || ') ';
ELSIF v_a_list IS NULL and v_b_list is not null THEN
v_sql_stmt := 'select distinct full_name from t_employee where gender in (' || v_b_list || ')';
ELSE
v_sql_stmt := 'select distinct full_name from t_employee';
END IF;
OPEN v_fullname_list FOR v_sql_stmt;
RETURN v_fullname_list;I'd first recommend trying to avoid the dynamic sql.
use an approach like
[http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425] or
[http://stackoverflow.com/questions/1625649/oracle-parameters-with-in-statement/1655743#1655743] or [http://stackoverflow.com/questions/1715978/how-to-use-an-oracle-associative-array-in-a-sql-query]
but if that isn't in scope, do a
dbms_output.putline(v_a_list) ;
dbms_output.putline(v_b_list) ;
dbms_output.putline(v_sql_stmt) ;around and see what it emits -
How to print the data if we take different fields from diffrent tables
Hi ABAPers,
I take diff fields from 3 tables. Those are
these fields from EKBE
EBELN
EBELP
BELNR
BUZEI
BWART
BUDAT
AREWR
REEWR
WERKS
MWSKZ
these fields from EKKO
BUKRS
BSART
WAERS
these field from EKPO
TXZ01
MATNR
MTART
I want to print the data all fields.What logic can i write?
Please help me for this question and i am waiting for your response.
Regards,
Raja Sekhar.Hi,
First you have to fetch data from all the three tables and then consolidate into final table.
In Declaration:
1.Declare Internal Table for EKKO holding:
EBELN
BUKRS
BSART
WAERS
2.Declare Internal Table for EKPO holding:
EBELN
EBELP
TXZ01
MATNR
MTART
3.Declare Internal Table for EKBe holding:
EBELN
EBELP
BELNR
BUZEI
BWART
BUDAT
AREWR
REEWR
WERKS
MWSKZ
*==> This table has
MANDT
EBELN
EBELP
ZEKKN
VGABE
GJAHR
BELNR
BUZEI
as Primary keys field,you should have values for all the PK aotherwise you will get multiple entries*
4.Declare a Final Internal Table i_final with all the fields you want
EBELN
EBELP
BUKRS
BSART
WAERS
TXZ01
MATNR
MTART
BELNR
BUZEI
BWART
BUDAT
AREWR
REEWR
WERKS
MWSKZ
Data Fetching
select EBELN
BUKRS
BSART
WAERS
from EKKO
into table i_ekko
where .........<selection criteria>.
if not i_ekko is initial.
select EBELN
EBELP
TXZ01
MATNR
MTART
from EKPO
into table i_ekpo
for all entries in i_ekko
where EBELN = I_EKKO-EBELN
AND ......<If any other selection criteria>.
if not i_ekpo is initial.
select EBELN
EBELP
BELNR
BUZEI
BWART
BUDAT
AREWR
REEWR
WERKS
MWSKZ
from EKBE
into table i_ekbe
for all entries in i_ekpo
where ebeln = i_ekpo-ebeln
and ebelp = i_ekpo-ebelp
and ..........<If any othet selection criteria>
endif.
endif.
Consolidate
sort i_ekko by ebeln.
sort i_ekpo by ebeln ebelp.
sort i_ekbe by ebeln ebelp.
LOOP AT i_ekbe into wa_ekbe.
read table i_ekko into wa_ekko with key ebeln = wa_ekbe-vbeln binary search.
if sy-subrc = 0.
====>Move all the required firlds from I_EKKO to i_final , like
wa_final-BUKRS = wa_ekko-BUKRS.
endif.
read table i_ekpo into wa_ekpo with key ebeln = wa_ekbe-vbeln
ebelp = wa_ekbe-ebelp binary search.
if sy-subrc = 0.
====>Move all the required firlds from I_EKPO to i_final , like
wa_final-EBELP = wa_ekko-EBELP.
wa_final-TXZ01 = wa_ekko-TXZ01.
endif.
==>Also all the required fields from EKBE to final table, like
wa_final-BELNR = wa_ekbe-BELNR.
endloop. -
Hi There,
In SAP GRC 10.0, our team had an issue where we could not add duplicate fields from separate table (see ERROR: Select Currency/UoM field for the selected analyzed fields). This was resolved by the SAP Note 1904313/ 1904314 (http://service.sap.com/sap/support/notes/1904313).
We upgraded our system to SAP GRC 10.1 SP05 and could now add the duplicate fields from separate tables. SAP Note 1904313/ 1904314 was part of SAP GRC 10.1 SP03 so it makes sense that we, in a higher version (SP05), would be able to do this.
The issue now is when we add the duplicate fields from different tables and run the Ad-hoc Query to test if the data source works correctly, the No Data Selected warning persists. This means that the data source provides no data for analysis, which is required to write our business rules.
Below is an example:
Basic data source with just one currency reference field EBAN-WAERS.
When you run the Ad-Hoc Query you receive data.
Basic data source with second currency reference field EKKO-WAERS.
When you run the Ad-Hoc Query no data is found.
Please also make reference to the following thread logged by my colleague (ERROR: Select Currency/UoM field for the selected analyzed fields)
Any assistance to receive data with duplicate fields from separate tables will be highly appreciated.
Thanking you in advance.
Regards
Gary KhanHi
following are the error messages from dump
hrtText
There is already a line with the same key.
hat happened?
Error in ABAP application program.
The current ABAP program "SAPLCKMS" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
rror analysis
You wanted to add an entry to table "\FUNCTION-POOL=CKMS\DATA=T_DYN_CKMLCR",
which you declared
with a UNIQUE KEY. However, there was already an entry with the
same key.
This may have been in an INSERT or MOVE statement, or within a
SELECT ... INTO statement.
In particular, you cannot insert more than one initial line into a
table with a unique key using the INSERT INITIAL LINE... statement.
rigger Location of Runtime Error
Program SAPLCKMS
Include LCKMSF01
Row 226
Module type (FORM)
Module Name DYNAMIC_PERIOD_CLOSING
Source code where dump ocured
222
223 APPEND ht_ckmlpp TO t_add_ckmlpp.
224 APPEND LINES OF ht_ckmlcr TO t_add_ckmlcr.
225 INSERT ht_ckmlpp INTO TABLE t_dyn_ckmlpp.
>>>> INSERT LINES OF ht_ckmlcr INTO TABLE t_dyn_ckmlcr.
227 ENDWHILE.
Also I guess there is problem with material ledger in R/3 side
I have never worked on material ledger before so dont hav idea of Tcode and tables in SAP R/3 for material ledger.
Thanks
Navneet -
Please explain on what does these select statements get from these tables..
Hello Experts,
What does these select statements get?and what are these tables CDHDR and CDPOS used for?
The program that I am currently modifying lets users post documents and the ones that are not posted
are saved in a custom table. Now, we had a scenario in PROD server wherein certain items are not being
fetched as bypassed but we saved it in the bypassed table. Anyway, below is the select statements:
get all change document header within the selected dates
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
FROM cdhdr
WHERE udate IN s_udate
AND objectclas EQ 'CHARGE'
AND tcode IN (lc_tcode_msc1,
lc_tcode_msc2,
lc_tcode_msc1n,
lc_tcode_msc2n,
lv_tcode_vl33n,
'SE38',
'ZGENE').
IF NOT it_cdhdr[] IS INITIAL.
SELECT objectid changenr value_new
FROM cdpos
INTO TABLE it_cdpos
FOR ALL ENTRIES IN it_cdhdr
WHERE objectclas EQ it_cdhdr-objectclas
AND objectid = it_cdhdr-objectid
AND changenr = it_cdhdr-changenr
AND tabname = lc_tabname_mcha
AND fname IN (lc_fname_zustd,'LWEDT').
DELETE it_cdpos WHERE value_new+00(01) = 'X'.
LOOP AT it_cdpos ASSIGNING <fs_cdpos>.
l_matnr = <fs_cdpos>-objectid+00(18).
l_charg = <fs_cdpos>-objectid+22(10).
l_zustd = <fs_cdpos>-value_new+00(01).
READ TABLE it_batch INTO wa_batch
WITH KEY matnr = l_matnr
charg = l_charg.
IF sy-subrc EQ 0.
l_tabix = sy-tabix.
wa_batch-zustd = l_zustd.
MODIFY it_batch FROM wa_batch INDEX l_tabix
TRANSPORTING zustd.
ELSE.
wa_batch-matnr = l_matnr.
wa_batch-charg = l_charg.
wa_batch-zustd = l_zustd.
wa_batch-code = 'A'. "selected within period
APPEND wa_batch TO it_batch.
ENDIF.
ENDLOOP.
ENDIF.Hi,
The first select statement is for Change document header.CDHDR table contains this object class in your case if you change any batch number for any material number from the transaction for example (MB01) you can trace this .
From CDPOS you can trace which tables affected (EX : MCHA) and the new value(l_zustd ).
Regds,
Vinsa.R -
User info couldn't be get from info table from popup lov window
Hi,
I'm tring to implement authorization on my test project. I'm tring to filter the data in pop-up lov window accoriding to logged user but in the below code, the userId is read as null. I have copied the code from developer guide and it works well on the other part of my project.
Thanks,
package steff.test.persistence.bc4j;
import oracle.jbo.server.ViewObjectImpl;
import oracle.jbo.RowIterator;
import oracle.jheadstart.persistence.bc4j.common.Bc4jDBTransaction;
import oracle.cle.resource.User;
// --- File generated by Oracle Business Components for Java.
public class SupplierCompanyViewImpl extends ViewObjectImpl
* This is the default constructor (do not remove)
public SupplierCompanyViewImpl()
private void brAuthorizedQuery(Object p0, Object[] whereParams,
int numOfParams)
Bc4jDBTransaction trans = (Bc4jDBTransaction)getDBTransaction();
User user = trans.getUser();
String userId = "";
String initialWhereClause = getWhereClause();
String whereClause = "";
if (!(user==null))
userId = user.getUserId();
else
userId = "NONE";
if (!(initialWhereClause == null))
whereClause = initialWhereClause + " AND ";
whereClause = whereClause +
"QRSLT.COMPANY_CODE IN (" +
" SELECT UACompany.COMPANY_CODE FROM UA_COMPANY UaCompany WHERE USER_ID=:1" +
System.out.println(userId);
setWhereClause(whereClause);
Object[] tempArray = new Object[numOfParams + 1];
for (int i=0; i < numOfParams; i++)
tempArray[i] = whereParams;
tempArray[numOfParams] = userId;
whereParams = tempArray;
numOfParams = numOfParams + 1;
super.executeQueryForCollection(p0, whereParams, numOfParams);
setWhereClause(initialWhereClause);
protected void executeQueryForCollection(Object p0, Object[] p1, int p2)
// had to move call to super inside br method
brAuthorizedQuery(p0, p1, p2);I found a solution to my problem. It can achieve to filter the displayed data in lov in a not secure way. ı custumised the lov.jsp and the other related jsps for parameter passing. I added the following lines.
// Construct the search criterium
ArrayList arguments = new ArrayList();
String[] searchcriterium = {displayAttr,"LIKE",text};
String queryName = className.substring(className.lastIndexOf(".")+1)+"Lov";
arguments.add(searchcriterium);
if (filterAttr != null && !filterAttr.equals("") && !filterAttr.equals("null")) {
String[] searchcriterium2 = {filterAttr,"=",filterValue};
arguments.add(searchcriterium2);
Thanks for all your answers. -
Latest record to get from MSEG Table
Hi frnds,
I am getting multiple records against material no. i want single record and latest one.
SELECT DISTINCT MBLNR MATNR LIFNR
FROM MSEG
INTO TABLE IT_MSEG
WHERE MATNR IN S_MATNR
ORDER BY MATNR MBLNR DESCENDING.
S_MATNR = multiple matnr
eg: matnr mblnr lifnr
test 1 abc
test 2 abc
test2 4 xyz
test3 3 abc
test3 5 vvvv
I want in my ITAB.
eg: matnr mblnr lifnr
test 1 abc
test2 4 xyz
test3 5 vvvv
Here I am sorting with mblnr to pick latest record.
How i will get.
Regards.Hi,
just do one thing if after sorting you are getting first record of latest record in each material then use
delete adjacent duplicates from itab comparing matnr.
Regards
Vijay dwivedi -
How to store data in ipad from computer
please explain me how to store data (music video & pictures) in ipad from any personal computer...kindly explain me in simple steps...
The iPad can only sync with one computer. To do this you need to have iTunes installed on the computer and have it associated with your Apple ID. you can then use iTunes to transfer music, movies and pictures from that computer, and that computer only.
iOS: Syncing your data with iTunes
http://support.apple.com/kb/ht1386
If you need to get files from other computers, you would need a 3rd party App that can handle the formats you wish to transfer, and possibly transfer them either through iTunes file sharing or Wifi transfer depending on what the App supports.
iOS: About File Sharing
http://support.apple.com/kb/ht4094 -
How to get data from the Tables (Can func.module help then how to write )
Hi,
Can anyone tell the use of functional module to extract the data from R/3.i am working on PM module and need to extract the status of work order and equipment which i can get from First i had to get objnr then i had to go to jsto in jsto i get stsma and estat. by using estat and stsma i can get status in table tj30t here estat is same as stat in jest table.
how to get all these in bw . any help.
I need status of work orders and equipments which exists in tj30t or we can get from tj30 tables in the fields txt30 and txt04
Any one pls help to get all these stuff from R/3 to BW
Regards
Srini-----Hi
You need to enhance (write a user exit) for your Data Source.
Here are some links on UE:
Enhancment Framework
====================
SAP Help Enhancment Framework
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Enhancements in sap bw
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
User Exit Enhancments
Enhancement
User exit
BADI
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Reg's
Edan -
ALV OOps report- getting data from two tables and adding issue
Hi,
This is sales employee performance report.
I need to select all the fields from two tables based on user input ie VKorg, sales employee .
There is one field callled " Net sales"in both the tables.
Based on sales employee number, i need to add that net sales which i get from two tables.
I need to generate single report.
Can you give some inputs reg. the select query.
My idea is select all the data from both tables using join statement.
ThanksHi,
I have written like this:
select * from S002 as a join S006 as b
into table ME->SS002_RAW[]
where vkorg in me->select_parameters->SO_VKORG[] = vkorg in me->select_parameters->SO_VKORG[]
and ZZSLSEMP01 in me->select_parameters->SO_so_empl[] = ZZSLSEMP02 in me->select_parameters->SO_so_empl[].
when i do like that,
I am getting error
Incorrect structure of FROM clause . . . .
If you give some idea on this
Edited by: Raja on Apr 22, 2009 11:19 AM -
Oracle table(s) data to INSERT(String) statements with JAVA
Hi,
How can I get sql inserts from a oracle table with JAVA?
Is there a Oracle API for it?
I need to store it in a file, the result file should have these examples lines:
-- INSERTING into TEST
Insert into "TEST" ("CODE","FAMILY","SUB_FAMILY","SEVERITY","STATUS","ANOMALY_DATE","DESCRIPTION",
"COMMENTS","VALUE0","VALUE1","VALUE2","VALUE3","VALUE4","VALUE5","VALUE6","VALUE7","VALUE8",
"VALUE9") values (1,'family1','subFamily11','bad','initial',to_date('0005-11-21','DD/MM/RR'),'someDescription',
'someComment','someValue','someValue','someValue','uselessValue','uselessValue',null,null,null,null,null);
the example line was created with the export tool from Oracle SQl developer
Thks.
Franciscouser9046632 wrote:
Hi Guys, this is me Francisco that wrote the first question, but now I've an NEW account. I'll try to explain it. For a Job I need a .txt file that contains the SQl string inserts from an Oracle Table. I can't use a Software because I need to do it with Java Code. I'm not trying to get the inserts's logging , I need a to export it from a table.I read One way to do it is using DataPump utility, but using this tools, will I get a text file? I read that DataPump works with binaries files. using Java JDBC and metadata, I need to convert all in String file, ok for it I'm agree, but I have to write a lot of code to know what kind of type I get from the Table to parse it. One example is with Date types, oracle softwares parse it as to_date('0005-11-21','DD/MM/RR') and java toTostrig will do it something like '2009-1-25 13:00:00'. Java toString method will truncate some Number types So I need to know if someone did it or give or can help me.
Thank you very much. Francisco
Again, explain the business problem you are trying to solve, not the technical one. WHY do you need a text file that contains "SQL string inserts"? It sounds very much like you are looking at your problem "through the wrong end of the telescope" and thus finding a poorly designed solution. But unless we know the real problem to be solved, it's hard to say any more than that this smells bad.
Sorry about my English, it's not my natural language -
Incomplete Data on report (report does not show all records from the table)
Hello,
I have problem with CR XI, I'm running the same report on the same data with simple select all records from the table (no sorting, no grouping, no filters)
Sometimes report shows me all records sometimes not. Mostly not all records on the report. When report incomplete sometimes it shows different number of records.
I'm using CR XI runtime on Windows Server 2003
Any help appreciated
Thanks!Sorry Alexander. I missed the last line where you clearly say it is runtime.
A few more questions:
- Which CR SDK are you using? The Report Designer Component or the CR assemblies for .NET?
- What is the exact version of CR you are using (from help | about)
- What CR Service Pack are you on?
And a troubleshooting suggestion:
Since this works on some machines, it will be a good idea to compare all the runtime (both CR and non CR) being loaded on a working and non working machines.
Download the modules utility from here:
https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip
and follow the steps as described in this thread:
https://forums.sdn.sap.com/click.jspa?searchID=18424085&messageID=6186767
The download also includes instructions on how to use modules.
Ludek -
How to Sort JTable data using Multiple fields (Date, time and string)
I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
"1998/12/14","15:14:38","Unicorn1","row1"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/17","12:14:12","Unicorn4","row6"
Now the Sorted Table should be in the following way:
"1998/12/17","12:14:12","Unicorn4","row6"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:38","Unicorn1","row1"
ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
But now i need to sort on multiple columns.So what is code change in the Comparater class.
Thanks in advance.. This is urgent....I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
public void compareTo(Object obj)
Schedule other = (Schedule)obj;
return date.getTime() - other.getDate().getTime();
} -
How to fetch data from PTREQ tables
I need to display data in the customised webdynpro application from PTREQ tables.
Can anyone help me out how to fetch data from these tables.use the standard modules like
PT_ARQ_REQUEST_CHECK
PT_ARQ_REQUEST_EXECUTE
PT_ARQ_REQUEST_PREPARE
Maybe you are looking for
-
IPod Shuffle (2nd Generation) Windows 2003 Server
Hey All, Having a hard time getting my iPod to sync. Getting this error. "The iPod cannot be synced. An unknown error occured (-48). I have been researching these forums on a solution and its directing me to update the iTunes BUT, the latest version
-
I have a main form with drop down boxes that create the criteria for a query. Each drop down has a me.recalc function so that the query updates every time one is filled in or changed. The query results show up in a subform (datasheet). works great
-
I think it's my classpath?
Hi Ive got java up and running and have been happily compiling, everything going smoothly. My classpath points to c:\jdk1_3\_work where I keep all my code and I usually have a couple sub directories under that where I keep specific projects ie. c:\jd
-
I have downloaded the latest itunes version on my Samsung windows 7 laptop. It is a higher end model. Anyway, have paid for and downloaded season 5 of "Breakin Bad" but when I press "play" on an episode, it only displays a 30 second clip. The downlo
-
Write 1d array of cluster with 2 elements to file
HI! I'm new at LabView so I hope the question is very simple to you: I am using a waveform graph to display several measurements. Now I want to save these Measuremens. The data are stored in 1d array of cluster with 2 elements. What is the easiest wa