Beginner RMI help needed
Hello all,
I have fallen into a major problem. i am trying to get my first RMI system working and have looked numerous places for help. I have followed http://patriot.net/~tvalesky/easyrmi.html and cannot get passed running the client program.
The coding is the same as the tutorial, i get the following errors...
D:\RMI>java myRMIClient 10.0.0.7
Exception occured: java.security.AccessControlException: access denied (java.net
.SocketPermission 127.0.0.7:1099 connect,resolve)
D:\RMI>java -Djava.security.policy="d:\RMI\wideopen.policy" myRMIClient 127.0.0.1
Exception occured: java.rmi.NotBoundException: myRMIImplInstance
------wideopen.policy------
grant {
// Allow everything for now
permission java.security.AllPermission;
I really appreciate anyone who can help me. It is pretty urgent as i need to get this first exercise working.
Many thanks, Riku
Hello All,
Many thanks for your advice,
I have taken off the quotes and have tried to run the policy file on the server.
When i launch rmiregistry on command prompt it shows on firewall:
Protocol----Executable------- Remote-----------Local----------------- Sent---------Recieved
TCP______rmiregistry_____---___________Host Name:1099__0________0
I then start myRMIServer
On the command prompt it hangs on java -Djava.security.policy=d:\RMI\wideopen.policy myRMIServer 127.0.0.1
On the firewall it states:
TCP______java.exe______Host Name:1099_Host Name:1691__252________37
That TCP dissapears after a timeout but on command prompt it hangs until i press CTRL+C
I cannot explain what is happening there.
I am not experienced enough to understand the code either.
I really appreciate if you can give me more guidance on this.
Thanks, Riku :)
Similar Messages
-
Beginner Question - Help Needed for EJB QL Sample Application
I'm working with a group of student interns, like myself, and we've been given an assignment to work with Oracle. All of us have no training or experience with this, so we're just learning as we go.
I've been trying to run the EJB QL Sample Application (http://www.oracle.com/technology/sample_code/tech/java/ejb_corba/ejbql/Install.html), but I keep running into problems at step 3.
Now, we will deploy the sample application onto OC4J. Open another command prompt and go to the folder <OC4J_HOME>/j2ee/home and run the following commands one-by-one
> java -jar admin.jar ormi://<machine_name>:<admin_port> admin <admin_pwd> -deploy -file <SAMPLE_HOME>/build/ejbql.ear -deploymentName Ejbql
> java -jar admin.jar ormi://<machine_name>:<admin_port> admin <admin_pwd> -bindWebApp Ejbql ejbql-war http-web-site /ejbql
where,
<machine_name> Name of the machine where OC4J Server is running
<admin_port> Admin Port on which the OC4J server listens. This value by default is 23791 unless explicitly changed by the user
<admin_pwd> Adminstrator password to access OC4J. The default value is welcome
When I do this step I get this error:
Error: Unable to find java:comp/ServerAdministrator: Lookup error: javax.naming.
AuthenticationException: Invalid username/password for default (sds); nested exc
eption is:
javax.naming.AuthenticationException: Invalid username/password for defa
ult (sds)
com.evermind.client.orion.AdminCommandException: Unable to find java:comp/Server
Administrator: Lookup error: javax.naming.AuthenticationException: Invalid usern
ame/password for default (sds); nested exception is:
javax.naming.AuthenticationException: Invalid username/password for defa
ult (sds)
at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
nsole.java:105)
at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
:27)
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException
: Invalid username/password for default (sds); nested exception is:
javax.naming.AuthenticationException: Invalid username/password for defa
ult (sds) [Root exception is javax.naming.AuthenticationException: Invalid usern
ame/password for default (sds)]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:153)
at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
nsole.java:102)
at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
:27)
Caused by: javax.naming.AuthenticationException: Invalid username/password for d
efault (sds)
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2410
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2226
at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1692)
at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:727)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:134)
... 2 more
---- Embedded exception
javax.naming.AuthenticationException: Invalid username/password for default (sds
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2410
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2226
at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1692)
at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:727)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:134)
at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminCo
nsole.java:102)
at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java
:27)
Any suggestions to fix this error?
Thanks in advance for any help.George,
The Readme.html file is available with the ejbqlsample.jar downloadable (Extract and find the doc in Ejbql\docs\Readme.html) which is printable.
Or,
If you are trying to print the file directly from OTN site, you need to set the Page-Setup Orientation to 'Landscape'.
Hope this helps.
Regards
Pushkala -
Sockets in rmi, help needed
hi,
I need a help on using sockets in rmi for communication between the server and the client. I am trying to establish a communication between the server and client through sockets after the remote method call is invoked but before it is fulfilled. I my code the socket is not establishing in the client side. Do help me out at the earliest pls... thanks in advance..I am trying to use sockets inside a rmi. Still i have the problem. I cant get my client listen from the server.
First the client invokes a remote object. Before server sending the actual request of the requested by the remote object i want to make some communication between the server and client through sockets.
I created a ServerSocket in the client side. The problem I have is the ServerSocket is not listening to the server request.
Here i ve my code.I cant figure out what mistake i have done. It also dont show any error. As i am new to RMI and sockets i am in need of help. So pls do help me... Thanks in advance.
In my example i am trying to verify the password before the server downloads the file for the client. So i want the verification done through sockets and download file using RMI.
FileInterface.java
import java.rmi.*;
public interface FileInterface extends Remote
public byte[] downloadFile(String fileName) throws RemoteException;
FileServer.java
import java.rmi.*;
import java.io.*;
public class FileServer
public static void main(String []args)
if(System.getSecurityManager()==null)
System.setSecurityManager(new RMISecurityManager());
try
FileImpl fi=new FileImpl("FileServer");
Naming.rebind("FileServer",fi);
System.out.println("Server bound"+fi);
catch(Exception e)
System.out.println("FileServer: "+e.getMessage());
FileImpl.java
import java.io.*;
import java.net.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class FileImpl extends UnicastRemoteObject implements FileInterface
private String name;
public FileImpl(String s) throws RemoteException
super();
name=s;
public byte[] downloadFile(String fileName)
try
Socket soc=new Socket(RemoteServer.getClientHost(),5000);
OutputStream os=soc.getOutputStream();
PrintStream ps=new PrintStream(os);
System.out.println("Going to send message");
ps.println("Enter the password : ");
System.out.println("Sent message");
InputStream is=soc.getInputStream();
InputStreamReader isr=new InputStreamReader(is);
BufferedReader br=new BufferedReader(isr);
String res=br.readLine();
PasswordControl pc=new PasswordControl(res,br);
System.setSecurityManager(pc);
File file=new File(fileName);
byte [] buffer=new byte[(int)file.length()];
BufferedInputStream input=new BufferedInputStream(new FileInputStream(fileName));
input.read(buffer,0,buffer.length);
input.close();
return(buffer);
catch(Exception e)
System.out.println("FileImpl: "+e.getMessage());
e.printStackTrace();
return(null);
public class PasswordControl extends SecurityManager
String password;
BufferedReader br;
public PasswordControl(String password,BufferedReader br)
this.password=password;
this.br=br;
public boolean accessOk()
String response = "";
try
if(response.equals(password))
return true;
else
return false;
catch(Exception e)
return false;
public void checkRead(String fname)
if(fname.equals("sample.txt"))
if(!accessOk())
super.checkRead(fname);
throw new SecurityException("Access denied to read from the file sample.txt");
else
FilePermission fp=new FilePermission(fname,"read");
checkPermission(fp);
FileClient.java
import java.io.*;
import java.net.*;
import java.rmi.*;
public class FileClient implements Runnable {
Socket soc;
String filename;
byte[] filedata;
public FileClient(String filename, String host)
this.filename = filename;
try
ServerSocket ss=new ServerSocket(5000);
System.out.println("Created a socket"+ss);
String name = "//" + host + "/FileServer";
FileInterface fi = (FileInterface) Naming.lookup(name);
System.out.println("Got the interface "+fi);
while(true)
soc=ss.accept();
new Thread(this).start();
} catch(Exception e)
e.printStackTrace();
public static void main(String argv[]) {
if(argv.length != 2) {
System.out.println("Usage: java FileClient fileName machineName");
System.exit(0);
new FileClient(argv[0], argv[1]);
public void run() {
try {
System.out.println(soc);
InputStream is=soc.getInputStream();
InputStreamReader isr=new InputStreamReader(is);
BufferedReader br=new BufferedReader(isr);
System.out.println("Created the readers"+br);
String req=br.readLine();
System.out.println("Going to print request");
System.out.println(req);
String password=br.readLine();
OutputStream os=soc.getOutputStream();
PrintStream ps=new PrintStream(os);
ps.println(password);
filedata = fi.downloadFile(filename);
File file = new File(filename);
BufferedOutputStream output = new
BufferedOutputStream(new FileOutputStream(file.getName()));
output.write(filedata,0,filedata.length);
output.flush();
output.close();
} catch(Exception e) {
e.printStackTrace();
} -
Beginner CSS help needed - White space.
So, I'm creating this website...yes im a beginner, and I just dont know how to add white space onto each side of the site as to center it in the browser.
here's what I have...but, when I try and use "float:left;" the div sits outside the container, even though it is definitely inside it? Any recs? Thanks x
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #ffffff;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
height: auto;
#container {
width: 750px;
margin: 0 auto;
border: 1px solid #000000;
text-align: left;
background-color: #FFCCE6;
height: auto;Code fragments, screenshots, etc.. don't show us the problem. For best results here, you should upload your test page to your web server and post the URL here.
Using our browser and web developer toolbars, we can see your page, underlying code and trouble shoot what might be going wrong.
As a rule of thumb, build your HTML content logically from top to bottom of page. Then go back in and add division tags for your CSS to grab onto. My guess is that you have positioned the left column outside your main wrapper division. But without seeing your HTML and CSS code, the best we can do is make guesses.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
Hello everyone
I'm a Student and new to java and I have been given a question which I have to go through. I have come across a problem with one of the questions and am stuck, so I was wondering if you guys could help me out.
here is my code so far:
A Class that maintains Information about a book
This might form part of a larger application such
as a library system, for example.
@author (your name)
*@version (a version number or a date)*
public class Book
// instance variables or fields
private String author;
private String title;
Set the author and title when the book object is constructed
public Book(String bookAuthor, String bookTitle)
author = bookAuthor;
title = bookTitle;
Return The name of the author.
public String getAuthor()
return author;
Return The name of the title.
public String getTitle()
return title;
and below are the questions that I need to complete. they just want me to add codes to my current one, but the problem is I don't know where to put them and how I should word them, if that makes sense.
Add a further instance variable/field pages to the Book class to store the number of pages in the book.
This should be of type int and should be set to 0 in the Constructor.
Add a second Constructor with signature
public Book(String bookAuthor, String bookTitle, int noPages) so it has a third parameter passed to it as well as the author and title;
this parameter is used - obviously?? - to initialise the number of pages.
Note: This is easiest done by making a copy of the existing Constructor and adding the parameter.
Add a getPages() accessor method that returns the number of pages in the book.
Add a method printDetails() to your Book class. This should print out the Author title and number of pages to the Terminal Window. It is your choice as to how the data is formatted, perhaps all on one line, perhaps on three, and with or without explanatory text. For instance you could print out in the format:
Title: Robinson Crusoe, Author: Daniel Defoe, Pages:226
Add a further instance variable/field refNumber() to your Book class. This stores the Library's reference number. It should be of type String and be initialised to the empty String "" in the constructor, as its initial value is not passed in as a parameter. Instead a public mutator method with the signature:
public void setRefNumber(String ref) should be created. The body of this method should assign the value of the method parameter ref to the refNumber.
Add a corresponding getRefNumber() accessor method to your class so you can check that the mutator works correctly
Modify your printDetails() method to include printing the reference number of the book.
However the method should print the reference number only if it has been set - that is the refNumber has a non-zero length.
If it has not been set, print "ZZZ" instead.
Hint Use a conditional statement whose test calls the length() method of the refNumber String and gives a result like:
Title: Jane Eyre, Author: Charlotte Bronte, Pages:226, RefNo: CB479 or, if the reference number is not set:
Title: Robinson Crusoe, Author: Daniel Defoe, Pages:347, RefNo: ZZZ
Modify your setRefNumber() method so that it sets the refNumber field only if the parameter is a string of at least three characters. If it is less than three, then print an error message (which must contain the word error) and leave the field unchanged
Add a further integer variable/field borrowed to the Book class, to keep a count of the number of times a book has been borrowed. It should (obviously??) be set to 0 in the constructor.
Add a mutator method borrow() to the class. This should increment (add 1 to) the value of borrowed each time it is called.
Include an accessor method getBorrowed() that returns the value of borrowed
Modify Print Details so that it includes the value of the borrowed field along with some explanatory text
PS. sorry it looks so messey1. In the future, please use a more meaningful subject. "Help needed with java" contains no information. The very fact that you're posting here tells us you need help with Java. The point of the subject is to give the forum an idea of what kind of problem you're having, so that individuals can decide if they're interested and qualified to help.
2. You need to ask a specific question. If you have no idea where to start, then start here: [http://home.earthlink.net/~patricia_shanahan/beginner.html]
3. When you post code, use code tags. Copy the code from the original source in your editor (NOT from an earlier post here, where it will already have lost all formatting), paste it in here, highlight it, and click the CODE button. -
Hi there everyone, pls help me . i have a question as above
"Code a Java class called Calendar which has a static variable of type Date(initialised to 1st January 2004), a static void method called tock(int days) to advance the variable by the specified number of days, and a static Date method called getDate() to return the current date.".
What i was thinking to write is.
public class Calendar
Date myDate = new Date();
myDate = java.sql.Date.valueOf("2004-01-01"); //but my fren said i could use the toString() instead
public static void tock(int days)
{ int i = 1;
while i < days;
Date = Date + 1; // i am not sure what i am doing ...i am just a beginner .pls help
public static Date getDate()
{ return Date;
Are my answers correct ..? how do i advance the variable (date) by the number of specified days ? the asnwer need to print out, say 4 days , u need to print 01 Jan , 02Jan , 03 Jan , 04 Jan...
anyone please help ..Since your assignment is to code a class named Calendar, I doubt that you can use the java.util.Calendar class,
which has a useful add() method in it.
So here is another solution:
public class Calendar
static Date myDate = java.sql.Date.valueOf("2004-01-01");
public static void tock(int days)
long t = myDate.getTime(); // returns the number of milliseconds since 1970-01-01 00:00:00 GMT
t = t + (days * 24 * 60 * 60 * 1000); // adds the appropriate number of days in milliseonds
myDate.setTime(t);
public static Date getDate()
return myDate; -
recording help needed. I'm a beginner, imac, logic express and helix board 12 firewire.
I have recorded my daughter voice only ok, BUT when i import audio file to track 1 as backing track and my daughter is using headphones from the helixboard to sing to she does not record to track 2 when all in enabled.
Should her headphone come from the imac and not the helix board
Regards
PaulCheck the recording channel in the channel strip.
It must be set the same as the audio interface channel.
cheers
rob -
Troubleshooting help needed: My iMac keeps crashing and restarting with a notice: "Spinlock application timed out" What can I do?
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports. -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Hi all help needed I have a canon 40D. I am thinking of buying a canon 6D.
But not sure that my lenses will work.
I have a 170mm/ 500mm APO Sigma.
A 10/20 ex Sigma HSM IF.
And a 180 APO Sigma Macro or do I have to scrap them and buy others.
ALL Help will be greatly received. Yours BRODIEIn short, I love it. I was going to buy the 5DMark III. After playing with it for a while at my local Fry's store where they put 5DMII, 5DMIII and 6D next to each other, using the same 24-105L lens, I decided to get the 6D and pocket the different for lens later.
I'm upgrading from the 30D. So I think you'll love it. It's a great camera. I have used 5DMII extensively before (borrowing from a close friend).
Funny thing is at first I don't really care about the GPS and Wifi much. I thought they're just marketing-gimmick. But once you have it, it is actually really fun and helpful. For example, I can place the 6D on a long "monopod", then use the app on the phone to control the camera to get some unique perspective on some scenes. It's fun and great. GPS is also nice for travel guy like me.
Weekend Travelers Blog | Eastern Sierra Fall Color Guide -
Help needed! Raid degraded again!
Hi!
Help needed! I hava made bootable RAID with two S-ATAII 250Gb HDD and its not working! Every now and then at bootup I get a message RAID -> DEGRADED... Must be seventh time! Rebuild takes its own time!
What am I doing wrong!
T: Ekku
K8N Neo4 Ultra
AMD 64 4200+
2 Gb RAM
2 x 250 Gb HDD (Maxtor)
nVidia RAID (in mb)
P.S. I wery SORRY with my poor language!I'm going to blame the nVRAID because I've seen issues with it in the past. If your motherboard has another non-nVidia RAID solution, use that instead. Using the nVidia SATA ports as BASE or JBOD is fine and dandy but RAIDing always had issues. It's not even a driver issue I think it's just instability. Latest drivers and even boxed drivers never helped. Granted, some will report success with their rig. But on a professional level I've seen nForce issues on different motherboards and different hard drives that had RAID disaster stories.
Good luck and if you don't have another RAID solution, my suggestion would be to buy a dedicated RAID controller card.
LPB -
HELP NEEDED WITH ADDAPTER-DVI TO VGA.
PLEASE ...HELP NEEDED WITH WIRING CROSS OVER....CAN YOU HELP WITH BACK OF PLUG CONNECTIONS...I SORTA UNDERSTAND THE PINOUTS BUT CANT MAKE AN EXACT MACH...WOULD LIKE TO BE 100% SURE...
......THIS ENSURES NO SMOKE!!!
THE CARD IS AN ATI RADEON RX9250-DUAL HEAD-.........ADDAPTER IS DVI(ANALOG)MALE TO VGA(ANALOG)FEMALE.
ANY HELP VERY MUCH APPRECIATED........ SEEMS YOU NEED TO BE ROCKET SCI TO ATTACH A BLOODY PICTURE...SO THIS HAS BEEN BIG WASTE OF FING TIME!Quote from: BOBHIGH on 17-December-05, 09:21:31
Get over it mate !
I find it easy t read CAPS...and if you dont like it ...DONT READ IT!
And why bother to reply...some people have nothing better to do.
Yes there chep and easy to come by...Ive already got a new one.
All I wanted was to make a diagram of whats inside the bloody thing...it was a simple question and required a simple answer.
NO NEED TO A WANKA !!
I feel a bann comming up.
Have you tryed Google ? really.. your question is inrelevant. No need to reply indeed.
Why do you come here asking this question anyway ? is it becouse you have a MSI gfx card ? and the adapter has nothing to do with this ?
You think you can come in here yelling.. thinking we have to put up with it and accept your style of posting. This is not a MSI tech center.. it's a user to user center.. Your question has nothing to do with MSI relavant things anyway's.
Google = your friend.
Quote from: BOBHIGH on 17-December-05, 09:21:31
it was a simple question and required a simple answer
Simple for who ? you (buying a new one) ? me ? we ? .really...........
Quote from: Dynamike on 16-December-05, 04:11:48
1: There are allot of diffrent types of those adapters.
If any of the mods have a problem about my reply.. please pm me. -
Help needed for grouping.
Hi,
Help needed .
I have an internal table having 6 .
Ex :
f1 f2 f3 f4 f5 f6
a aa 11 p1 10 10
a aa 12 p1 20 20
b aa 11 p2 30 30
b aa 12 p2 40 30
Now i want to sum the fields f5 and f6 individually and need to display based upon the fields f1 and f4.
To Display :
f1 f2 f3 f4 f5 f6
a aa 11 p1 30 30.
b aa 11 p2 70 60.
can anyone help me.How to do this..?
ThanksHere you go
DATA:
BEGIN OF cur_tab OCCURS 0,
f1 TYPE c,
f2(2) TYPE c,
f3(2) TYPE c,
f4(2) TYPE c,
f5(2) TYPE c,
f6(2) TYPE n,
END OF cur_tab.
DATA:
BEGIN OF sum_tab OCCURS 0,
f1 TYPE c,
f4(2) TYPE c,
f5 TYPE p,
f6 TYPE p,
END OF sum_tab.
DATA:
BEGIN OF final_tab OCCURS 0,
f1 TYPE c,
f2(2) TYPE c,
f3(2) TYPE c,
f4(2) TYPE c,
f5(5) TYPE c,
f6(5) TYPE c,
END OF final_tab.
START-OF-SELECTION.
cur_tab-f1 = 'a'.
cur_tab-f2 = 'aa'.
cur_tab-f3 = '11'.
cur_tab-f4 = 'p1'.
cur_tab-f5 = '10'.
cur_tab-f6 = '10'.
APPEND cur_tab.
cur_tab-f1 = 'a'.
cur_tab-f2 = 'aa'.
cur_tab-f3 = '11'.
cur_tab-f4 = 'p1'.
cur_tab-f5 = '20'.
cur_tab-f6 = '20'.
APPEND cur_tab.
cur_tab-f1 = 'b'.
cur_tab-f2 = 'aa'.
cur_tab-f3 = '11'.
cur_tab-f4 = 'p2'.
cur_tab-f5 = '30'.
cur_tab-f6 = '30'.
APPEND cur_tab.
cur_tab-f1 = 'b'.
cur_tab-f2 = 'aa'.
cur_tab-f3 = '11'.
cur_tab-f4 = 'p2'.
cur_tab-f5 = '40'.
cur_tab-f6 = '30'.
APPEND cur_tab.
LOOP AT cur_tab.
MOVE-CORRESPONDING cur_tab TO sum_tab.
COLLECT sum_tab.
ENDLOOP.
LOOP AT sum_tab.
READ TABLE cur_tab WITH KEY f1 = sum_tab-f1
f4 = sum_tab-f4.
IF sy-subrc NE 0.
WRITE:/ 'Something went very wrong'.
CONTINUE.
ENDIF.
MOVE-CORRESPONDING cur_tab TO final_tab.
MOVE-CORRESPONDING sum_tab TO final_tab.
APPEND final_tab.
ENDLOOP.
LOOP AT final_tab.
WRITE:/1 final_tab-f1,
AT 5 final_tab-f2,
AT 10 final_tab-f3,
AT 15 final_tab-f4,
AT 20 final_tab-f5,
AT 25 final_tab-f6.
ENDLOOP.
and the output
a aa 11 p1 30 30
b aa 11 p2 70 60 -
Help needed on installation of Oracle 9i on Sun Solaris 8
Hey,
Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
SimonI have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
Edited by: 916438 on Mar 31, 2012 5:55 PM -
Help needed on installation of Oracle 9i EE on Sun Solaris 8
Hey,
Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
SimonI have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
Edited by: 916438 on Mar 31, 2012 5:55 PM
Maybe you are looking for
-
Refurbished iPad not working right - return to Apple store?
Hey guys -- Simple question here but one I didn't see on a quick search. Picked up a refurbished iPad 2 on May 10th. The other day when I picked it up while playing a YouTube video, the screen faded to black quickly, almost like I'd hit the power bu
-
Problem with columns length under Firefox
I have a problem with Firefox. Possibly, someone could help? If you look at the following page www.tregor.fr using IE or Netscape, there is no problem. If you use Firefox, you will see that the display of the bottom page is not correct. The middle co
-
Can we change source of fx:include tag from controller class?
Is it possible to change source of <fx:include> tag from controller class? The requirement is to dynamically change certain section of a page.
-
Hi all, Although I am submitting this question in the Dreamweaver forum - please excuse me if this belongs somewhere else. We have a form that our employees fill out and submit on a daily/weekly/monthly basis. We get hundreds of these forms weekly.
-
Migration oracle 9i from sun solrise to RHEL
hello gurus we are working on migration from sun solaris 10 to red hat. for oracle 9i RAC. can anyone please guide us how we should go about that and if anybody can please provide me any supporting link. Thanks in advance Message was edited by: close