Orderby jpa aritmetic exp in order by
hello
i have aquestion i have this query in sql
select R.* from REOFFER R,.PROPERTY P where P.propertyId=R.propertyId order by (R.Precio/P.areaConstruction)
in mysql and run ok, but this equivalent query in jpa
select distinct object(o) from Table as o order by (o.precio/o.propertyId.areaConstruction)
BUT SAYS
Exception Description: Syntax error parsing the query [select distinct object(o) from Reoffer as o where o.propertyId.suburbId.cityId=:city order by (o.precio/o.propertyId.areaConstruction)], line 1, column 96: syntax error at [(].
Internal Exception: line 1:96: expecting IDENT, found '('
at oracle.toplink.essentials.exceptions.EJBQLException.syntaxErrorAt(EJBQLException.java:379)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.handleANTLRException(EJBQLParser.java:335)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.addError(EJBQLParser.java:278)
is posible have a aritmethic exp in jpa in the order by?
thanks
Hi,
When you use a local variable in a cursor, it's as if you had hard-coded a literal in its place, so you can't use a variable for a column name.
If you know all the possible values of p_orderby, you can do something like this:
ORDER BY TRIM ( CASE p_orderby
WHEN 'DESC' THEN plano.desc
WHEN 'VALUE' THEN plano.value
END
) ASC;If you don't know all the possible values, you could use dynamic SQL.
By the way,
TRIM (x)returns the same results as
LTRIM ( RTRIM (x))
Similar Messages
-
On order Stock and stock in transit with date variable
Hi experts.
İt may be an easy question.
We need to see on order stock (menge,can be seen T code MMBE) and stock in transit(T CODE MB5T) with date variable.
Any T code or table...?
I mean that for exp: on order stock and sttock in transit on 02/02/2012..
Thanks in advance..Hi,
as per my knowledge you have to develop report using following table
how many Po closed for material
how many MIGO happens and how many remain etc
table EKPO
EKKE
EKBE
MSEG
MKPF
[Report|http://wiki.sdn.sap.com/wiki/display/ERPLO/SAPStandardReports]
[tables req to get date wise stock report;
Regards
Kailas Ugale -
Only one internal order allowed for Cost center/GL combination -validation
Dear Friends,
We are using internal orders for controlling department wise budgets.
my client wants that he be able to post only through one GL account to one internal order
that is for Marketing dept,(departments are created as cost centers)
Canteen exp internal order 1000
Entertainment exp internal order 1001
Gift exp Internal order 1002
that is when GL account canteen exp is used (for cost center 1000 (marketing)) then internal order 1000 can be used but if entertainment exp is to be booked internal order 1000 cannot be used. in this case only internal order 1001 should be allowed
We are using real internal order (settlement will happen at end of month)
Can you let me know if this is possible in standard SAP or any workaround.
Regards,Hi Sangharsh,
If internal order must be filled in these GL then you can meet your requirement by creating the validation. To meet this requirement three steps are to be created in one validation. One step is created below to make you create two more steps by your self.
Create validation under Financial Accounting Line Item using transaction GGB0.
Step 1.
Prerequisites. (Go to settings>Expert mode and fill following)
BSEG-BUKRS = '1000' AND (here instead of 1000 you enter your company code)
BSEG-HKONT = '450000' (here instead of 450000 you enter GL for canteen expense)
Check
BSEG-AUFNR = '1000'
Message
Click on pencil icon and create below message or the message you want.
Intenal Order 1000 is allowed for canteen expenses.
Assign this validation to your company code using transaction OB28 with call up point 2.
Similarly you can create two more steps. Thus your requirement can be met.
Regards,
Chintan Joshi. -
DW 8.0.2 ASP Recordset and Order By parameter?
Hi
Then update to Dreamweaver to 8.0.2 I can't use parameters
like I could before then creating an ASP Recordset?
For example if I want to user parameters for sort ordering.
Ex. SELECT * FROM table ORDER BY param1 param2.
Is there a workaround? Seems odd becouse you could do like
this in earlier versions? Very annoying :)
Of course i can hand code it, but in that way i can't use the
behavior panel."PizzaGood" <[email protected]> wrote in message
news:er4f7o$nv4$[email protected]..
> How about a quick example?
Sigh. I've been cranky, so I guess I should at least show you
a reasonably
safe way, right?
DW's new recordsets will have a query that looks something
like:
myCmd.CommandText = "SELECT ColA, ColB, ColC FROM dbo.MyTable
WHERE ColD=?
AND ColE LIKE ?"
To add a dynamic ORDER BY, you'll need to append it to the
query. Don't
bother creating a recordset parameter to hold the column list
- you'd just
end up erasing it all anyway.
Dim SafeCols
Dim OrderBy
OrderBy = Request.Form("OrderBy") 'or wherever your dynamic
order columns
come from
'This is that part that a novice (and some intermediate
developers) will
leave out, not thinking about the fact that your form
'isn't the only way this page might be called.
'The expression strips everything that's not a letter, digit,
space, square
bracket, dot, or comma.
'If you have hyphens in your column names, then sorry, that
takes a better
expression and I'm being lazy right now.
Set SafeCols = New RegExp
SafeCols.Pattern = "[^\w\s\[\]\.,]"
SafeCols.Global = True
SafeCols.IgnoreCase = False
OrderBy = SafeCols.Replace(OrderBy,"")
Set SafeCols = Nothing
myCmd.CommandText = "SELECT ColA, ColB, ColC FROM dbo.MyTable
WHERE ColD=?
AND ColE LIKE ? ORDER BY " & OrderBy
And that's all there is to it. -
I am using JSP and MYSQL with a bean that does my database work.
my search.jsp looks up records, when I click edit it sends the values to my inventory_admin.jsp
When I make the changes to the data, the data is not saved in the database.
Please, look see!
<!--search.jsp-->
<jsp:useBean id="inventoryBean" scope="session" class="mybeans.inventoryBean" />
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%// Do search with bean.
String s = request.getParameter("searchField");
int searchId = -1;
if(s != null)
try
searchId = Integer.parseInt(s);
catch(NumberFormatException e) {}
//Do actual search with bean
boolean rc = false;
if(searchId != -1)
rc = inventoryBean.findByPrimaryKey(searchId);
%>
<form action="search.jsp" method="post" enctype="application/x-www-form-urlencoded">
<h2 align="center">Software Inventory </h2>
<p align="center"> </p>
<p>Lookup:
<input name="searchField" type="text" id="searchField">
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<%
//Output 'not found' message if needed
if(rc == false)
out.println("<P><B>Product not found</B></P>");
%>
<table width="25%" border="0">
<tr>
<td>Item ID:</td>
<td><jsp:getProperty name="inventoryBean" property="itemid" /></td>
</tr>
<tr>
<td>Product Name:</td>
<td><jsp:getProperty name="inventoryBean" property="item" /></td>
</tr>
<tr>
<td>Platform:</td>
<td><jsp:getProperty name="inventoryBean" property="platform" /></td>
</tr>
<tr>
<td>Serial:</td>
<td><jsp:getProperty name="inventoryBean" property="serial" /></td>
</tr>
<tr>
<td>Description:</td>
<td><jsp:getProperty name="inventoryBean" property="description" /></td>
</tr>
</table>
<p>&nosave=yes">EDIT</a></p>
<p align="center"> </p>
</body>
</html>
<!--inventory_admin.jsp-->
<jsp:useBean id="inventoryBean" scope="session" class="mybeans.inventoryBean" />
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%-- Copy all form variables at once into the bean--%>
<jsp:setProperty name="inventoryBean" property="*" />
<%
boolean saveResult = false;
boolean notSaved = false;
//Save our changes
String s = request.getParameter("nosave");
if(s == null || s.equals("yes") == false)
saveResult = inventoryBean.update();
else
notSaved = true;
//Do search with bean
s = request.getParameter("itemid");
int searchId = -1;
if(s != null)
try
searchId = Integer.parseInt(s);
catch(NumberFormatException e) {}
//Do actual search with Bean
boolean rc;
if(searchId != -1)
rc = inventoryBean.findByPrimaryKey(searchId);
%>
<h2 align="center">Software Inventory - Edit Mode</h2>
<FORM action="inventory_admin.jsp" method="post" enctype="application/x-www-form-urlencoded">
<table width="25%" border="0">
<tr>
<td>ITEMID</td>
<td><jsp:getProperty name="inventoryBean" property="itemid" /></td>
</tr
<tr>
<td>Product Name:</td>
<td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="item" />"></td>
</tr>
<tr>
<td>Platform:</td>
<td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="platform" />"></td>
</tr>
<tr>
<td>Serial:</td>
<td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="serial" />"></td>
</tr>
<tr>
<td>Description:</td>
<td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="description" />"></td>
</tr>
</table>
<%
if(notSaved == false)
if(saveResult == true)
out.println("Changes saved");
else
out.println("Changes NOT saved");
%>
<p><input type="submit" name="Submit" value="Submit"></p>
<p align="center"> </p>
</FORM>
</body>
</html>
//inventory.java
Here is the Bean Im using:
// inventoryBean.java - Simple database bean for table products
package mybeans; // Our custom 'package'.
import mybeans.DBConfigInfo; // Import helper classes
import mybeans.DBWorker; // for simpler database programming.
// Import other packages here.
import java.sql.*; // For database access.
import java.util.Hashtable; // For findRecords().
public class inventoryBean
private boolean isBeanDataValid = false; // Set when bean contains valid data.
private boolean isDBError = false; // Stores whether there was a processing error.
private String dbErrorMsg = "(No error)";
private DBWorker dbWorker; // Helper object for JDBC programming.
// Attributes
private String item = "";
private String platform = "";
private String serial = "";
private String description = "";
private int itemid = 0; // Primary key field
public void clear()
// Clears data in all your properties to 'empty' state.
item = "";
platform = "";
serial = "";
description = "";
itemid = 0; // Primary key field
// Accessor Methods
public void setItem(String newItem) { item = newItem; }
public String getItem() { return item; }
public void setPlatform(String newPlatform) { platform = newPlatform; }
public String getPlatform() { return platform; }
public void setSerial(String newSerial) { serial = newSerial; }
public String getSerial() { return serial; }
public void setDescription(String newDescription) { description = newDescription; }
public String getDescription() { return description; }
public void setItemid(int newItemid) { itemid = newItemid; }
public int getItemid() { return itemid; }
// Operations
// Default constructor.
public inventoryBean()
// Create a helper object to work with database.
// DO NOT DELETE THIS CODE.
dbWorker = new DBWorker();
// Database Operations
// Built-in methods:
public boolean findByPrimaryKey(int searchId)
// Use this method to find 1 record by primary key for your table.
// (After this call, all fields will be loaded into your properties.)
// Clear existing data, if any.
clear();
isBeanDataValid = false;
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return false;
try
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql = "SELECT item, platform, serial, description, " +
"itemid " +
"FROM products " +
"WHERE itemid=" + searchId;
//System.out.println("DEBUG SQL =" + sql);
// 4) Get a result set.
ResultSet rs = st.executeQuery(sql);
// 5) Move to first record
if(rs.next())
// 6) Retrieve fields into your properties using JDBC get??? methods.
item = rs.getString("item");
platform = rs.getString("platform");
serial = rs.getString("serial");
description = rs.getString("description");
itemid = rs.getInt("itemid");
// 7) Ensure non-null String fields with dbWorker.safeStr()
item = dbWorker.safeStr(item);
platform = dbWorker.safeStr(platform);
serial = dbWorker.safeStr(serial);
description = dbWorker.safeStr(description);
// Set result code.
isBeanDataValid = true;
// 8) Close all DB objects.
rs.close();
st.close();
dbWorker.close(); // Connection too.
catch(SQLException e)
System.out.println("Error in findByPrimaryKey (" + e.getMessage() + ")");
return isBeanDataValid;
// Update a record
public boolean update()
// Use this to update a record by a primary key.
boolean resultCode = false;
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return false;
try // Remember to put all DB code inside a try block!
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql = "UPDATE products SET item=" + dbWorker.sqlStr(item) + "," +
"platform=" + dbWorker.sqlStr(platform) + "," +
"serial=" + dbWorker.sqlStr(serial) + "," +
"description=" + dbWorker.sqlStr(description)+
" WHERE itemid=" + itemid;
//System.out.println("DEBUG SQL =" + sql);
// 4) Run action query.
int rowsAffected = st.executeUpdate(sql);
// 5) See if we succeeded (1 recorded affected).
if(rowsAffected == 1)
resultCode = true;
else
System.out.println("Warning: Can't update in update()!");
// 6) Close all DB objects.
st.close();
dbWorker.close(); // Connection too.
catch(SQLException e)
System.out.println("Error in update (" + e.getMessage() + ")");
return resultCode;
// Delete a record
public boolean delete(int deleteId)
// Use this to delete a record by a primary key.
boolean resultCode = false;
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return false;
try
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql = "DELETE FROM products WHERE itemid=" + deleteId;
//System.out.println("DEBUG SQL =" + sql);
// 4) Run action query.
int rowsAffected = st.executeUpdate(sql);
// 5) See if we succeeded (1 recorded affected).
if(rowsAffected == 1)
resultCode = true;
else
System.out.println("Warning: Can't delete ID #" + deleteId + " in delete()!");
// 6) Close all DB objects.
st.close();
dbWorker.close(); // Connection too.
catch(SQLException e)
System.out.println("Error in delete (" + e.getMessage() + ")");
return resultCode;
// Insert a new record.
public boolean insert(String newItem, String newPlatform, String newSerial, String newDescription,
int newItemid)
// Use this to update a record by a primary key.
boolean resultCode = false;
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return false;
try // Remember to put all DB code inside a try block!
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql="INSERT INTO products(item, platform, serial, description, " +
"itemid) " +
"VALUES(" + dbWorker.sqlStr(newItem) + "," + dbWorker.sqlStr(newPlatform) + "," + dbWorker.sqlStr(newSerial) + "," + dbWorker.sqlStr(newDescription) + "," +
newItemid + ")";
//System.out.println("DEBUG SQL =" + sql);
// 4) Run action query.
int rowsAffected = st.executeUpdate(sql);
// 5) See if we succeeded (1 recorded affected).
if(rowsAffected == 1)
resultCode = true;
else
System.out.println("Warning: Can't update in insert()!");
// 6) Close all DB objects.
st.close();
dbWorker.close(); // Connection too.
catch(SQLException e)
System.out.println("Error in insert (" + e.getMessage() + ")");
return resultCode;
public int findMaxPrimaryKey()
// Use this method to find the current max. value for a primary key
// in the database for a given table.
int retVal = -1;
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return -1;
try // Remember to put all DB code inside a try block!
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql = "SELECT MAX(itemid) FROM products";
//System.out.println("DEBUG SQL =" + sql);
// 4) Get a result set.
ResultSet rs = st.executeQuery(sql);
// 5) Move to first record
if(rs.next())
// 6) Retrieve fields into your properties using JDBC get??? methods.
retVal = rs.getInt(1); // Get first and only column.
// 7) Close all DB objects.
rs.close();
st.close();
dbWorker.close(); // Connection too.
catch(SQLException e)
System.out.println("Error in findMaxPrimaryKey (" + e.getMessage() + ")");
return retVal;
public Hashtable findRecords(String filter, String orderBy)
// Use this method to return a Hashtable filled with
// one or more records. You can specified a 'filter'
// for finding records and 'orderBy' will determine the sort order.
Hashtable retVal = new Hashtable();
retVal.put("ROWCOUNT", "0");
retVal.put("COLUMNCOUNT", "0");
retVal.put("STATUS", "EMPTY");
// Query by primary key.
boolean rc = dbWorker.open();
if(rc == false)
isDBError = true;
dbErrorMsg = dbWorker.errorMsg;
return retVal;
try // Remember to put all DB code inside a try block!
// 1) Get a connection.
Connection conn = dbWorker.getConnection();
// 2) Create a statement.
Statement st = conn.createStatement();
// 3) Build your SQL.
String sql = "SELECT item, platform, serial, description, " +
"itemid " +
"FROM products " +
"WHERE " + filter + " " +
"ORDER BY " + orderBy;
//System.out.println("DEBUG SQL =" + sql);
// 4) Get a result set.
ResultSet rs = st.executeQuery(sql);
int rowCount = 0;
// 5) Move to first record (and then next) record.
while(rs.next())
// 6) Retrieve fields into your properties using JDBC get??? methods.
String thisItem = rs.getString("item");
String thisPlatform = rs.getString("platform");
String thisSerial = rs.getString("serial");
String thisDescription = rs.getString("description");
int thisItemid = rs.getInt("itemid");
// 7) Ensure non-null String fields with dbWorker.safeStr()
thisItem = dbWorker.safeStr(thisItem);
thisPlatform = dbWorker.safeStr(thisPlatform);
thisSerial = dbWorker.safeStr(thisSerial);
thisDescription = dbWorker.safeStr(thisDescription);
// 8) Load this row into our Hashtable.
// The convention here is to pack each row's column name with an ID
// indicating the row. "ProjectId" + "0" = "ProjectId0" ===mapped to===> Value
// Put this record into Hashtable.
retVal.put("item" + rowCount, thisItem);
retVal.put("platform" + rowCount, thisPlatform);
retVal.put("serial" + rowCount, thisSerial);
retVal.put("description" + rowCount, thisDescription);
retVal.put("itemid" + rowCount, "" + thisItemid);
rowCount++;
// 9) Close all DB objects.
rs.close();
st.close();
dbWorker.close(); // Connection too.
// Write info to our hashtable--Since this container hold virtually anything,
// you can put in whatever 'metadata' you want about your result set.
retVal.put("ROWCOUNT", "" + rowCount);
retVal.put("COLUMNCOUNT", "5");
retVal.put("STATUS", "OK");
catch(SQLException e)
System.out.println("Error in findRecords (" + e.getMessage() + ")");
retVal.put("STATUS", "ERROR");
return retVal;
//============================================================
// DO NOT CHANGE THE CODE BELOW.
//============================================================
public boolean isValid()
// Does bean contain real data?
return isBeanDataValid;
public boolean isError()
// Returns true if there was a DB error.
return isDBError;
public String getErrorMsg()
// Returns error message, if any.
return dbErrorMsg;
//=====================================================================
// TODO: Remember to comment out main() with /* */ for production code!
//=====================================================================
// TEST DRIVER CODE
public static void main(String[] args)
// Test driver code goes here.
String beanName = "inventoryBean";
String tableName = "products";
boolean isDataValidationError = false;
// Exercise CRUD functionality of this bean.
System.out.println("==============================================================");
System.out.println("Starting Test Driver for bean " + beanName + "....");
System.out.println("==============================================================");
// Create bean.
inventoryBean myBean = new inventoryBean();
// Create a new record.
int newId = myBean.findMaxPrimaryKey();
newId++;
boolean rc = myBean.insert("e", "t", "g", "R",
newId);
if(rc)
System.out.println("SUCCESS: Inserted new record #= " + newId + ".");
else
System.out.println("ERROR! Can't insert record #= " + newId + ".");
System.out.println("====================================================");
System.out.println("VALIDATION FAILED: Test driver generated an error.");
System.out.println("====================================================");
return;
// Retrieve a record
rc = myBean.findByPrimaryKey(newId);
if(rc)
System.out.println("SUCCESS: Record #" + newId + " found.");
else
System.out.println("====================================================");
System.out.println("VALIDATION FAILED: Test driver generated an error.");
System.out.println("====================================================");
System.out.println("ERROR! Record #" + newId + " NOT found.");
// Simulate using set??? accessor methods with test data.
// (Note: We don't change the primary key.)
int testItemid = newId;
System.out.println("Testing set???() accessor methods....");
System.out.println("Setting Record #" + newId + " to:");
System.out.println(" inventoryBean.setItem(testItem); // = R");
myBean.setItem(testItem);
System.out.println(" inventoryBean.setPlatform(testPlatform); // = Y");
myBean.setPlatform(testPlatform);
System.out.println(" inventoryBean.setSerial(testSerial); // = E");
myBean.setSerial(testSerial);
System.out.println(" inventoryBean.setDescription(testDescription); // = k");
myBean.setDescription(testDescription);
System.out.println(" inventoryBean.setItemid(testItemid); // = " + newId);
myBean.setItemid(testItemid);
// Call update.
rc = myBean.update();
if(rc)
System.out.println("SUCCESS: Record #" + newId + " updated.");
else
System.out.println("ERROR! Record #" + newId + " NOT updated.");
System.out.println("====================================================");
System.out.println("VALIDATION FAILED: Test driver generated an error.");
System.out.println("====================================================");
return;
// Requery and validate each field.
rc = myBean.findByPrimaryKey(newId);
if(rc)
System.out.println("SUCCESS: Updated Record #" + newId + " found.");
else
System.out.println("====================================================");
System.out.println("VALIDATION FAILED: Test driver generated an error.");
System.out.println("====================================================");
System.out.println("ERROR! Record #" + newId + " NOT found");
// Simulate using get??? accessor methods.
// Validate updated values against test values.
System.out.println("Validating Record #" + newId + ":");
String testData;
String actualItem = myBean.getItem();
testData = "R";
if(testData.equals(actualItem))
System.out.println(" OK: inventoryBean.getItem() = actualItem");
else
System.out.println(" ERROR! inventoryBean.getItem() returned [" + actualItem + "] instead of [R]");
isDataValidationError = true;
String actualPlatform = myBean.getPlatform();
testData = "Y";
if(testData.equals(actualPlatform))
System.out.println(" OK: inventoryBean.getPlatform() = actualPlatform");
else
System.out.println(" ERROR! inventoryBean.getPlatform() returned [" + actualPlatform + "] instead of [Y]");
isDataValidationError = true;
String actualSerial = myBean.getSerial();
testData = "E";
if(testData.equals(actualSerial))
System.out.println(" OK: inventoryBean.getSerial() = actualSerial");
else
System.out.println(" ERROR! inventoryBean.getSerial() returned [" + actualSerial + "] instead of [E]");
isDataValidationError = true;
String actualDescription = myBean.getDescription();
testData = "k";
if(testData.equals(actualDescription))
System.out.println(" OK: inventoryBean.getDescription() = actualDescription");
else
System.out.println(" ERROR! inventoryBean.getDescription() returned [" + actualDescription + "] instead of [k]");
isDataValidationError = true;
int actualItemid = myBean.getItemid();
if(actualItemid == newId)
System.out.println(" OK: inventoryBean.getItemid() = actualItemid");
else
System.out.println(" ERROR! inventoryBean.getItemid() returned [" + actualItemid + "] instead of [" + newId + "]");
isDataValidationError = true;
// Cleanup with delete.
rc = myBean.delete(newId);
if(rc)
System.out.println("SUCCESS: Record #" + newId + " deleted.");
else
System.out.println("ERROR! Record #" + newId + " NOT deleted.");
// Now test out findRecords() for up to 100 records.
Hashtable data = myBean.findRecords("itemid > 0", "itemid");
String s = (String)data.get("STATUS");
if(s != null && s.equals("OK"))
s = (String)data.get("ROWCOUNT");
int rowCount = Integer.parseInt(s);
if(rowCount > 100) // Just output first 100 records.
rowCount = 100;
System.out.println("SUCCESS: Returning " + rowCount + " records (100 max.) using findRecords():");
for(int i = 0; i < rowCount; i++)
System.out.println(" Row #" + i + "=" +
data.get("item" + i) + ", " +
data.get("platform" + i) + ", " +
data.get("serial" + i) + ", " +
data.get("description" + i) + ", " +
data.get("itemid" + i));
else
System.out.println("ERROR! No rows returned using findRecords()!");
System.out.println("====================================================");
System.out.println("VALIDATION FAILED: Test driver generated an error.");
System.out.println("====================================================");
return;
if(isDataValidationError == false)
// Print final success message.
System.out.println("================================================================================");
System.out.println("VALIDATION SUCCESS! Bean " + beanName + " passed all automated tests.");
System.out.println("================================================================================");
else
System.out.println("====================================================================================");
System.out.println("ERROR! Tests completed but bean " + beanName + " had a data validation error.");
System.out.println("====================================================================================");Couple of pointers.
1 - use [ code ] tags to post code
2 - that is WAY too much code for more than a cursory glance. You're lucky the problem was easy to spot.
Your problem lies in your edit JSP form:
<td>Product Name:</td>
<td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="item" />"></td>Note that the name of the input field is different from the jsp property you are populating it with.
In fact, all of your input fields have a name of "description"
I would recommend on your inventory_admin.jsp page that you put the following debugging code to make sure that the parameter values come through and are set correctly.
out.println("name = param: " + request.getParameter("name") + "bean = " + inventoryBean.getName() + "<BR>");
out.println("description = param:" + request.getParameter("description") + "bean = " + inventoryBean.getDescription() + "<BR>");
... -
Custom field to add number of packages shipped along with Delivery
Hi Sap Experts,
We have scenario, we have created sales order with quantity 1(Like soft copy or hard copy of CD).
Now we want to create delivery with sales order and quantity is 1(Copy from sales order).
Our requirement is some time we have to send additional things like hard copy of manual or complement gift which we are not entering in sales order.
Exp: Sales order- quantity 1.
Want to deliver quantity 1(+ manual+ complement gift, these items are not part of standard order)
For more clarity, we have to add one field and want to enter number (How many items we have send along with main materials and these items are not relevant for pricing also).
So requirement is add one additional field in delivery header/item.
Customer doesn’t want to use Free of goods or BOM which we have propose him. How to customize standard table and standard program.
Kindly suggest.
Regards,
KotliHi All,
We don't want to use BOM options.
I have also checked "No. of packages'` at header level but my requirement is at item level.So we are also exploring the option of APPEND standard table and add this field.
Kindly let me know if we can do it without Appending standard table.
Regards,
Field to add to enter number of items which are shipped to customer -
Field to add to enter number of items which are shipped to customer
Hi Sap Experts,
We have scenario, we have created sales order with quantity 1(Like soft copy or hard copy of CD).
Now we want to create delivery with sales order and quantity is 1(Copy from sales order).
Our requirement is some time we have to send additional things like hard copy of manual or complement gift which we are not entering in sales order.
Exp: Sales order- quantity 1.
Want to deliver quantity 1(+ manual+ complement gift, these items are not part of standard order)
For more clarity, we have to add one field and want to enter number (How many items we have send along with main materials and these items are not relevant for pricing also).
So requirement is add one additional field in delivery header/item.
Customer doesn’t want to use Free of goods or BOM which we have propose him. How to customize standard table and standard program.
Kindly suggest.
Regards,
Kotli
20Hi,
Thanks.We want to add a field, might be like this.We just want to enter only no of extra items like 3.
Exp.
Delivery Qty-1
extra items:3
Regards,
Custom field to add number of packages shipped along with Delivery -
1xM relation working in Hibernate doesn't work in Kodo and EclipseLink
Greetings,
I'm migrating some applications from JBoss/Hibernate to WebLogic 10gR3 and I found lots of JPA problems. In order to simplify the context, I used a very simple one to many bidirectional relationship between 2 entities. Using the following persistence.xml file:
<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="ww204-jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>cgDataSource</jta-data-source>
<class>fr.simplex_software.jpa.Employee</class>
<class>fr.simplex_software.jpa.Department</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
<property name="jta.UserTransaction" value="java:comp/UserTransaction" />
</properties>
</persistence-unit>
</persistence>
the test works correctly on WebLogic 10gR3. Now, I'm modifying the persistence.xml to read:
<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="ww204-jpa" transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>cgDataSource</jta-data-source>
<class>fr.simplex_software.jpa.Employee</class>
<class>fr.simplex_software.jpa.Department</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="kodo.jdbc.SynchronizeMappings" value="refresh" />
</properties>
</persistence-unit>
</persistence>
The test raises the following exception:
Exception in thread "Main Thread" java.lang.ClassCastException: fr.simplex_software.jpa.Department
at fr.simplex_software.slsb.Facade_7ky0ac_FacadeRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
If I modify the persistence.xml to read:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="ww204-jpa" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider </provider>
<jta-data-source>cgDataSource</jta-data-source>
<class>fr.simplex_software.jpa.Employee</class>
<class>fr.simplex_software.jpa.Department</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode"
value="database" />
</properties>
</persistence-unit>
</persistence>
the test raises the same exception. If I come back to the first persistence.xml file, the test works properly again. Is there something I'm doing wrong ?
Many thanks in advance for any help.
NicolasPerforming the following operations after having changed the persistence.xml file solve the problem:
1. Undeploy the application.
2. Run appc to re-generate stubs and copy them on the client CLASSPATH (see also How to run a Java EE client application ?
3. Stop the server.
4. Start the server.
5. Re-deploy the application.
All the above operations are purhaps not absolutely required but the whole procedure is sufficient to provide the expected result.
Kind regards,
Nicolas -
Accounting object to Asset under construction?
Please,
Question: Is it necessary to set an accounting object (ACSET) to asset under construction?
(I think we should define an internal order)
Thank youhi Naej ,
For Auc Assets Account assignment object is not required to create.
Because when purchase any goods and Services automatically system captures profit center through document splitting.
For eX : Service Entry with internal order. Internal order may contain CC or PC.
If internal order contains CC or PC system derives
ExP a/c DR 10000
To GR/IR acccount 10000
Aftter that we are settling EXp from Order to AUC
AUC account dr 10000
to ExP account 10000
System derives cost center / profit center from IO to AUC.
Main Asset settlement :
Main Asset DR 10000
to AUC accont 10000
Because of these reasons AUC is not Requried CO Assignment objects. -
I need one helps I am implementing a tree of navigation of km with java vestibule and have a problem, when I request to him to this that orders with respect to a metadata or reality with any criterion this always takes the folders and it orders them and later it takes the Links and you order them, and the truth that I need that it does not make that distinction single that orders by the metadata that does not take in whatever if it is Link or folder
here the code goes that I am using to see if to somebody something is happened to him:
import bean.NavigationTree;
import com.sapportals.htmlb.TreeNode;
import com.sapportals.htmlb.enum.ResourceType;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
import com.sapportals.portal.prt.component.IPortalComponentContext;
import com.sapportals.portal.prt.component.IPortalComponentProfile;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.component.IPortalComponentResponse;
import com.sapportals.portal.prt.component.IPortalComponentURI;
import com.sapportals.portal.prt.session.IUserContext;
import com.sapportals.portal.security.usermanagement.IUser;
import com.sapportals.wcm.repository.ICollection;
import com.sapportals.wcm.repository.IProperty;
import com.sapportals.wcm.repository.IPropertyName;
import com.sapportals.wcm.repository.IResource;
import com.sapportals.wcm.repository.IResourceList;
import com.sapportals.wcm.repository.PropertyName;
import com.sapportals.wcm.repository.ResourceContext;
import com.sapportals.wcm.repository.ResourceException;
import com.sapportals.wcm.repository.ResourceFactory;
import com.sapportals.wcm.repository.ResourcePropertyComparator;
import com.sapportals.wcm.repository.enum.OrderType;
import com.sapportals.wcm.util.uri.RID;
//import com.sapportals.wcm.util.usermanagement.WPUMFactory;
Title: Navigation in KM repository with DynPage and JSP<br>
Description: Basic navigation.<br>
Copyright: Copyright (c) 2006<br>
Company: AGILE<br>
@author Juan Solar
public class Neo extends PageProcessorComponent {
public DynPage getPage() {
return new NeoDynPage();
public class NeoDynPage extends JSPDynPage {
public String pathInitial = "/documents/eo";
public String pathDocument = "";
private String kmNavigation = "";
private String kmViewDoc = "";
// private String pictFolder = "/irj/portalapps/com.sap.portal.pcm.admin.plainfolder_converter/images/folder.gif";
public IPortalComponentRequest request;
public IPortalComponentResponse response;
public IPortalComponentProfile profile;
private NavigationTree treeBean;
private IUser user;
private IResourceList reslist;
private int nodeCount;
String TITLE = "TOrder";
String NAMESPACE = "http://sapportals.com/xmlns/cm";
String selectedTitle = "";
public void doInitialization() throws PageException {
request = (IPortalComponentRequest) this.getRequest();
response = (IPortalComponentResponse) this.getResponse();
treeBean = new NavigationTree();
IPortalComponentContext myContext = request.getComponentContext();
profile = myContext.getProfile();
IPortalComponentURI componentURI =
request.createPortalComponentURI();
componentURI.setContextName("com.sap.km.cm.navigation");
kmNavigation = componentURI.toString();
componentURI.setContextName("com.sap.km.cm.docs");
selectedTitle = "";
kmViewDoc = componentURI.toString();
nodeCount = 0;
try {
// pathInitial = profile.getProperty("pathInitial");
// user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
user = getPortalUser(request);
ResourceContext ctxt = new ResourceContext(user);
RID rid = RID.getRID(pathInitial);
IResource resource =ResourceFactory.getInstance().getResource(rid, ctxt);
ICollection collection = (ICollection) resource;
reslist = collection.getChildren();
} catch (Exception e) {
response.write(e.getMessage());
public void doProcessAfterInput() throws PageException {
public void doProcessBeforeOutput() throws PageException {
TreeNode root = new TreeNode("rootNode", "root");
// List tmp=(List)root;
// Collections.sort(tmp);
root.setOpen(true);
try {
add_node(reslist, root);
} catch (ResourceException e) {
e.printStackTrace();
treeBean.setOutput("");
treeBean.setTree(root);
// set bean in servlet request - it will be used by the jsp afterwards
request.getServletRequest().setAttribute("neoTreeBean", treeBean);
this.setJspName("neotree.jsp");
private String getSelectedTitle() {
return selectedTitle;
// public String getSelectedTitle(){
// Esta es una funcion alternativa para porder cambiar el criterio de ordenamiento del recurso lista
private void sortResouceList(IResourceList resourceList,String orderBy) throws Exception {
//create property names to index properties
IPropertyName iPropSort = new PropertyName("http://sapportals.com/xmlns/cm", orderBy);
// create a comparator to order the resource list
ResourcePropertyComparator rRPC =new ResourcePropertyComparator(iPropSort, true);
// order the resource list
resourceList.sort(rRPC);
private String getPropertyValue(IPropertyName iname,IResource resource)throws ResourceException {
String value = "";
// String namespace = "http://com.sap.netweaver.bc.rf.sample/xmlns/sample";
// String name = "Order";
// IPropertyName propertyName = new PropertyName(namespace, name);
IProperty property = resource.getProperty(iname); //propertyName
if (property != null) {
// property exists
value = property.getValueAsString();
} else {
// property is not set for this resource
return value;
@param reslist IResourceList
@param root TreeNode
private void add_node(IResourceList list, TreeNode parentNode)
throws ResourceException {
//new add_node().doit();
String title;
String name;
String label;
String path;
IResourceList tmpreslist;
ICollection tmpcollection;
IPropertyName iProperty;
try {
sortResouceList(list,"displayname"); //, "Order"
} catch (Exception e) {
e.printStackTrace();
boolean first = true;
for (int i = 0; i < list.size(); i++) {
IResource tmpres = list.get(i);
String rType= tmpres.getResourceType();
iProperty = new PropertyName("http://sapportals.com/xmlns/cm", "displayname");//, "Order"
try {
name = tmpres.getName();
title = tmpres.getDisplayName();
title = (title.equals("") || title == null) ? name : title;
path = tmpres.getAccessRID().getPath();
if (tmpres.isCollection() && !tmpres.isHidden()) {
tmpcollection = (ICollection) tmpres;
// if (tmpcollection.getChildren().size() > 0) {
TreeNode node = new TreeNode(Integer.toString(nodeCount++),title,parentNode);
node.setTooltip(name); //
// if (order==null || (order!=null && order.equals(""))) {
// label = "<a class=urLnk href=\"javascript:nada();\" onclick=\"alert('";
// label ="Folder "node.getText()+" has not set the Order Metadata!! "; // path;
// label += "');\">" + node.getText() + "</a>";
// node.setText(label);
// } else{
tmpreslist = tmpcollection.getChildren();
add_node(tmpreslist, node);
} else {
if (first) {
label = "<a class=urLnk href=\"javascript:nada();\" onclick=\"goNavigate('";
label += path;
label += "');\">" + parentNode.getText() + "</a>";
parentNode.setText(label);
first = false;
TreeNode node = new TreeNode(Integer.toString(nodeCount++),title,parentNode);
node.setTooltip(name); //
label ="<a class=urLnk href=\"javascript:nada();\" onclick=\"goNavigate('";
label += path;
label += "');\">" + node.getText() + "</a>";
node.setText(label);
} catch (Exception ex) {
IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
// href=\"javascript:void(0) "<a target=\"itoptarget\" href=\""kmViewDocpath+"\"
Returns the IUser object.<br><
@param request
@return user
public IUser getPortalUser(IPortalComponentRequest request) {
// user = WPUMFactory.getServiceUserFactory().getServiceUser("service_user_id");
IUserContext uc = request.getUser();
user = (IUser) uc.getUser();
return user;Click here for information. If you can't get the answers emailed to you for some reason(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
(87419) -
Differents characters between db schemas when i use import
dear all.
source: Centos 4.0 and Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
target: RHEL AS 4.0 and Oracle Database 10g Release 10.2.0.1.0
When:
1.- i used exp from source. Export with this parameters:
exp USER owner= file= log= GRANTS=y INDEXES=Y CONSISTENT=Y ROWS=Y statistics=none
2.- then i used imp to migrate the first schema with the following parameters:
imp USER file= log= fromuser= touser= ignore=Y buffer=536870912
then when i compare two schemas. This software, TOAD fOR ORACLE V9. shows me the next difference in a package.
- There are a line that is a text:
||' Nº:'|| --- this is in the original package..... but
||' N?:'|| ----- this is in the source package..... i mean this shows like that when migrate.
What parameter i must to use (i think can be NLS_LANG.... ) in imp and exp in order to keep the same characters in all objects database?
Thabks a lot.i didnt' have any errors in log.
This is the import log:
Connected to: Oracle Database 10g Release 10.2.0.1.0 - Production
Export file created by EXPORT:V10.02.01 via conventional path
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)
tables list....
tables list....
tables list....
Import terminated successfully without warnings.
thanks for your answers... -
hi ,
I want to write a method that will take column-name and value to be searched parameters
somehting like this
void somemethodname(String colName , String tableName , String[] arr )
i will read all the parameters value from XML file
colName , tableName , arr
WHERE string array will contain fields on which you want to use your WHERE clause
SELECT EVENT_TYPE_ID from Register WHERE EVENT_TYPE = 'event_type_id' "
Now in this query my column-name id EVENT_TYPE_ID
whose value i want to find out
basically i dont want to hardcode anything
can somebody help me in doing this.
Please post code if you have
thanks in advance
NileshThis may give you some ideas. There is a lot more that needs to be done, such as check if value is numeric, string, date, etc. and put them in the sql accordingly.
import java.util.*;
class Test {
public static void main(String[] args) {
String[][] s = {{"VAL1", "VAL1"}, {"VAL2", "VAL2"}};
Test t = new Test();
t.sql("column", "table", s, "VAL1");
public void sql (String colName, String tableName, String[][] where, String orderBy) {
StringBuffer sql = new StringBuffer();
sql.append("Select ").append(colName)
.append(" From ").append(tableName)
.append(" Where ");
for (int x=0; x<where.length; x++) {
sql.append(where[x][0]).append(" = '").append(where[x][1]).append("'");
if (x<where.length-1)
sql.append(" And ");
if (orderBy != null)
sql.append(" Order By ").append(orderBy);
System.out.println(sql.toString());
}Hope this helps!
DesQuite -
Help needed with Expressway Configuration
Hi,
I need to add following licenses on expressway (EXPWY-E-K9).
1. LIC-VCS-10+ - Video Comm Server 10 Add Non-traversal Network Calls
2. LIC-VCSE-5+ - Video Communication Server - 5 Traversal Calls
In datasheet it says N/A against these licenses. Can someone please suggest the solution to add these licenses.
Thank you.What do you have, a VCS-Expressway, or are you searching for licenses for Expressway (Edge / Core)?
The VCS is the older style of video deployment, the Expressway is the newer CUCM only based setup.
The VCS had the LIC-VCS licenenses for Calls,
Expressway has: LIC-EXP-RMS
Ordering Options for Cisco Expressway Series
Cisco Expressway Rich Media Session License
LIC-EXP-RMS
(Required for concurrent calls to/from any endpoint or application not registered to Cisco Unified Communications Manager. For example, Business to Business Calls, Cisco Collaboration Meeting Rooms, Jabber Guest and for
interworked calls e.g. H.323 to SIP, H.264 AVC to H.264 SVC) -
I need to dynamically build the order by clause of my query.
I tried this:
<named-query name="list">
<query>
<![CDATA[
SELECT p FROM Person p
ORDER BY :orderby
]]>
</query>
</named-query>
@SuppressWarnings("unchecked")
public List<Person> list(String sort) {
Query query = getEntityManager().createNamedQuery("list");
query.setParameter("orderby", sort);
return query.getResultList();
}But at runtime it throws an exception:
com.microsoft.sqlserver.jdbc.SQLServerException:
L'elemento SELECT identificato da ORDER BY 1 include una variabile nell'espressione che identifica la posizione di una colonna.
Le variabili sono consentite solo nell'ordinamento in base a un'espressione che fa riferimento a un nome di colonna.The translation of the italian message is something like:
The SELECT element identified by ORDER BY 1 includes a variable that identifies the position of a column.
The valid variables in the order by clause must refer to the name of a columnThe value of the parameter sort is_ the name of a column!
Any hint?My solution was to append the order clause to an "namedQuery" like this:
- declare the named query as usual, with annotation
- create a simple helper function like findNamedQuery to find the query string for a given class and queryName (using reflection)
- if you need to execute the query without sort order - use EntityManager.createNamedQuery (as usual)
- BUT: if you want to sort data: use EntityManager.createQuery with the string obtained from findNamedQuery and the sort clause
I guess the is a performance penalty, but.. .it works. -
How to run order-jsf-jpa-example.zip in JDeveloper?
What is the easiest way to make order-jsf-jpa-example.zip from the link http://www.oracle.com/technology/products/ias/toplink/jpa/examples-index.html to run in JDeveloper?
Step by Step please.
Thanks
Ming ManYou can use the JDeveloper "project from existing source" to create a new project that is based on this code.
You can then use the built in Ant support to run the build file.
Maybe you are looking for
-
R/3 Patch Upgrde Problem due BW Delta Queue.
Hi Expert, I have extracted all the logistic & delta data in BW to make delta queue emplty. My query is that ,should it delete these queue in RSA7 or it should disappear after extraction. In LBWQ there are only two entry MCEX17 & MCEX17_1 , these que
-
SMTP service Migration on MDM server
Hello We are migrating the SMTP services on the MDM server. Do we need to make changes to the MDM configuration files, if any ? I had installed MDM earlier and I don't remember any config file changes. Please guide me. Thanks Prakash
-
How to set Dnet assembly object instance
I have an MKS Dnet MFC (P6AO) that I want to connect to. I have been able to connect to other MFCs using my Vi as long as the input assembly instance is set to 14 and the output assembly instance is set to 19. I can explicitly message this MFC. Wh
-
My Pavilion DV6T does not playback bass anymore or send it out through the headphone jack. Everything else is properly wired, tried a few different devices, but it is just the laptop not playing bass. Gets used for a lot of music, so I really appr
-
Hi, Im struggling to know what to do at the moment, I have an iWeb site at the moment which I really like, have bought Rage SEO Tool and have updated all of the tags etc, submitted the sitemap etc and know the site has been crawled but I am not even