I need some help on packages...
Hello,
How do you use code like this:
import org.eclipse.swt.*;
import org.eclipse.swt.layout.FormAttachment;I've searched for a download of the package but I can't find it anywhere, I've seen this used in all sorts of code but have no idea how to utalise it myself. Any help would be greatfully recieved.
OK basically, I'm trying to put a status bar into my program using this code
[http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Updateastatuslinewhenanitemisarmed.htm]
But the code imports those "org.eclipse.swt.*;" packages, I've found APIs for it all over, but I can't see anywhere to download the actual package. I've used "com.X.X" packages before and I guess it's the same (?). Do you know where I can download it from?
Edited by: Mark.ONeill on Mar 8, 2008 6:38 PM
Similar Messages
-
Please I need some help with a table
Hi All
I need some help with a table.
My table needs to hold prices that the user can update.
Also has a total of the column.
my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
I have tried using but as I need to set the toal with something like total
totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
Can any one please advise on some way I can get this to work ?
Thanks for reading
CraigHi there camickr
thanks for the help the other day
this is my full code....
package printing;
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import javax.swing.*;
import javax.swing.table.*;
import java.text.DecimalFormat;
public class tablePanel
extends JDialog implements Printable {
BorderLayout borderLayout1 = new BorderLayout();
private boolean printing = false;
private Dialog1 dialog;
JPanel jPanel = new JPanel();
JTable table;
JScrollPane scrollPane1 = new JScrollPane();
DefaultTableModel model;
private String[] columnNames = {
private Object[][] data;
private String selectTotal;
private double total;
public tablePanel(Dialog1 dp) {
dp = dialog;
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
public tablePanel() {
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
private void jbInit() throws Exception {
jPanel.setLayout(borderLayout1);
scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
this.add(jPanel);
jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
scrollPane1.getViewport().add(table);
jPanel.setOpaque(true);
newTable();
addToModel();
addRows();
setTotal();
public static void main(String[] args) {
tablePanel tablePanel = new tablePanel();
tablePanel.pack();
tablePanel.setVisible(true);
public void setTotal() {
total = 0;
int i = table.getRowCount();
for (i = 0; i < table.getRowCount(); i++) {
String name = (String) table.getValueAt(i, 1);
if (!"".equals(name)) {
if (i != table.getRowCount() - 1) {
double dt = Double.parseDouble(name);
total = total + dt;
String str = Double.toString(total);
table.setValueAt(str, table.getRowCount() - 1, 1);
super.repaint();
public void newTable() {
model = new DefaultTableModel(data, columnNames) {
table = new JTable() {
public Component prepareRenderer(TableCellRenderer renderer,
int row, int col) {
Component c = super.prepareRenderer(renderer, row, col);
if (printing) {
c.setBackground(getBackground());
else {
if (row % 2 == 1 && !isCellSelected(row, col)) {
c.setBackground(getBackground());
else {
c.setBackground(new Color(227, 239, 250));
if (isCellSelected(row, col)) {
c.setBackground(new Color(190, 220, 250));
return c;
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
if (e.getClickCount() == 1) {
if (table.getSelectedColumn() == 1) {
table.setTableHeader(null);
table.setModel(model);
scrollPane1.getViewport().add(table);
table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
public void addToModel() {
Object[] data = {
"Price", "5800"};
model.addRow(data);
public void addRows() {
int rows = 20;
for (int i = 0; i < rows; i++) {
Object[] data = {
model.addRow(data);
public void printOut() {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(tablePanel.this);
pj.printDialog();
try {
pj.print();
catch (Exception PrintException) {}
public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.black);
int fontHeight = g2.getFontMetrics().getHeight();
int fontDesent = g2.getFontMetrics().getDescent();
//leave room for page number
double pageHeight = pageFormat.getImageableHeight() - fontHeight;
double pageWidth = pageFormat.getImageableWidth();
double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
double scale = 1;
if (tableWidth >= pageWidth) {
scale = pageWidth / tableWidth;
double headerHeightOnPage = 16.0;
//double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
//System.out.println("this is the hedder heigth " + headerHeightOnPage);
double tableWidthOnPage = tableWidth * scale;
double oneRowHeight = (table.getRowHeight() + table.getRowMargin()) * scale;
int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
double pageHeightForTable = oneRowHeight *numRowsOnAPage;
int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
if (pageIndex >= totalNumPages) {
return NO_SUCH_PAGE;
g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
//bottom center
g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages), (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
g2.translate(0f, headerHeightOnPage);
g2.translate(0f, -pageIndex * pageHeightForTable);
//If this piece of the table is smaller
//than the size available,
//clip to the appropriate bounds.
if (pageIndex + 1 == totalNumPages) {
int lastRowPrinted =
numRowsOnAPage * pageIndex;
int numRowsLeft =
table.getRowCount()
- lastRowPrinted;
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(oneRowHeight *
numRowsLeft));
//else clip to the entire area available.
else {
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(pageHeightForTable));
g2.scale(scale, scale);
printing = true;
try {
table.paint(g2);
finally {
printing = false;
//tableView.paint(g2);
g2.scale(1 / scale, 1 / scale);
g2.translate(0f, pageIndex * pageHeightForTable);
g2.translate(0f, -headerHeightOnPage);
g2.setClip(0, 0,
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(headerHeightOnPage));
g2.scale(scale, scale);
//table.getTableHeader().paint(g2);
//paint header at top
return Printable.PAGE_EXISTS;
class TableRenderDollar extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean isFocused,
int row, int column) {
setHorizontalAlignment(SwingConstants.RIGHT);
Component component = super.getTableCellRendererComponent(
table,
value,
isSelected,
isFocused,
row,
column);
if( value == null || value .equals("")){
( (JLabel) component).setText("");
}else{
double number = 0.0;
number = new Double(value.toString()).doubleValue();
DecimalFormat df = new DecimalFormat(",##0.00");
( (JLabel) component).setText(df.format(number));
return component;
} -
Need some help with threads...
Hello all,
I am working on a project at work, and I am not the best programmer in the world. I have been trying to get my head around this for a couple of days and just cannot get it to work.
I am writing an instrumentation control program that will have three threads. One is the GUI, one will receive control information and set up the hardware, and one will check the hardware status and report it to the GUI periodically. I plan on using the invokeLater() method to communicate the status to the GUI and change the status display in the GUI. Communication from the GUI to the controller thread and from the status thread to the controller thread I had planned on being piped input/output stream as appropriate. I have a control class and a status class that need to be communicated over these piped streams. In some trial code I have been unable to wrap the piped input/output streams with object input/output streams. I really need some help with this. Here is the main thread code:
package playingwiththreads1;
import java.io.*;*
*public class PlayingWithThreads1 {*
public static void main(String[] args) {*
* PipedOutputStream outputPipe = new PipedOutputStream();*
* ObjectOutputStream oos = null;*
* ReceiverThread rt = new ReceiverThread(outputPipe);*
// Start the thread -- First try*
* Thread t = new Thread(rt);*
t.start();*
// Wrap the output pipe with an ObjectOutputStream*
try*
oos = new ObjectOutputStream(outputPipe);*
catch (IOException e)*
System.out.println(e);*
// Start the thread -- Second try*
//Thread t = new Thread(rt);*
//t.start();*
/** Send an object over the pipe. In reality this object will be a
class that contains control or status information */
try
if (!oos.equals(null))
oos.writeObject(new String ("Test"));
catch (IOException e)
try
Thread.sleep(5000);
catch (InterruptedException e)
I read somewhere that it matters where you start the thread relative to where you wrap piped streams with the object streams. So, I tried the two places I felt were obvious to start the thread. These are noted in the comments. Here is the code for the thread.
package playingwiththreads1;
import java.io.*;
public class ReceiverThread implements Runnable {
private PipedInputStream inputPipe = new PipedInputStream();
private ObjectInputStream inputObject;
ReceiverThread (PipedOutputStream outputPipe)
System.out.println("Thread initialization - start");
try
inputPipe.connect(outputPipe);
inputObject = new ObjectInputStream(inputPipe);
catch (IOException e)
System.out.println(e);
System.out.println("Thread initialization - complete");
public void run()
System.out.println("Thread started");
try
if (inputObject.available() > 0)
System.out.println(inputObject.read());
catch (IOException e)
System.out.println(e);
Through testing I have determined that no matter where I start the thread, the thread never gets past the "inputObject = new ObjectInputStream(inputPipe);" assignment.
Could someone please help me with this? There are other ways for me to write this program, but this is the one that I would like to make work.
Many thanks in advance,
Rob Hix
Edited by: RobertHix on Oct 6, 2009 3:54 AMThanks for the help, but that did not work. I tried flushing the ObjectOutputStream and it is still hanging when initializing the thread.
Here is a better look at the code since I was helped to figure out how to insert it:
The main method:
package playingwiththreads1;
import java.io.*;
public class PlayingWithThreads1 {
public static void main(String[] args) {
PipedOutputStream outputPipe = new PipedOutputStream();
ObjectOutputStream oos = null;
ReceiverThread rt = new ReceiverThread(outputPipe);
// Start the thread -- First try
//Thread t = new Thread(rt);
//t.start();
// Wrap the output pipe with an ObjectOutputStream
try
oos = new ObjectOutputStream(outputPipe);
oos.flush();
catch (IOException e)
System.out.println(e);
// Start the thread -- Second try
Thread t = new Thread(rt);
t.start();
/* Send an object over the pipe. In reality this object will be a
* class that contains control or status information */
try
if (!oos.equals(null))
oos.writeObject(new String ("Test"));
oos.flush();
catch (IOException e)
System.out.pringln(e);
try
Thread.sleep(5000);
catch (InterruptedException e)
}The thread code:
package playingwiththreads1;
import java.io.*;
public class ReceiverThread implements Runnable {
private PipedInputStream inputPipe = new PipedInputStream();
private ObjectInputStream inputObject;
ReceiverThread (PipedOutputStream outputPipe)
System.out.println("Thread initialization - start");
try
inputPipe.connect(outputPipe);
inputObject = new ObjectInputStream(inputPipe);
catch (IOException e)
System.out.println(e);
System.out.println("Thread initialization - complete");
public void run()
System.out.println("Thread started");
try
if (inputObject.available() > 0)
System.out.println(inputObject.read());
catch (IOException e)
System.out.println(e);
}Does anyone else have and ideas? -
Bt infinity way to slow !!! Need some help
We just got bt infinity 1 installed with home hub 5 as well, I did a speed test and it was only getting 10mbps download, 5 Mbps upload and 85 ping, is this good or bad. We currently have 10 devices connected to internet in this house, I can't even watch normal you tube videos in 480p, this is annoying as paid a lot of money for it, I know the problem can rely down to the amount I people connected, it may be also down to where the router is ? Need some help to how we can get best performance and how to share the connection between all of us or how to get more as on the best package available ? Thanks will need all the help as the internet is atrocious right now, almost as bad as our non infinity by home hub 2 we had a few days ago
Can you run this checker and post back a screen shot of the results
http://www.dslchecker.bt.com/adsl/adslchecker.welcome
and use this speed tester then carry out the further diagnostics and post back a screen shot of all the results including your IP profile for up and down. This test must be done with a wired connection.
http://speedtest.btwholesale.com/
As you have a Homehub 5 can you also post the stats from 1-12 by logging onto the homehub management pages then troubleshooting > helpdesk. http://bthomehub.home/ -
Need some help learning cue points, etc
I need some help with a Flash project I'm working on. If any
Flash junkies out there are up for sitting down with me through
email or IM and helping me get to the point where I have a template
FLA doing what I want to do, I'd be willing to pay you. It wouldn't
be much, but it would be something. Here's what I'm trying to do:
I need to create an interactive talking-head style flash
presentation with a number of progressive download externally
linked FLV files, playing in succession, supported by movie-clip
text animations and supporting graphics which are triggered by cue
points in the video. I also need a simple navigation menu linking
to the FLV files. I've got some of this down already, namely, I've
laid the FLVs in and they are playing in succession. I'm stuck on
the cue point part. At this point I really just need some hands-on
help. I've bought books, I've scoured the web.
I'm easy to communicate with, and I'm good with computers and
comfortable in many multimedia design programs. Flash is very
powerful, but tougher to learn than I expected, and I'm at the end
of my rope =PMy advice... start with a very simple "proof of concept" project before you attempt the entire package.
It will be much easier to scale up if you first have a very good understanding of what's going on.
So one simple video with just one cuepoint and only one button and additional display. You'll also have to work out the interaction of pausing the video when a cuepoint is reached or button pushed to display the graph, giving the viewer time to read the graph... then when the viewer closes the graph, the video should "resume".
Start very simple and build on that only after you understand the fundamentals.
Second, you mention "video reports"... plural. So that most likely means that you will need a video player with a "playlist".
This may mean that you'll need to learn to use a little .xml to bring in the playlist data. You may also find xml an excellant way to bring other data into you project.
At the link listed above there is an excellant tutorial on "Integrating Flash and XML"
"Flash and XML"
"XML Video Playlist"
"ActionScript 3 XML Basics"
"ActionScript 3 Advanced XML"
Personally I would not even begin a project like this without considering how I could use xml to feed data into the project.
Here's an example of a video player I created that has a playlist, thumbnails, categories, transcipts, "Now Playing" etc. All that data comes into the main .swf via various xml files. Super good way in input data into Flash.
http://www.drheimer.com/video/
Yours is a rather ambitious project and will take awhile to gain the skill and assemble the pieces. So when you come to a new part... first create a real simple "proof of concept" model so you can learn how that section works. Don't expect to be able to assemble the entire project all at once.
Best wishes,
Adninjastrator -
Remote App on iPad connects but drops after about 20 mins. Need to turn off wait about 1 minute, then turn on wifi on iMac before it can reconnect. Need some help please.
Already gone through troubleshooting guide a zillion times. Thanks.This worked for me... A little time consuming but once you get rolling it goes GREAT... Thanks....
I got my artwork and saved it to my Desktop
Opened up Microsoft Paint and clicked on "File" and "Open" and found it to get it on the screen to resize it
Clicked "resize" and a box for changing it opened up
Checked the box "Pixels" and "Unchecked maintain aspect ratio"
Set Horizontal for 640 and Vertical for 480
Clicked on "OK" and went back to "File" and did a "Save As" and chose JPEG Picture
It came up "File Already Existed" and clicked "OK" (really did not care about the original artwork I found because wrong size)
Went to iTunes and on the movie right clicked on "Get Info", clicked on "Details", then "Artwork"
Go to the little box on the top left that shows your old artwork and click on it to get the little blue border to appear around it and hit "Delete" to make it gone
Click on "Add Artwork" and find it where you put the one from above on your Desktop and hit "Open" and OK and your new artwork is now there and all good.
Sounds like a lot of steps to follow but after around 5 or so you will fly through it. This worked perfect on my iPhone 6 Plus and I have artwork on my Home Videos now. -
TS1702 I need some help the apps were downloading slowly
The apps downloaded but it didn't cause it's stuck in downloading mode what should I do?
The iOS 6 update didn't work.
Please I need some help.
The apps didn't download.
Talking Angela and Ginger didn't download.
Talking Santa didn't update.Try moving the existing backup file to a safe location so that iTunes has to create an entire new file. The backup file is located here. You can delete that backup once you get a successfull backup.
iTunes places the backup files in the following places:
Mac: ~/Library/Application Support/MobileSync/Backup/
Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
Note: If you do not see the AppData or Application Data folders, you may need to show hidden files (Windows XP, Windows Vista and Windows 7), or iTunes may not be installed in the default location. Show hidden files and then search the hard drive for the Backup directory. -
Need some help: my itunes won't sync with my iphone anymore. Both softwares are up to date and I've reinstalled itunes. After I reinstall, it syncs. But then when I reboot my computer, it no longer syncs anymore and I have to keep reinstalling itunes. Thoughts???
thought that it was possible to have the same iTunes library on any machine that was authorised, a kind of cloud-iTunes I guess.
That would convenient, but sadly it is not the case. Sorry!
Either way your welcome and best of luck!
B-rock -
Need some help in creating Search Help for standard screen/field
I need some help in adding a search-help to a standard screen-field.
Transaction Code - PP01,
Plan Version - Current Plan (PLVAR = '01'),
Object Type - Position ( OTYPE = 'S'),
Click on Infotype Name - Object ( Infotype 1000) and Create.
I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
I specify again, I have to add a new search help to standard screen/field and not to enhance it.
This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
It's urgent.
Thanks in advace. Suitable answers will be rewardedHi Pradeep,
Please have a look into the below site which might be useful
Enhancing a Standard Search Help
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
edc983384237
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
timepoints
The following timepoints are defined:
1. SELONE
Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
2. PRESEL1
After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
3. PRESEL
Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
4. SELECT
Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
5. DISP
Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
6. RETURN (usually as return value for the next timepoint)
The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
7. RETTOP
You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
8. EXIT (only for return as next timepoint)
The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
9. CREATE
The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
10. APP1, APP2, APP3
If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
F4IF_SHLP_EXIT_EXAMPLE
This module has been created as an example for the interface and design of Search help exits in Search help.
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several
events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
Hope this info will help you.
***Reward points if found useful
Regards,
Naresh -
Need some help in debugging this exported script
Below is DDL generated by visio forward engineering tool . The example below consists of 2 test tables with one foreign key.
Forward engineering generated DDL script
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table1]') AND type in (N'U'))
DROP TABLE [dbo].[Table1]
GO
CREATE TABLE [dbo].[Table1] (
[test] CHAR(10) NOT NULL
, [test2] CHAR(10) NULL
GO
ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [Table1_PK] PRIMARY KEY CLUSTERED (
[test]
GO
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table2]') AND type in (N'U'))
DROP TABLE [dbo].[Table2]
GO
CREATE TABLE [dbo].[Table2] (
[test2] CHAR(10) NOT NULL
GO
ALTER TABLE [dbo].[Table2] ADD CONSTRAINT [Table2_PK] PRIMARY KEY CLUSTERED (
[test2]
GO
GO
ALTER TABLE [dbo].[Table1] WITH CHECK ADD CONSTRAINT [Table2_Table1_FK1] FOREIGN KEY (
[test2]
REFERENCES [dbo].[Table2] (
[test2]
GO
GO
When i converted this DDL script using scratch editor the migration tool gave some errors can anyone help me to resolve below
DECLARE
v_temp NUMBER(1, 0) := 0;
BEGIN
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE EXISTS ( SELECT *
FROM objects
WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table1]')*/
AND TYPE IN ( N'U' )
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
TRUNCATE TABLE Table1;
END IF;
END;
CREATE TABLE Table1
test CHAR(10) NOT NULL,
test2 CHAR(10)
ALTER TABLE Table1
ADD
CONSTRAINT Table1_PK PRIMARY KEY( test );
--SQLDEV:Following Line Not Recognized
DECLARE
v_temp NUMBER(1, 0) := 0;
BEGIN
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE EXISTS ( SELECT *
FROM objects
WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table2]')*/
AND TYPE IN ( N'U' )
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
TRUNCATE TABLE Table2;
END IF;
END;
CREATE TABLE Table2
test2 CHAR(10) NOT NULL
ALTER TABLE Table2
ADD
CONSTRAINT Table2_PK PRIMARY KEY( test2 );
--SQLDEV:Following Line Not Recognized
ALTER TABLE Table1
ADD
CONSTRAINT Table2_Table1_FK1 FOREIGN KEY( test2 ) REFERENCES Table2 (test2)
--SQLDEV:Following Line Not Recognized
;Pl do not post duplicates - Need some help in debugging this script
-
working on a music video that needs some help. I own Final Cut and Color. Done the edit and it looks great but it needs help polishing and I have no idea what to do. Planning on showing the video this friday night in hollywood and I want it to blow people away. Is there anyone in the area would be willing to help? Please contact me ASAP. Thanks Ray
if you can give me a call that would be best, I can tell you what I need to accomplish. Thanks
818 935 5079 -
Need some help in ARCHITECTURE level for upgrading SAP BW 3.5 to SAP BI 7.0
HI all,
I am a consultant in a small company, i am curently handling upgradation project i need some help in ARCHITECTURING this complete project, please share me your knowledge, like process flows what information i need to get from clients before starting the project, what is pre upgradation checks, post upgradation cheks ...............
Thanks in advance.............Hi,
You need to confirm the downtime during the upgrade activity.
Check for Space and resource allocation.
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8d1a0a3a-0b01-0010-eb82-99c4584c6db3
https://wiki.sdn.sap.com/wiki/display/BI/UpgradefromBW3.XtoBI7.0+%28SP13%29
https://wiki.sdn.sap.com/wiki/display/BI/Migrationof3.xobjectstoBI7.0
You need to make sure some OSS notes should be applied, check the below link for the same:
https://wiki.sdn.sap.com/wiki/display/BI/UpgradetoNetWeaverBI7.0%28SAPNotes+%29
http://wiki.sdn.sap.com/wiki/display/BI/BIUpgradation-HelpfulOSSnotesfromEDWperspective
Hope this helps...
Rgs,
Ravikanth. -
Need Some help in Developing an ALV report ..Plz help me
Hi Experts I am basic learner to ABAP Here I need some help in developing a Delivery *** Invoice Report....Please help me by spending a little time..
Tables are VBAK VBAP LIPS LIKP and Document floe table is VBFA
SELECT VBELN VKORG VTWEG SPART
FROM VBAK
INTO TABLE I_VBAK
WHERE VBELN IN S_VBELN.
IF I_VBAK IS NOT INITIAL .
SELECT VBELN POSNR MATKL POSAR WERKS
FROM VBAP
INTO TABLE I_VBAP
FOR ALL ENTRIES IN I_VBAK
WHERE VBELN = I_VBAK-VBELN.
ENDIF.
IF I_VBAP IS NOT INITIAL.
SELECT * FROM LIPS
INTO CORRESPONDING FIELDS OF TABLE I_LIPS
WHERE VGBEL = VBAP-VBELN
AND VGPOS = VBAP-POSNR.
ENDIF.
IF I_LIPS IS NOT INITIAL.
SELECT VBELN VSTEL VKORG KUNNR
FROM LIKP
INTO TABLE I_LIKP.
ENDIF.
Moderator message : Outsourcing is not allowed, don't expect others to correct your source code. Thread locked.
Edited by: Vinod Kumar on Aug 1, 2011 5:43 PMhi ,
Look in this link
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm</a>
Regards
Renjith Kumar -
Need some help in saving video message from viber to my Iphone 5S with new ios 8's program . I disabled the thing that would save photos and videos automatically then, there comes a video I want to save. After loading and watching it, I press the "save to gallery" thing but it doesn't save in gallery. I tried all, restarting my phone, rebooting then turning on the save automatically thing and when I watch it again, it still wouldn't save.
Probably a good question to ask Viber or look at their support site.
-
Need some help in Rounding a double value to a whole number
Hey Peeps,
Need some help here, I got a method that returns a value in double after a series of calculation.
I need to know how can I round the double value, so for example,
1. if the value is 62222.22222222, it rounds to 62222 and
2. if the value is 15555.555555, it rounds to 15556
How can i do this
ZubHi Keerthi- Try this...
1. if the value is 62222.22222222, it rounds to 62222 and
double d = 62222.22222222;long l = (int)Math.round(d * 100); // truncatesd = l / 100.0;
double d = 62222.22222222;
System.out.println(d);
long l = (int)Math.round(d * 100);
// truncatesSystem.out.println(l);
d = l / 100.0;System.out.println(d);
for (int i = 0; i < 1000; i++)
{ d -= 0.1;}
for (int i = 0; i < 1000; i++)
{ d += 0.1;}System.out.println(d);
regards- Julie Bunavicz
Output:
62222.22222222
62222
62222.22
62222.22000000000001
Maybe you are looking for
-
Mail pdf attachments gibberish
Suddenly Mail downloads pdf attachments as a mile of gibberish and not a separate file as it used to. Why? What can I do? Can anybody help? In webmail the are ok so the problem must by with Mail.
-
Passing the fields dynamically by bdc prog to the infotype
hi, I have a requirement to pass the fields dynamically to the infotype database through bdc program from flat file or data set. Here I will give the field values in irregular way but it has to be sort before uploading to the data
-
IS07 Car Music Bluetooth Streaming Issue - Help Needed
I drive an Audi A1 which I have owned from new 11 months ago. I updated my iPhone 5 to the IS 7.0.4 around 1 month ago and since doing that I now have streaming issues in my car. The connection is via bluetooth, and the music is streamed from my iPho
-
I was sitting in church today with my Silent Switch engaged. All of a sudden my phone started to emit my ringtone. I beat a hasty retreat and saw that my Clock Alarm was going off. Apparently this is the way it works. To me a Silent Switch should Sil
-
Want Solution, related to Report
Hi All, I have scenario like this. Example: We have some products. Product: X was dealing by Sales Person "A" after some days Sales Person "A" replaced with Sales Person "B". On this Qube, We have a report, it captures both Product and Sales Pers