Query contains double value - seems cache problem
Hi experts,
in a Query (integrated planning) based on an Aggregationlevel based on a Multicube.
The Multicube contains an Realtime InfoProvider to store planning data and a normal InfoProvider to show actual values.
The load of actual values to the InfoProvider can be executed several times a month via ProcessChain -
it´s a full load so the data loaded before will be deleted during the month in order to save the new monthly dataload.
In the Query there were double values displayed for actual data after several loads during the month -
but in the acutal InfoProvider only a single value is stored!
It seems to be a buffer problem, since a deletion of all system buffers solves the problem - but this is not the way to handle the problem in productive area.
How can the problem be solved?
Setting of Planbufferquery of acutal data InfoProvider to not using Cache doesn't help.
Thank you!
Angie
Hi,
there is no data stored in acutal cube and the query column is restricted to actual cube.
And actual cube only contains the value once, but the query can display the double value.
If all buffers are reset, the query shows correct value - but this is not the way to handle the problem.
What changes need to be made?
Is there a setting in query cache or planningbuffer query cache or some other setting that can fix the problem?
Best regards,
Angie
Similar Messages
-
WPF Data gird double value in cell round up automatically
Hi All,
I have one datagrid where one of the columns contains double values. I placed limitations on length and decimal part. Decimal part is always comes with 2 digits. Now during editing the cell that holds double value in DataGrid , if I enter value of
99.99 then it is becoming 100. At this moment the cell is still under edit mode.
If the columns hold decimal type values then this automatic round up is not happening. But due to some constraints , at this moment we can't change the columns type from double to decimal. So I just want to disable the auto round up with double
values in DataGrid. I searched in MSDN forums but did not find any , tried adding StringFormat for columns. But it did not help.
I tested by keeping the double value outside of the DataGrid ( in editbox ) , I don't see any automatic round up. So I suspect there could be something with DataGrid that is resulting automatic round up.
Is there any way to disable this automatic round op on double values in DataGrid? I welcome your comment.
Thanks,
Brahmaji.Well, 99.99 as you mentioned in your original post is not the same value as 9999999999999999. You cannot store the value 9999999999999999 in a double field.
You could change the type to decimal to be able to store values with a higher precision:
public class Movie
public string Title { get; set; }
public int Year { get; set; }
public string Director { get; set; }
public bool Hit { get; set; }
public decimal Price { get; set; }
new Movie()
Title = "The Lawnmower Man",
Year = 1992,
Director = "Brett Leonard",
Hit = true,
Price = 22.23M
If you want to prevent the value of the source property from getting set when an invalid double value is entered you could implement your own ValidationRule:
namespace SampleGrid
class MyValidationRule : System.Windows.Controls.ValidationRule
public override System.Windows.Controls.ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
string s = value.ToString();
double d;
if(double.TryParse(s, out d))
return new System.Windows.Controls.ValidationResult(false, "invalid value");
return System.Windows.Controls.ValidationResult.ValidResult;
<DataGridTemplateColumn Header="Price">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Price, StringFormat=##.00}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate xmlns:local="clr-namespace:SampleGrid">
<TextBox>
<TextBox.Text>
<Binding Path="Price" StringFormat="##.00">
<Binding.ValidationRules>
<local:MyValidationRule ValidationStep="RawProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<!--<DataGridTextColumn Header="Price"
Binding="{Binding Price, StringFormat=##.00}" />-->
Then the value won't get rounded. Of course you can still not set the double source property to 9999999999999999 though.
There is no property that you can set on the DataGrid to prevent the value from getting rounded.
Hope that helps.
Please remember to helpful posts as answer to close the thread and then start a new thread if you have a new question. -
Qaaws not refreshing query triggered from Xcelsius, maybe a cache problem
Hi,
I'm having a problem with QAAWS and Xcelsius
I'm using a List Builder component to select multiple values in this case STATES from the efashion universe
I use the selected states as values to feed a prompt in a QAAWS query, the qwaas query has the SALES REVENUE as the resultset and in the conditions it has a multi prompt for STATES
When I preview my dashboard, I select the States, then UPDATE the values and then refresh the query with a CONNECTION REFRESH button, The first time I do this it works fine and returns the Sales revenue.
If I add a new State to my selection and then run update and run run again the query with the refresh button, it doesn't work any more and it shows again the value retrieved from the first query
First I thought that the query wasn't triggered by Xcelsius, but by doing some more tests I found that actually the query runs but it returns the value from the first query
I think this is a cache problem , so is there a way to tell QAAWS to always run the query and not use the cache?
thanks,
AlejandroHello Alejandro,
QaaWS indeed uses a cache mechanism to speed up some Xcelsius interactions (from XI 3.0 onwards), but your issue should not be induced by this, as cache sessions are discriminated according to session user id & prompt values, so if you are correctly passing prompt values, QaaWS should not serve you with the previous values by error.
Could you specify how you are passing several prompt values to the QaaWS? There might be an issue there, so make sure that:
1. QaaWS query prompt is set using In List operator, otherwise only first value will actually be taken into account,
2. In Xcelsius Designer Data Manager, web service input paremeters are duplicated to accept several input values (you cannot submit you list of prompt values as a list to a single input parameter).
If this still does not work, I'd suggest you debug your dashboard runtime using an HTTP sniffer like Fiddler (available from http://www.fiddler2.com/) which enable you to inspect the sent & recieved HTTP messages with the server, where you should verify which prompt values are sent to the QaaWS servlet.
FYI, you can set the QaaWS cache lifetime for each query, by going into QaaWS edition first wizard screen, click Advanced... button and change value for timeout parameter (default is 60 seconds)
Hope that helps,
David. -
Problem when querying OLAP for Value based hierarchy
Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
the strange part is if I only put one value, it will work perfectly
for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
but if I put multiple value to the list
CF_HIER::426362
CF_HIER::424470
CF_HIER::429073
CF_HIER::424230
then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
this is the code how I guery
////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
String[] elementIdArr = new String[elementIdList.size()];
int i = 0;
for (Long elementId: elementIdList) {
String elementIdStr ="";
if (hierarchy instanceof MdmLevelHierarchy)
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
level.getName()+dimension.getValueSeparationString()+
level.getName()+"_"+elementId;
else
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
elementId;
elementIdArr[i++] = elementIdStr;
Source myList = dp.createListSource(elementIdArr);
result = hierarchy.getSource().selectValues(myList);
Source joinedSource = measure.getSource();
joinedSource = joinedSource.join(result );
is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
thanksHi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
the strange part is if I only put one value, it will work perfectly
for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
but if I put multiple value to the list
CF_HIER::426362
CF_HIER::424470
CF_HIER::429073
CF_HIER::424230
then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
this is the code how I guery
////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
String[] elementIdArr = new String[elementIdList.size()];
int i = 0;
for (Long elementId: elementIdList) {
String elementIdStr ="";
if (hierarchy instanceof MdmLevelHierarchy)
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
level.getName()+dimension.getValueSeparationString()+
level.getName()+"_"+elementId;
else
elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
elementId;
elementIdArr[i++] = elementIdStr;
Source myList = dp.createListSource(elementIdArr);
result = hierarchy.getSource().selectValues(myList);
Source joinedSource = measure.getSource();
joinedSource = joinedSource.join(result );
is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
thanks -
Query to sort a column containing alphanumeric values
Hi,
I have a table whose column contains ALPHANUMERIC values. The column is of type VARCHAR(1).
I tried many queries (using UNION) to fetch records in Alphabets first and Numbers as last
I.e. A-Z should come first and then 0-9 values.
Please do the needful
Regards,
MradulI.e. A-Z should come first and then 0-9 values.Edit: Whoops, I forgot the ascii values for numbers were lower.
WITH t AS
(SELECT '0' c FROM DUAL
UNION
SELECT '9' c FROM DUAL
UNION
SELECT 'A' c FROM DUAL
UNION
SELECT 'B' c FROM DUAL
SELECT c
FROM t
ORDER BY TRANSLATE( UPPER(c)
, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
, TRANSLATE( UPPER(c)
, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
, '0123456789'
C
A
B
0
9Message was edited by:
vg -
Pls Help :JTable Double Value Editing Problem
hi friends
as i am new to swings and Jtable pls help me if u can.
in the code copied below when i start putting value into the Double column of JTable
a ( .0 ) is appended at the end which is undesirable it should be like that only when the value is
something like 22.99 and also i want to limit the double value's fractional part to be limited to 2 digits only.
if this can be done in my Table model itself so that it will work everywhere i use this model
Pls tell me what exactly do i need, a custom Cell Editor or Cell Renderer. and whether can i do it in the
Table Model Defination class or whether i can only do it on the Jtable only.
guys its so confusing.pls help
if anyone can send a sample code for achieving this it would be of great help
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.text.*;
public class TableProcessing extends JFrame implements TableModelListener
JTable table;
public TableProcessing()
String[] columnNames = {"Item", "Quantity", "Price", "Cost"};
Object[][] data =
{"Bread", new Integer(1), new Double(1.11), new Double(1.11)},
{"Milk", new Integer(1), new Double(2.22), new Double(2.22)},
{"Tea", new Integer(1), new Double(3.33), new Double(3.33)},
{"Cofee", new Integer(1), new Double(4.44), new Double(4.44)}
DefaultTableModel model = new DefaultTableModel(data, columnNames);
model.addTableModelListener( this );
table = new JTable( model )
// Returning the Class of each column will allow different
// renderers to be used based on Class
public Class getColumnClass(int column)
return getValueAt(0, column).getClass();
// The Cost is not editable
public boolean isCellEditable(int row, int column)
if (column == 3)
return false;
else
return true;
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
* The cost is recalculated whenever the quantity or price is changed
public void tableChanged(TableModelEvent e)
if (e.getType() == TableModelEvent.UPDATE)
int row = e.getFirstRow();
int column = e.getColumn();
if (column == 1 || column == 2)
int quantity = ((Integer)table.getValueAt(row, 1)).intValue();
double price = ((Double)table.getValueAt(row, 2)).doubleValue();
Double value = new Double(quantity * price);
table.setValueAt(value, row, 3);
public static void main(String[] args)
TableProcessing frame = new TableProcessing();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
}thank in advance
jagsNo.
But further to this try:
public class MyCustomRenderer extends javax.swing.table.DefaultTableCellRenderer
private java.text.DecimalFormat FORMAT_DOUBLE;
public MyCustomRenderer()
FORMAT_DOUBLE = new java.text.DecimalFormat("#, ##0.00");
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
//NB! you could also set foreground/background here to indicate positive/negative values...
if(value.getClass().equals(Double.class))//is this a double?
double d = ((Double)value).doubleValue();
d = (Double.isNaN(d)||Double.isInfinity(d))?0:d;
this.setText(FORMAT_DOUBLE.format(d));
else//not a double so let's toString() it...
this.setText(""+value);
}then, using code pasted above, specify a new instance of this class as the default renderer in your
table.....
:) -
Hi guys
We are facing this problem of caching within our project. The project aims to generate a html code to pick up some rich media ads details at random and displaying on the html file where the generated code is expected to be pasted. We developed two servlets, one which extracts the ads from the database randomly and then depanding on the ad type it calls the other servlet as src of an iframe, which in turn puts all code for displaying the rich media ads. The script which we are generating for the user to paste onto their pages is:
<script LANGUAGE="JAVASCRIPT" src="http://192.168.1.6:8080/advert_java/servlet/GetAdServlet?region=1&zone=1&type=nossi&cachevar=yes">
</script>First servlet (GetAdServlet) returns the javascript statements and thus is called using this generated code. Now cotents of the iframe are supplied by the second servlet ie richMediaServlet. This servlet is called like
iframeURL = fullHttpDir+"/servlet/RichMediaServlet?";
iframeURL += "bannerCode="+ RNBanner (BannerCode to be called);
out.println("document.write(\"<iframe src='" + iframeURL + "' height=" + hheight +" width="+ wwidth + " SCROLLING=no FRAMEBORDER=0 MARGINWIDTH=2 MARGINHEIGHT=2 onfocus='window.focus(); return iframeFocus()'>\");");
out.println("document.write(\"</iframe>\");");This richmediaServlet returns HTML into <iframe>. when richmediaservlet is called, a parameter 'bannerCode' is passed. then richmediaServlet fatches the banner from the database and displays the banner into the <iframe>.
Now the problem comes when we run the html file containing the script tag mentioned above, and refresh our page, ideally it should pick the ads randomly and pass it on to RichMediaServlet.
I also try debugging both servlets. I called the getadservlet from javascript mentioned above and put debugging info in both the servlets, now for every refresh we do on the html side, we are getting a different random bannercode in adservlet but in richmedia when we print the bannercode received in querystring it is taking an older value which was displayed some time back and keeps on doing this for quiet a long time, making it look like some caching problem of RichMediaServlet.
Instead when we tried to put the same html <script> code into another servlet's doGet, everything seems to be working fine.
i have also used the following code to prevent the caching on both the setvlets
long currentTime = System.currentTimeMillis();
response.setHeader("Cache-Control", "no-cache, must-revalidate");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Last-modified", currentTime);
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT"); and following in the iframe's head tag before the iframe tag in the getAdServlet.
out.println("document.write('<head>');");
out.println("document.write('<meta http-equiv=\"Cache-Control\" content=\"no-cache,must-revalidate\">');");
out.println("document.write('<meta http-equiv=\"Pragma\" content=\"no-cache\">');");
out.println("document.write('<meta http-equiv=\"Last-modified\" content=\""+ currentTime + "\">');");
out.println("document.write('<meta http-equiv=\"expires\" content=\"Sat, 6 May 1995 12:00:00 GMT\">');");
out.println("document.write('</head>');");I request you all geeks to try and help me to your best. The project is at its final stages and in high urgency now.i think the caching is being in the browser, with the iframe.
You should try passing a random param to the servlet in the iframe URL, something like:
var a = Math.random() * 10000000; //for example
out.println("document.write(\"<iframe src='" + iframeURL +"&rand="+a+"' height=" + hheight +" width="+ wwidth + " SCROLLING=no FRAMEBORDER=0 MARGINWIDTH=2 MARGINHEIGHT=2 onfocus='window.focus(); return iframeFocus()'>\");");
out.println("document.write(\"</iframe>\");");
...It should force the browser to ask for the servlet again
hope this helps... -
Unable to display double values in Excel sheet using JExcel API
Hi
I am writing code to generate report in the form of Excel Sheet using JExcel API.
Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
Any kind of reply might help me lot.
Thank U.If you enable the submit zero option, it still happens? This is a new feature on the display tabl
#NumericZero Enhancements
To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
· Excel formatting for the cell is retained.
· All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
· This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
1. (Highest) Metadata errors
2. #No access
3. #Invalid/Meaningless
4. #No data\Missing -
Caching problem w/ primary-foreign key mapping
I have seen this a couple of times now. It is not consistent enough to
create a simple reproducible test case, so I will have to describe it to you
with an example and hope you can track it down. It only occurs when caching
is enabled.
Here are the classes:
class C1 { int id; C2 c2; }
class C2 { int id; C1 c1; }
Each class uses application identity using static nested Id classes: C1.Id
and C2.Id. What is unusual is that the same value is used for both
instances:
int id = nextId();
C1 c1 = new C1(id);
C2 c2 = new C2(id);
c1.c2 = c2;
c2.c1 = c1;
This all works fine using optimistic transactions with caching disabled.
Although the integer values are the same, the oids are unique because each
class defines its own unique oid class.
Here is the schema and mapping (this works with caching disabled but fails
with caching enabled):
table t1: column id integer, column revision integer, primary key (id)
table t2: column id integer, column revision integer, primary key (id)
<jdo>
<package name="test">
<class name="C1" objectid-class="C1$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t1"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c2">
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
<class name="C2" objectid-class="C2$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t2"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c1">
<extension vendor-name="kodo" key="dependent" value="true"/>
<extension vendor-name="kodo" key="inverse-owner" value="c2"/>
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="table" value="t1"/>
<extension vendor-name="kodo" key="ref-column.id" value="id"/>
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
</package>
</jdo>
Because the ids are known to be the same, the primary key values are also
used as foreign key values. Accessing C2.c1 is always non-null when caching
is disabled. With caching is enabled C2.c1 is usually non-null but sometimes
null. When it is null we get warnings about dangling references to deleted
instances with id values of 0 and other similar warnings.
The workaround is to add a redundant column with the same value. For some
reason this works around the caching problem (this is unnecessary with
caching disabled):
table t1: column id integer, column id2 integer, column revision integer,
primary key (id), unique index (id2)
table t2: column id integer, column revision integer, primary key (id)
<jdo>
<package name="test">
<class name="C1" objectid-class="C1$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t1"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c2">
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="column.id" value="id2"/>
</extension>
</field>
</class>
<class name="C2" objectid-class="C2$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t2"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c1">
<extension vendor-name="kodo" key="dependent" value="true"/>
<extension vendor-name="kodo" key="inverse-owner" value="c2"/>
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="table" value="t1"/>
<extension vendor-name="kodo" key="ref-column.id" value="id2"/>
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
</package>
</jdo>
Needless to say, the extra column adds a lot of overhead, including the
addition of a second unique index, for no value other than working around
the caching defect.Tom-
The first thing that I think of whenever I see a problem like this is
that the equals() and hashCode() methods of your application identity
classes are not correct. Can you check them to ensure that they are
written in accordance to the guidelines at:
http://docs.solarmetric.com/manual.html#jdo_overview_pc_identity_application
If that doesn't help address the problem, can you post the code for your
application identity classes so we can double-check, and we will try to
determine what might be causing the problem.
In article <[email protected]>, Tom Landon wrote:
I have seen this a couple of times now. It is not consistent enough to
create a simple reproducible test case, so I will have to describe it to you
with an example and hope you can track it down. It only occurs when caching
is enabled.
Here are the classes:
class C1 { int id; C2 c2; }
class C2 { int id; C1 c1; }
Each class uses application identity using static nested Id classes: C1.Id
and C2.Id. What is unusual is that the same value is used for both
instances:
int id = nextId();
C1 c1 = new C1(id);
C2 c2 = new C2(id);
c1.c2 = c2;
c2.c1 = c1;
This all works fine using optimistic transactions with caching disabled.
Although the integer values are the same, the oids are unique because each
class defines its own unique oid class.
Here is the schema and mapping (this works with caching disabled but fails
with caching enabled):
table t1: column id integer, column revision integer, primary key (id)
table t2: column id integer, column revision integer, primary key (id)
<jdo>
<package name="test">
<class name="C1" objectid-class="C1$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t1"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c2">
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
<class name="C2" objectid-class="C2$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t2"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c1">
<extension vendor-name="kodo" key="dependent" value="true"/>
<extension vendor-name="kodo" key="inverse-owner" value="c2"/>
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="table" value="t1"/>
<extension vendor-name="kodo" key="ref-column.id" value="id"/>
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
</package>
</jdo>
Because the ids are known to be the same, the primary key values are also
used as foreign key values. Accessing C2.c1 is always non-null when caching
is disabled. With caching is enabled C2.c1 is usually non-null but sometimes
null. When it is null we get warnings about dangling references to deleted
instances with id values of 0 and other similar warnings.
The workaround is to add a redundant column with the same value. For some
reason this works around the caching problem (this is unnecessary with
caching disabled):
table t1: column id integer, column id2 integer, column revision integer,
primary key (id), unique index (id2)
table t2: column id integer, column revision integer, primary key (id)
<jdo>
<package name="test">
<class name="C1" objectid-class="C1$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t1"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c2">
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="column.id" value="id2"/>
</extension>
</field>
</class>
<class name="C2" objectid-class="C2$Id">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table" value="t2"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column" value="revision"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map" value="value">
<extension vendor-name="kodo" key="column" value="id"/>
</extension>
</field>
<field name="c1">
<extension vendor-name="kodo" key="dependent" value="true"/>
<extension vendor-name="kodo" key="inverse-owner" value="c2"/>
<extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
<extension vendor-name="kodo" key="table" value="t1"/>
<extension vendor-name="kodo" key="ref-column.id" value="id2"/>
<extension vendor-name="kodo" key="column.id" value="id"/>
</extension>
</field>
</class>
</package>
</jdo>
Needless to say, the extra column adds a lot of overhead, including the
addition of a second unique index, for no value other than working around
the caching defect.
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Container element value late update in ECC6
Hi All,
I have a problem with container element "RECEIVED" which has incomplete value. I'm using function SAP_WAPI_READ_CONTAINER (simple container) in my custom object ZBUS2081 method priceapproval. When 2nd person want to approve the workitem, the container value of element name "RECEIVED" only has previous approval person instead of table that has 2 line values (previous person who has already approved and 2nd person who want to approve this workitem).
We have upgrade our SAP version from 4.7 into ECC6/ERP6, which in 4.7 version this container element returned table of 2 line values.
Since the container element value has late to update the value, then it did not recognise as a final approval at the end of workflow step and raise an error for agent determination. If there is any related SAP note, please let me know.
Thanks,
CharlieHello Charlie !
Your RECEIVED container stores approver details.
Please check the binding between method container to task container to workflow container.Imperfect binding could be a reason why approver details are not populated properly.It seems your container is multiline container.Make sure the method,task and workflow containers are multiline enabled.
Check at SWO1, whether the PRICEAPPROVAL method behaves as expected and if you are using rule for agent determination, you have to check the rule at PFAC as well as binding details.Also check at workflow log.
Hope you have delegated ZBUS2081.
Regards,
S.Suresh -
Hi,
In my sq01 Query i am using LDB SDF ( FI/CO) .
It running Successfully.
only one Problem is that it showing Double Value Why ?
How to Solve this ?
ThanksWhat is showing double value.
It may be because the output may be at the line level. -
SPListItemCollection.GetDataTable() delivers wrong Double Values
Hi there,
i have a Problem with the .getDataTable() Method of a SPListItemCollection Object. Within the SPListItemCollection all Double Values are displayed correct. But the DataTable Edition puts the decimal point to the End of the number. And i have no idea why,
and how to get rid of this. Any hints?
DataTable dt = new DataTable("ChargeData");
listItems[0]["PRICE"] -> 107.10 | object {double}
dt = listItems.GetDataTable();
dt[0]["PRICE"] -> 10071.0 | object {double}
P.s.: If this is realted in some way, the initial List for the SPListItemCollection is a External List with a MSSQL Connection. The 'Price' Column within the SQL Server is a "float".
My Best Regards
THO
EDIT #1
I've try to figure out when this problem appears. Always or only on BCS lists, so i tried (with Powershell), and found out, this seems to be a Problem with the Autogenerated BCS List.
$nonbcslist.Items[0]["PRICE"] -> 107,10 | double
$dt = $nonbcslist.Items.GetDataTable()
$dt.Rows[0]["PRICE"] -> 107,10 | double
$bcslist.Items[0]["PRICE"] -> 107,10 | double
$bcsdt = $bcslist.Items.GetDataTable()
$bcsdt.Rows[0]["PRICE"] -> 10710 | doubleI noticed that in one example you are using a period to segment the double and in the other a comma. I wonder if that is somehow tied into the wrong conversion when returning a data table.
I have seen GetDataTable() break some other formatting in the past, specifically when working with multi-select user fields. Your best bet may be to iterate through the collection and manually populate a blank table.
Dimitri Ayrapetov (MCSE: SharePoint) -
Query design: Default Value List Filter Prompt to None
I am building a query with several filter prompts which are of data type Value List
The problem is that the list defaults to the first value in the Value List, and I would like to default it to None. The reason of course is so users don't have to switch all the dropdowns to None manually.
I am wondering, what is the default value that can default the list to None? I have tried "0", "None", "null" all to no avail. My current hack is to add another value to the value list called "Any" and make it the first choice in the list.Unfortunately I tried that and it didn't work.
The values of my filter prompt are as follows.
Parameter Name: AGREEMENT_TYPE
Prompt Message Resource: Agreement Type
Default Value: null:616:null
Data Type: Value List
String Matching:Exact Match
Value List Type: Agreement Type
Prefill value from cache:
Optional:
Hidden:
Locked: -
Binds with string containing double quotes
Hello there,
I have the following SELECT statement which is run from a Delphi application :
SELECT Customer, Last_Name
FROM Customer
WHERE UPPER(Last_Name) LIKE :last;
:last has the string value of Smith"a".
Is there a problem with binds and strings wich contain double quotes?.
If so, how can I fix this problem?
Thanks,
MiaHi
There is no problem in this example. Content of bind variable is not part of syntc checking, so you can have any characters.
Regards
null -
Getting Double values in Purchasing cube
hi experts,
I m getting double values for 0po_items and ocontr_item in purchasing data cube 0pur_c01.
i have also applied the test rule in routine ,that values are fine.
but in cube values are getting double.
please help..........Hi,
It seems like you are loading data into cube using 2 DataSource and there is no (consolidated) dso in between.
If the KF say (qty) you are mapping from both the datasource to the cube, it is going to be doubled in report as 2 records will be found in cube.
I suggest try to load a single valid record (PO and lien item) one by one into the cube and do check the values in cube for each process. You will get good idea how cube behave while loading data from diff. sources.
Also try to bring in the one dso where you consolidate the data as per report requirement and then move that data into Cube, will give you required output.
Thank-You.
Vinod
Maybe you are looking for
-
Several customers running different versions of Office 2011 (14.4.1-14.4.5) on OSX varying from 10.7.5 to 10.9.5, running on various kinds of hardware (iMac/MacBook Pro/MacBook Air) of various ages are having issues opening *.doc files if the Word is
-
How to hold data in parameter or select option
i have define parametrs/select option. once i have run report , i will enter certain value in that parametrs or select option.when i run report again i want same value in that parametrs or select option which i enter previously.urgent
-
Clear_All_Master_Details
i am populating my header & detail block with the help of a timer & works fine. now lets say i query records, come upto the last record, press down arrow and then decide to create a new record. i enter a value in a field and the header & detail block
-
Including non-existent permissions in a policy file
I noticed that if I, in a policy file, specify a permission which implementation is not available to the VM, no error occurs and it seems like the bogus permission is simply ignored. I use -Djava.security.manager and -Djava.security.policy=my.policy.
-
Pci compliance for very small biz using mac and ipad
I run a very SMALL business. We have one MacBook an iPad and an iPhone. We run everything through a second party merchant card processor/software (mindbody). However, according to the PCI compliance survey I just finished, I am supposed to run quarte