Chart dataTipFunction and loading data via HTTPService
Hi everyone,
I have a problem and I hope someone is able to give me a hint.
I am using a chart with data points. At the moment I am using a datatipFunction in order to give each point a "tooltip".
Now I need the ability to load some data via httpservice and display this as tooltip instead of the original value while being over a point.
It is needede because of a lot of data and a continuous minimal change of its values. I don't want to reload every possible data. Only examined datatips should be updated.
mouse over datapoint --> tooltip: "please wait, while updating" --> httpservice finished --> tooltip: "new data xyz"
The datatip function only returns a string, that is displayed as tooltip. If the datatip function calls a httpservice, how can I update that tooltip text?
Any ideas?
Hi everyone,
I have a problem and I hope someone is able to give me a hint.
I am using a chart with data points. At the moment I am using a datatipFunction in order to give each point a "tooltip".
Now I need the ability to load some data via httpservice and display this as tooltip instead of the original value while being over a point.
It is needede because of a lot of data and a continuous minimal change of its values. I don't want to reload every possible data. Only examined datatips should be updated.
mouse over datapoint --> tooltip: "please wait, while updating" --> httpservice finished --> tooltip: "new data xyz"
The datatip function only returns a string, that is displayed as tooltip. If the datatip function calls a httpservice, how can I update that tooltip text?
Any ideas?
Similar Messages
-
Update and transfer data via BADI LE_SHP_TAB_CUST_HEAD
Greetings All,
I've a requirement to create a custom tab in the VL01N/VL02N/VL03N header record displaying custom fields.
I've successfully implemented BADI LE_SHP_TAB_CUST_HEAD, created a subscreen, appended my custom fields to the LIKP table via append structure, and can now view my fields in the transactions listed above.
I'm having trouble updating the fields in the subscreen and save the values back to the LIKP table. First question is a) do I do this via the PBO PAI modules in my subscreen, or should I be doing this in the BADI?
Second question is, if I shuodl be doing this in the BADI, how do I do it. A simple example is that I have created a field called ZZ_CUST_TIME in LIKP, added it to my sub-screen using data dictionary linking.
How do I pass a value entered into this field via VL02N back to the transaction for update?
Any suggestions would be greatfully appreciated.
Regards,
SteveDear Abhishek, can you explain the step..in this step screen is comming but custom fields value is not coming and also likp table is not updated
Correct AnswerRe: Update and transfer data via BADI LE_SHP_TAB_CUST_HEAD
Abhisek Biswas Jan 21, 2009 7:28 AM (in response to Stephen Keam)
Hi Stephen,
You can do it by using PBO and PAI modules of the screen that you created. But you have to transfer the data from subscreen to the BADI method TRANSFER_DATA_FROM_SUBSCREEN and aslo from method TRANSFER_DATA_TO_SUBSCREEN to the subscreen. This will update the screen field data to LIKP.
You can aceive this by two ways.
1) You can use EXPORT in method TRANSFER_DATA_TO_SUBSCREEN and then IMPORT the value in the screen PBO. And You can EXPORT data from screen PAI and IMPORT data in method TRANSFER_DATA_FROM_SUBSCREEN.
2) Anither way to do it is by using Function modules and Function Group instead of EXPORT/IMPORT.
Create a Function group. In the global data define a structure/Work Area of type LIKP.
DATA w_likp TYPE likp.
Then create two Function modules, one to export data and another to import data.
Let us assume that the export FM takes in IS_LIKP as input and the import FM outputs the value of LIKP into ES_LIKP.
Then pass the value is_likp to the export FM in the BADI method TRANSFER_DATA_TO_SUBSCREEN and in the screen PAI pass the LIKP data to the export FM.
In the export Function module write the following code:
MOVE is_likp TO w_likp
Then in the Import FM write the following code:
MOVE w_likp TO es_likp.
The import FM is called from method TRANSFER_DATA_FROM_SUBSCREEN and from screen PBO.
This will solve your problem.
Regards,
Abhisek.
Alert Moderator
Like (0)
Reply -
Receiving and displaying XML data via HTTPService
Hi folks. I am a pretty experienced database programmer, I
work with a software called Magic eDev, but I'm a complete newby in
Flex.
I am trying to use Flex 3 to create a web / client interface
for an application written in Magic eDev. I've made a very simple
Flex App to read an XML file generated by another application
written in the third party software (Magic eDev 9.4) via
HTTPService. I think I have the HTTPService request part figured
out, This little Application does not cause any errors in Flex.
However, I am not seeing my data in the display. If I manually try
the URL query to the Magic App, I do get the XML file with the data
in it, but Flex doesn't seem to see anything.
I just want to get two fields via the HTTPService data and
display them, but I'm not getting any result. I can't even tell if
Flex is actually querying Magic or not. Can anyone explain what I'm
doing wrong?
Also, is there some way to monitor what the Flex app is doing
when you run it, as you can in some other systems?
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function serv_result(evt:ResultEvent):void {
var resultObj:Object = evt.result;
userName.text = resultObj.catalog.username;
emailAddress.text = resultObj.catalog.emailaddress;
private function serv_fault(evt:FaultEvent):void {
error.text += evt.fault.faultString;
error.visible = true;
form.visible = false;
]]>
</mx:Script>
<mx:String id="XML_URL">album.xml</mx:String>
<mx:HTTPService id="loginService"
url="
http://localhost/magic94scripts/mgrqcgi94.exe"
method="POST"
result="{ResultEvent(event)}" fault="{FaultEvent(event)}">
<mx:request>
<appname>FlexDispatch</appname>
<prgname>Test</prgname>
<arguments>username,emailaddres</arguments>
</mx:request>
</mx:HTTPService>
<mx:ApplicationControlBar dock="true">
<mx:Label text="{XML_URL}" />
</mx:ApplicationControlBar>
<mx:Label id="error"
color="red"
fontSize="36"
fontWeight="bold"
visible="false"
includeInLayout="{error.visible}"/>
<mx:Form id="form"
includeInLayout="{form.visible}">
<mx:FormItem label="resultObj.catalog.username:">
<mx:Label id="userName" />
</mx:FormItem>
<mx:FormItem label="resultObj.catalog.emailaddress:">
<mx:Label id="emailAddress" />
</mx:FormItem>
</mx:Form>
</mx:Application>
This is what the XML file looks like:
<?xml version="1.0" ?>
- <catalog>
<username>DaveID</username>
<emailaddress>DaveName</emailaddress>
</catalog>I'm sorry to be a pest but this link doesn't seem to work!! I
keep getting this error:
A system error has occurred - our apologies!
Please contact your Confluence administrator to create a
support issue on our support system at
http://support.atlassian.com
with the following information:
a description of your problem and what you were doing at the
time it occurred
cut & paste the error and system information found below
attach the application server log file (if possible).
We will respond as promptly as possible.
Thank you! -
How do I initialize an array after getting xml data via httpservice?
I am having a problem trying to initialize an array with data from an external xml file obtained via httpservice. Any help/direction would be much appreciated. I am using Flex 4 (Flash Builder 4).
Here is my xml file (partial):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<Row>
<icdcodedanddesc>00 PROCEDURES AND INTERVENT</icdcodedanddesc>
</Row>
<Row>
<icdcodedanddesc>00.0 THERAPEUTIC ULTRASOUND</icdcodedanddesc>
</Row>
<Row>
<icdcodedanddesc>00.01 THERAPEUTIC US VESSELS H</icdcodedanddesc>
</Row>
<Row>
<icdcodedanddesc>00.02 THERAPEUTIC ULTRASOUND O</icdcodedanddesc>
</Row>
</Root>
Here is my http service call:
<s:HTTPService id="icdcodeservice" url="ICD9V2MergeNumAndDescNotAllCodes.xml"
result="icdcodesService_resultHandler(event)" showBusyCursor="true" />
(I have tried resultFormat using object, array, xml).
I am using this following Tour de Flex example as the base -http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=1;sampleId =70500
and updating it with the httpservice call and result handler. But I cannot get the data to appear - I get [object Object] instead. In my result handler code I use "icdcodesar = new Array(event.result.Root.Row);" and then "icdcodesar.refresh();".
The key question is: How to I get data from an external xml file into an array without getting [object Object] when referencing the array entries. Thanks much!
(Tour de Flex example at http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=1;sampleId =70500 follows)
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:local="*"
skinClass="TDFGradientBackgroundSkin"
viewSourceURL="srcview/index.html">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace local "*";
s|Label {
color: #000000;
</fx:Style>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
private var names:ArrayCollection = new ArrayCollection(
["John Smith", "Jane Doe", "Paul Dupont", "Liz Jones", "Marie Taylor"]);
private function searchName(item:Object):Boolean
return item.toLowerCase().search(searchBox.text) != -1;
private function textChangeHandler():void
names.filterFunction = searchName;
names.refresh();
searchBox.dataProvider = names;
private function itemSelectedHandler(event:SearchBoxEvent):void
fullName.text = event.item as String;
]]>
</fx:Script>
<s:layout>
<s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
</s:layout>
<s:Panel title="Components Samples"
width="600" height="100%"
color="0x000000"
borderAlpha="0.15">
<s:layout>
<s:HorizontalLayout horizontalAlign="center"
paddingLeft="10" paddingRight="10"
paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:HGroup >
<s:Label text="Type a few characters to search:" />
<local:SearchBox id="searchBox" textChange="textChangeHandler()" itemSelected="itemSelectedHandler(event)"/>
</s:HGroup>
<mx:FormItem label="You selected:" >
<s:TextInput id="fullName"/>
</mx:FormItem>
</s:Panel>
</s:Application>Hello,
Instead of extracting the first zero element from the vid array, you should take that out and connect it allone.
Attachments:
init.bmp 339 KB -
Hi,
From my reading of XML Db papers, it seems to indicate to me, that it is possible to load XML datafiles via ftp.
Please could someone give me an example of how this would be done, as I cannot find a concrete
example in the documentation.
Thanks for your attention.
PeteC:\>ftp
ftp> open localhost 2100
Connected to mdrake-lap.
220 mdrake-lap FTP Server (Oracle XML DB/Oracle9i Enterprise Edition Release 9.2
.0.1.0 - Production) ready.
User (mdrake-lap:(none)): scott
331 pass required for SCOTT
Password:
230 SCOTT logged in
ftp> cd public
250 CWD Command successful
ftp> mkdir test
257 MKD command successful
ftp> cd test
250 CWD Command successful
ftp> pwd
257 "/public/test" is current directory.
ftp> put c:\temp.txt temp.txt
200 PORT Command successful
150 ASCII Data Connection
226 ASCII Transfer Complete
ftp: 305 bytes sent in 0.00Seconds 305000.00Kbytes/sec.
ftp> get temp.txt -
200 PORT Command successful
150 ASCII Data Connection
Hello
This is a simple text file.....
It is stored in the Resource View, If it were a schema based XML file, and the
Schema had been registered with XML DB, then the Resource View would contain a
reference to a row stored in the default table identified by the XML Schema.
Does this help...
226 ASCII Transfer Complete
ftp: 305 bytes received in 0.03Seconds 10.17Kbytes/sec.
ftp> quit
221 QUIT Goodbye.
C:\>sqlplus scott/tiger
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Jun 24 12:54:27 2002
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> set long 10000
SQL> select xdburitype('/public/test/temp.txt').getCLob() from dual;
XDBURITYPE('/PUBLIC/TEST/TEMP.TXT').GETCLOB()
Hello
This is a simple text file.....
It is stored in the Resource View, If it were a schema based XML file, and the
Schema had been registered with XML DB, then the Resource View would contain a
reference to a row stored in the default table identified by the XML Schema.
Does this help...
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
C:\> -
How to add a new field in the cube and load data
Hi,
The requirement is
We have ZLOGISTICS cube , the data souce of this filed has REFDCONR-reference dcument number filed . We have to create a new field in cube load data and get this new filed into the report also.
Please any one can help me with the step by step process of how to do?
How to get the data into BW and into the report.Hi,
So you need that this new field have data in old records?
1.- If you are in BI 7.0 and the logic or data for that New field are in the same Dimension, you can use a Remodeling to fill it. I mean if you want if you want to load from a Master Data from other InfoObject in the same Dim.
2.- If condition "1" is not yours.
First add the new field, then create a Backup Cube (both cubes with the new field) and make a full update with all information in the original Cube. The new field willl be empty in both cubes.
Create an UR from BackUp_Cube to Original_Cube with all direct mapping and create a logic in the Start Routine of the UR (modiying the data_package) you can look for the data in the DSO that you often use to load.
To do that both cubes have to be Datasources ( right click on Cube-> aditional function-> and I think is "Extract Datasource")
Hope it helps. Regards, Federico -
Error while Loading data Via Integrator
Hi,
I'm currently following the GettingStarted screencast series 3.0 in youtube.
In the 'loadData.grf', while i'm trying to load data's to data domain after configuring the 'Reformat' and 'ExHashJoin' I'm getting below error, can anyone kindly help me?
INFO [main] - *** CloverETL framework/transformation graph, (c) 2002-2013 Javlin a.s, released under GNU Lesser General Public License ***
INFO [main] - Running with CloverETL library version 3.3.0 build#036 compiled 12/02/2013 18:45:45
INFO [main] - Running on 4 CPU(s), OS Windows 7, architecture amd64, Java version 1.7.0_07, max available memory for JVM 668160 KB
INFO [main] - Loading default properties from: defaultProperties
INFO [main] - Graph definition file: graph/Copy of LoadData1.grf
INFO [main] - Graph revision: 1.17 Modified by: MANJU Modified: Tue Jul 23 08:08:54 IST 2013
INFO [main] - Checking graph configuration...
ERROR [main] - Graph configuration is invalid.
WARN [main] - [Join Dim on Facts:JOIN_DIM_ON_FACTS] - Input port 4 not defined or mapping has too many elements (number of input ports: 4)
ERROR [main] - [ResponseSurvey:RESPONSE_SURVEY] - At least 1 output port must be defined!
ERROR [main] - Error during graph initialization !
Element [1371098357416:LoadData]-Graph configuration is invalid.
at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:263)
at org.jetel.graph.runtime.EngineInitializer.initGraph(EngineInitializer.java:239)
at org.jetel.main.runGraph.runGraph(runGraph.java:377)
at org.jetel.main.runGraph.main(runGraph.java:341)
Caused by: org.jetel.exception.ConfigurationException: [ResponseSurvey:RESPONSE_SURVEY] - At least 1 output port must be defined!
at org.jetel.exception.ConfigurationProblem.toException(ConfigurationProblem.java:156)
at org.jetel.exception.ConfigurationStatus.toException(ConfigurationStatus.java:106)Hi,
I've managed to recreate the graph.But stuck with other error on the "Getting started" application.
This time I'm adding "Geography Dim" and "Reseller Dim" through ExHash join to "Join Dims to Fact".
I've got the below error
INFO [main] - *** CloverETL framework/transformation graph, (c) 2002-2013 Javlin a.s, released under GNU Lesser General Public License ***
INFO [main] - Running with CloverETL library version 3.3.0 build#036 compiled 12/02/2013 18:45:45
INFO [main] - Running on 4 CPU(s), OS Windows 7, architecture amd64, Java version 1.7.0_07, max available memory for JVM 668160 KB
INFO [main] - Loading default properties from: defaultProperties
INFO [main] - Graph definition file: graph/LoadData.grf
INFO [main] - Graph revision: 1.26 Modified by: MANJU Modified: Thu Jul 25 23:54:02 IST 2013
INFO [main] - Checking graph configuration...
INFO [main] - Graph configuration is valid.
INFO [main] - Graph initialization (LoadData)
INFO [main] - [Clover] Initializing phase: 0
INFO [main] - [Clover] phase: 0 initialized successfully.
INFO [WatchDog] - Starting up all nodes in phase [0]
INFO [WatchDog] - Successfully started all nodes in phase!
ERROR [WatchDog] - Graph execution finished with error
ERROR [WatchDog] - Node GEOGRAPHY_DIM finished with status: ERROR caused by: Component pre-execute initialization failed.
ERROR [WatchDog] - Node GEOGRAPHY_DIM error details:
Element [GEOGRAPHY_DIM:Geography Dim]-Component pre-execute initialization failed.
at org.jetel.graph.Node.run(Node.java:458)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 10
at org.jetel.data.parser.AhoCorasick.isPattern(AhoCorasick.java:182)
at org.jetel.data.parser.CharByteDataParser$ByteRecordSkipper.skipInput(CharByteDataParser.java:1594)
at org.jetel.data.parser.CharByteDataParser.skip(CharByteDataParser.java:264)
at org.jetel.util.MultiFileReader.skip(MultiFileReader.java:341)
at org.jetel.util.MultiFileReader.nextSource(MultiFileReader.java:286)
at org.jetel.util.MultiFileReader.preExecute(MultiFileReader.java:498)
at org.jetel.component.DataReader.preExecute(DataReader.java:237)
at org.jetel.graph.Node.run(Node.java:456)
... 1 more
INFO [WatchDog] - [Clover] Post-execute phase finalization: 0
INFO [WatchDog] - [Clover] phase: 0 post-execute finalization successfully.
INFO [WatchDog] - Execution of phase [0] finished with error - elapsed time(sec): 0
ERROR [WatchDog] - !!! Phase finished with error - stopping graph run !!!
INFO [WatchDog] - -----------------------** Summary of Phases execution **---------------------
INFO [WatchDog] - Phase# Finished Status RunTime(sec) MemoryAllocation(KB)
INFO [WatchDog] - 0 ERROR 0 27979
INFO [WatchDog] - ------------------------------** End of Summary **---------------------------
INFO [WatchDog] - WatchDog thread finished - total execution time: 5 (sec)
INFO [main] - Freeing graph resources.
ERROR [main] - Execution of graph failed !
kindly help. -
Creating the outline and Loading data for TBC in 11.1.2.2
Hi all, feelin kinda dumb here because this task really should not be as difficult as it seems.
I am trying to Load the TBC application in 11.1.2.2 Essbase. I have followed the documentation to
1. Install EIS
2. create the metadata repository and load the xml file provided
I now need to create the essbase cube from this metadata repository, I cannot seem to find any real steps as to how to do this, everything I found was pertaining to creating the repository. Can anyone help define what needs to be done and what steps I need to take, I am new to EIS and Studio so the simpler the better :)
thanxthanx, this did give me a better understanding of essbase studio, thank you. It did not help so much as getting the structure and data from the repository into essbase. For that from what I understand I can import models from EIS (where I loaded the TBC) one. In doing this I get an error saying that it cannot find any models (which I know are there because I can look at them in EIS. Unfortunately, looking over other posts, I installed Studio on a 64 bit server, which may be the issue I am facing (I hope)
I am going to try and reinstall studio on a 32 bit platform and try the import again. -
Creating scenario dimension and loading data
Hi all,
We have two fact tables. The first one is sales that include quantity and subtotal columns. The other one is budget that include quantity and subtotal. We are working with hyperion essbase 9.3. First of all we are creating two model. For sales model we create 7 dimensions (product, chanell, time, company, currency, customer, account) and 3 attribute dimension and for budget model we create 4 dimensions (account,company,customer,product) in metaoutline. And we create 2 application for each metaoutline. We plan to report sales vs budget but we don't know how to join sales and budget data. Everybody recommends scenario dimension. we don't know how to create sceneraio dimension and in which application Essbase integration or Essbase administration services.
thank you.I agree with Cameron. The best way is to put them into one cube. Since you are using a SQL source you can manulate it to have your budget load to the same time level as your actuals. For example suppose you load actuals daily and Budget is Monthly. for consistancy, you could load the budget data into the 15th day of the month. At the Monthly level where you would compare budget to actual, the numbers will be correct. Loading into dummy members for the dimensions that don't exist for budget is a common practice when trying to sync up data. If you really want to make it easy, you could union a view to make it look like you have a single fact table (based on the combo of budget and actual) and have a single metadata outline to load everything. I prefer having two because of different load requirements, but this is an option.
If you don't want to go this way, the next option is to partition your budget data into the actuals cube. this would keep them seperate but allow you to see them togeter. Between the two option, I prefer the single cube approach better -
Delivery date and loading date is same
Hello ,
Issue decription:
The system calculating delivery=loading date , though the route is maintained for 9 days trasit days.
This problem is with only one routeA.
When i have created SO for material M123 with route "B" shipping Point 0001, the system consider transit duration of the route.But when Sales order (SO )is placed for materail M123, shipping Point 0001, and route A, system is not considering the transit duration.
Kindly let me know any config change is required with respect to route or forwarding agent.Hi,
Check for the route A what's the transit duration time has maintained.The system uses the transit time from delivery scheduling as well as other time estimates (for example, the loading time) to determine the dates by which the goods must be available for picking, packing, and loading.Finally check the factory calendar if forwarding agent facory calendar has not maintaained it will consider the shipping point calendar.
Regards,
Hari Challa. -
Planning Good Issue date and loading date
Hi All,
How I can get the planning Good issue date? I found that the loading date is the same as the planned Good issue date, what's the loading time?
As what I understanding, loading date + loading time = Good issue date, But I am not sure how to calculate the planned Good issue date.
thanks,Hello Friend,
It is determined in Shipping Point configuration.The path is as follows SPRO--> Enterprise Structure >Definition>Logistics Execution-->Define, copy, delete, check shipping point and go in detail the concerned shipping point. -
How to save data and load data from an arrayList ??
i got a run time problem .....when i try to save my data to a file and load a data from a file....i got some kind of error like that
Please enter your CD`s title : ivan
Please enter your CD`s Artist/GroupName : diw
Please enter your CD`s year of release : wid
InputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) java.util.InputMismatchException
Invaild value....Please enter the value between 1000 & 9999
Please enter your CD`s MusicGenre(e.g.: Jazz, Blues, Funk, Classical, Rock, etc...) : w
Please enter your CD`s comment : w
Do you have another Cd ? (Y/N) : n
Saving to file
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at Demo.loadDate(Demo.java:49)
at Demo.readDataFromConsole(Demo.java:103)
at Demo.main(Demo.java:173)
Exit code: 0
import java.util.ArrayList;
import java.io.*;
public class Demo{
readOperation theRo = new readOperation();
errorCheckingOperation theEco = new errorCheckingOperation();
ArrayList<MusicCd> MusicCdList;
public Demo()
private void heading()
System.out.println("\tTesting read data from console, save to file, reopen that file\t");
private void saveDate()
MusicCdList = new ArrayList<MusicCd>( );
try
File f = new File("jessica.txt");
FileOutputStream fos = new FileOutputStream(f);
ObjectOutputStream oos = new ObjectOutputStream(fos);
for( MusicCd s : MusicCdList)
oos.writeObject(s);
oos.close();
catch (IOException ioe)
ioe.printStackTrace();
private void loadDate()
MusicCdList = new ArrayList<MusicCd>( );
try
File g = new File("jessica.txt");
FileInputStream fis = new FileInputStream(g);
ObjectInputStream ois = new ObjectInputStream(fis);
ArrayList<String> stuff = (ArrayList<String>)ois.readObject();
for( String s : stuff ) System.out.println(s);
ois.close();
} catch (Exception ioe)
ioe.printStackTrace();
private void readDataFromConsole()
//private void insertCd()
ArrayList<MusicCd> MusicCdList = new ArrayList<MusicCd>( );
readOperation theRo = new readOperation();
errorCheckingOperation theEco = new errorCheckingOperation();
MusicCd theCd;
String muiseCdsTitle;
String muiseCdsArtistOrGroupName;
int muiseCdsYearOfRelease;
int validMuiseCdsYearOfRelease;
String muiseCdsMusicGenre;
String muiseCdsAComment;
while(true)
String continueInsertCd = "Y";
do
muiseCdsTitle = theRo.readString("Please enter your CD`s title : ");
muiseCdsArtistOrGroupName = theRo.readString("Please enter your CD`s Artist/GroupName : ");
muiseCdsYearOfRelease = theRo.readInt("Please enter your CD`s year of release : ");
validMuiseCdsYearOfRelease = theEco.errorCheckingInteger(muiseCdsYearOfRelease, 1000, 9999);
muiseCdsMusicGenre = theRo.readString("Please enter your CD`s MusicGenre(e.g.: Jazz, Blues, Funk, Classical, Rock, etc...) : ");
muiseCdsAComment = theRo.readString("Please enter your CD`s comment : ");
MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsArtistOrGroupName, validMuiseCdsYearOfRelease ,
muiseCdsMusicGenre, muiseCdsAComment));
MusicCdList.trimToSize();
//saveToFile(MusicCdList);
continueInsertCd = theRo.readString("Do you have another Cd ? (Y/N) : ");
}while(continueInsertCd.equals("Y") || continueInsertCd.equals("y") );
if(continueInsertCd.equals("N") || continueInsertCd.equals("n"));
System.out.println("Saving to file ");
//MusicCdList.add(new MusicCd(muiseCdsTitle, muiseCdsYearOfRelease));
saveDate();
loadDate();
break;
public static void main(String[] args)
Demo one = new Demo();
one.readDataFromConsole();
how should i fix it if i want to reach the save to a file and load from a file purpose??
thx all
for much more understand of this program
import java.io.Serializable;
public class MusicCd implements Serializable
private String musicCdsTitle;
private String artistOrGroupName;
private int yearOfRelease;
private String musicGenre;
private String aComment;
public MusicCd()
musicCdsTitle = "";
artistOrGroupName = "";
yearOfRelease = 1000;
musicGenre = "";
aComment = "";
public MusicCd(String newMusicCdsTitle, String newArtistOrGroupName, int newYearOfRelease,
String newMusicGenre, String aNewComment)
musicCdsTitle = newMusicCdsTitle;
artistOrGroupName = newArtistOrGroupName;
yearOfRelease = newYearOfRelease;
musicGenre = newMusicGenre;
aComment = aNewComment;
public String getTitle()
return musicCdsTitle;
public String getArtistOrGroupName()
return artistOrGroupName;
public int getYearOfRelease()
return yearOfRelease;
public String getMusicGenre()
return musicGenre;
public String getAComment()
return aComment;
public void setTitle(String newMusicCdsTitle)
musicCdsTitle = newMusicCdsTitle;
public void setArtistOrGroupName(String newArtistOrGroupName)
artistOrGroupName = newArtistOrGroupName;
public void setYearOfRelease(int newYearOfRelease)
yearOfRelease = newYearOfRelease;
public void setMusicGenre(String newMusicGenre)
musicGenre = newMusicGenre;
public void setAComment(String aNewComment)
aComment = aNewComment;
public boolean equalsName(MusicCd otherCd)
if(otherCd == null)
return false;
else
return (musicCdsTitle.equals(otherCd.musicCdsTitle));
public String toString()
return("Title: " + musicCdsTitle + "\t"
+ "Artist/GroupName: " + artistOrGroupName + "\t"
+ "Year of release: " + yearOfRelease + "\t"
+ "Music Genre: " + musicGenre + "\t"
+ "Comment: " + aComment + "\t" );
}import java.util.*;
public class readOperation{
public String readString(String userInstruction)
String aString = null;
try
Scanner scan = new Scanner(System.in);
System.out.print(userInstruction);
aString = scan.nextLine();
catch (NoSuchElementException e)
//if no line was found
System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
catch (IllegalStateException e)
// if this scanner is closed
System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
return aString;
public char readTheFirstChar(String userInstruction)
char aChar = ' ';
String strSelection = null;
try
//char charSelection;
Scanner scan = new Scanner(System.in);
System.out.print(userInstruction);
strSelection = scan.next();
aChar = strSelection.charAt(0);
catch (NoSuchElementException e)
//if no line was found
System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
catch (IllegalStateException e)
// if this scanner is closed
System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
return aChar;
public int readInt(String userInstruction) {
int aInt = 0;
try {
Scanner scan = new Scanner(System.in);
System.out.print(userInstruction);
aInt = scan.nextInt();
} catch (InputMismatchException e) {
System.out.println("\nInputMismatchException error occurred (the next token does not match the Integer regular expression, or is out of range) " + e);
} catch (NoSuchElementException e) {
System.out.println("\nNoSuchElementException error occurred (input is exhausted)" + e);
} catch (IllegalStateException e) {
System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
return aInt;
import java.util.Scanner;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class errorCheckingOperation
public int errorCheckingInteger(int checkThing, int lowerBound, int upperBound)
int aInt = checkThing;
try
while((checkThing < lowerBound ) || (checkThing > upperBound) )
throw new Exception("Invaild value....Please enter the value between " + lowerBound + " & " + upperBound );
catch (Exception e)
String message = e.getMessage();
System.out.println(message);
return aInt;
public int errorCheckingSelectionValue(String userInstruction)
int validSelectionValue = 0;
try
int selectionValue;
Scanner scan = new Scanner(System.in);
System.out.print(userInstruction);
selectionValue = scan.nextInt();
validSelectionValue = errorCheckingInteger(selectionValue , 1, 5);
catch (NoSuchElementException e)
//if no line was found
System.out.println("\nNoSuchElementException error occurred (no line was found) " + e);
catch (IllegalStateException e)
// if this scanner is closed
System.out.println("\nIllegalStateException error occurred (scanner is closed)" + e);
return validSelectionValue;
}Message was edited by:
Ivan1238
Message was edited by:
Ivan1238You should thoroughly check you code. It's full of problems.
For example in saveDate():
You create a new empty ArrayList and then want so save it's contents. I guess, the file size is always 0.
For example in loadDate():
Since you read from an empty file you get an EOFException. This is ok and you should catch and treat the exception properly.
You try to read the ArrayList instead of single MusicCd objects, although in saveDate you saved the single MusicCD objects. You can only read from the file what to saved in it before.
I suggest to write the size of the ArrayList as first object in the file. Then you know how much you can expect to read when loading from the file.
private void saveDate()
try
File f = new File("jessica.txt");
FileOutputStream fos = new FileOutputStream(f);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(new Integer(MusicCdList.size()));
for( MusicCd s : MusicCdList)
oos.writeObject(s);
oos.close();
catch (IOException ioe)
ioe.printStackTrace();
} -
Column Mapping while loading data via tab delimited text file
While attempting to load data I get an error message at the "Define Column Mapping" step. It reads as follows:
1 error has occurred
There are NOT NULL columns in SYSTEM.BASICINFO. Select to upload the data without an error
The drop down box has the names of the columns, but I don't know how to map them to the existing field names, I guess.
By the way, where can I learn what goes in "format" at this same juncture.
Thanks!You can use Insert Into Array and wire the column index input instead of the row index as shown in the following pic:
Just be sure that the number of elements in Array2 is the same as the number of rows in Array1.
Message Edited by tbob on 03-07-2006 11:32 AM
- tbob
Inventor of the WORM Global
Attachments:
Add Column.png 2 KB -
Look up two ODS and load data to the cube
Hi ,
I am trying to load data to the Billing Item Cube.The cube contains some fileds which are loaded from the Billing Item ODS which is loaded from 2LIS_13_VDITM directly from the datasource, and there are some fields which needs to be looked up in the Service Order ODS and some fields in the Service Orders Operations ODS.I have written a Start Routine in the Cube update rules.Using the select statement from both the ODS i am fetching the required fields from the both ODS and i am loading them to the internal tables and in the Update rules i am writing the Update routine for the fields using Read statement.
I am getting an error when it is reading the second select statement(from second ODS).
The error message is
You wanted to add an entry to table
"\PROGRAM=GPAZ1GI2DIUZLBD1DKBSTKG94I3\DATA=V_ZCSOD0100[]", which you declared
with a UNIQUE KEY. However, there was already an entry with the
same key.
The error message says that there is an Unique Key in the select statement which is already an entry.
Can any one please help me in providing the solution for this requirement.I would appreciate your help if any one can send me the code if they have written.
Thanks in Advance.
BobbyHi,
Can you post the select statements what you have written in Start routine.
regards,
raju -
Calling a new browser window with WD Abap and passing data via POST
Hi there,
does anybody know whether passing data via POST method is possible when opening a new browser window from within a Web Dynpro Component? In my case I use method IF_WD_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW for opening a new browser window. Now I want to pass a big amount of data which is only possible via POST method. How can I achieve that or is it not considered inside the Web Dynpro Framework?
Kind regards,
AlbertHi Priya,
can you please explain a little bit more what you mean? I didn't get it..
Kind regards,
Albert
Maybe you are looking for
-
Reg Creating Physical Standby Control File
Hi, I am trying to create a physical standby in the same server in a different partition. I have copied the home and changed the init.ora file. I have created listeners. I did creating standby Control file Using alter database create standby controlf
-
What is the error in this program??????
class FindArea public static void main(String args[]) float radius=7.0f; float area=(22/7)*(radius)*(radius); System.out.println(area); When i execute the above program i am getting output as 147.0 why it is happening???? I dont understand..... Actua
-
Can't re-install OSX 10.1 on iBook G3 700 MHz
Hey, When I try and install the OS either by software restore or the OSX disc itself, it can't find the HD. A previous install attempt went sour and now I think I'm paying the price. I think the HD is okay physically. I have a powerbook and external
-
Files won't save to remote in CS4.
I started this website in CS3 and right before my upgrade, the "Save to Remote" stopped saving. I have upgraded to CS4 and still on this one website, I can not "Save to Remote". Nothing changes on the remote end after my save. Any ideas on what to
-
When I opened iphoto 6, it asked me if I wanted to update caches,but I chose "later". However, it shows no photos even though files are still there. I relaunched iphoto using alt key and it asked me to either create new library or choose library. I s