Relative value function is not retrive value correctly?
HI Experts,
When I have used previous function it is bringing correct value. Instead of previous if i use Relative value function it is not bring correct value.
Here i have attached two screen shot. One is for previous function another one is Relative value function.
Hi Mnikandan,
Try by including the dimension in vertical axis in the formula
=relativevalue([Actual];(Month];[Dimension in Vertical Axis]);-1)
Similar Messages
-
Revision: 1978
Author: [email protected]
Date: 2008-06-06 08:05:34 -0700 (Fri, 06 Jun 2008)
Log Message:
Bug: vendors.properties file which is used in vendor specific login commands was not being read properly and as a result some login related error messages were not being displayed correctly.
QA: Yes - we need automated tests to make sure that errors.properties and vendors.properties in BlazeDS/LCDS are loaded properly.
Doc: No
Modified Paths:
blazeds/branches/3.0.x/modules/common/src/java/flex/messaging/util/PropertyStringResource Loader.java
blazeds/branches/3.0.x/modules/opt/src/jrun/flex/messaging/security/JRunLoginCommand.java
blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. javaI have a lot of grief with this version of Windows Media Player.
It is very buggy and frustrating to use.
I have my Music library on a QNAP NAS, which is as reliable as they come.
System notifications make it not save changes. It also does not do a good job of interpreting albums and artists from folders. Changes to track names are not saved, nor are tracks moved to other albums, renamed albums, changes to genre, artist
or date. It separates and merges albums/tracks without sense or reason. Some changes I've made up to 4 times, then closed WMP and re-started my machine to check if it has/hasn't saved the changes. Often it has not.
This is the first time I've used WMP in this capacity, and I do not recommend it.
New service pack please. -
PLSQL function does not return the correct number of rows?
Hey folks. I'm still green when it comes to writing PLSQL. It's fun, rewarding and very frustrating. Hence, I'm turning to the experts. If you folks can help me understand what I'm doing wrong here, I'd really appreciate it.
The code is somewhat specific to my company's product, but I think it should be easy to read and understand what I'm doing. If not, please let me know what I can clarify.
All i'm trying to do is determine if the most recent iteration of data available for a particular host is a full scan or not (level2). I go about this in the following manner:
1. get the operatingsystem id, it's scandate (preferred), the most recent scandate and it's scan status from a table of where all operating systems data lives. Loop through all the Oses
(from this I set v_osid, v_mostrecentscandate, v_scandate).
2. Before doing the crazy logic, pick the low hanging fruit
2a. if the the level2 status of the host is N, then v_level2 = 'N';
2b. if the level2 = 'Y' and the mostrecentscandate and scandate are identical, then v_level2 = 'Y';
2c. for all other cases, go to 3
3. Using v_mostrecentscandate, find all table id that may hold the most recent instance of data for the host
4. Loop through through the concatenation of that id + _base. If you find the id in those tables, then store the id for the next step.
5. When you I find the right id, I now concatenate the id + attrdata. For the host id, I look for any rows where attribute_value in (..) and the corresponding number_value is not null.
5b. set v_level2 = 'Y'
5c. otherwise, set v_level2 = 'N'
6 end the loop
7 wash, rinse, repeat for each OS.
create or replace package body mostrecentlevel2 as
function getMostRecentL2 return bdna_mostrecent_level2 pipelined IS
v_lsid NUMBER;
v_sql VARCHAR2(5000);
v_sql_baseid NUMBER;
v_sql_numv NUMBER;
v_lsidt VARCHAR2(5000);
v_lsidt2 VARCHAR2(5000);
v_sql_rec VARCHAR2(5000);
v_osid NUMBER;
v_anchor DATE;
v_ls CHAR(2);
v_level2 CHAR(1);
v_mostrecentscandate DATE;
v_scandate DATE;
cursor getOSinfo_cur is select operatingsystem_id, scandate, mostrecentscandate, level2 from bdna_all_os;
cursor getlsID_cur is select id from local_scan where
((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60)
and
((trunc(collect_end_time) - to_date(v_anchor))*24*60*60) >= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60);
getOSinfo_rec getOSinfo_cur%rowtype;
getlsID_rec getlsID_cur%rowtype;
BEGIN
v_ls := 'ls';
v_anchor := '01-JAN-01';
FOR getOSinfo_rec IN getOSinfo_cur LOOP
v_osid := getOSinfo_rec.operatingsystem_id;
v_mostrecentscandate := getOSinfo_rec.mostrecentscandate;
v_scandate := getOSinfo_rec.scandate;
IF getOSinfo_rec.level2 = 'N' THEN
v_level2 := 'N';
ELSIF getOSinfo_rec.level2 = 'Y' THEN
IF v_mostrecentscandate != v_scandate THEN
FOR getlsID_rec IN getlsID_cur LOOP
v_lsid := getlsID_rec.id;
v_lsidt := v_ls||v_lsid;
v_sql := 'select id from '||v_lsidt||'_base where id = '||chr(39)||v_osid||chr(39);
EXECUTE IMMEDIATE v_sql into v_sql_baseid;
IF SQL%ROWCOUNT > 0 THEN
v_lsidt2 := v_lsidt;
v_sql := '';
END IF;
END LOOP;
v_sql := 'select number_value from '||v_lsidt2||'_attr_data where
lower(attribute_name) IN ('||chr(39)||'numcpus'||chr(39)||', '||chr(39)||'totalmemory'||chr(39)||', '||chr(39)||'cpuutilpercent'||chr(39)||', '||chr(39)||'numprocesses'||chr(39)||')
and
number_value is not NULL
and
element_id = '||chr(39)||v_osid||chr(39);
EXECUTE IMMEDIATE v_sql into v_sql_numv;
IF SQL%ROWCOUNT > 0 THEN
v_level2 := 'Y';
ELSE v_level2 := 'N';
END IF;
END IF;
v_level2 := 'Y';
END IF;
PIPE ROW (mostRecentLevel2Format(v_osid,v_mostrecentscandate,v_level2));
END LOOP;
END;
END;
/Now some will ask why I'm using pipelining? Again, I'm green.. I was reading around, looking for a way to make this code run as fast as possible (because it's potentially got to go through 56K records and perform the expensive work on).
I also realize I'm not providing the type or package code, and that's because I think I'm good on that. The code above compiles just fine without errors and when it runs, it only returns 6 consecutive rows.. I'm expecting 70K lol. So I know I'm doing something wrong.
Any thoughts?
Oh forgot to add this is on 11g R1 Enterprise Edition
Edited by: ErrolDC on Nov 14, 2011 4:52 PM
Edited by: ErrolDC on Nov 14, 2011 5:07 PMErrolDC wrote:
Hey folks. I'm still green when it comes to writing PLSQL. It's fun, rewarding and very frustrating. Hence, I'm turning to the experts. If you folks can help me understand what I'm doing wrong here, I'd really appreciate it.
The code is somewhat specific to my company's product, but I think it should be easy to read and understand what I'm doing. If not, please let me know what I can clarify.Post a complete script that peoople who aren't as familiar with the application as you are can run to re-create the problem and test their ideas. In this case, that includes CREATE TABLE and INSERT statements for the tables used (just the columns needed for this job), a query that uses the function, and the results you want from that query given the data you posted.
All i'm trying to do is determine if the most recent iteration of data available for a particular host is a full scan or not (level2). I go about this in the following manner:
1. get the operatingsystem id, it's scandate (preferred), the most recent scandate and it's scan status from a table of where all operating systems data lives. Loop through all the Oses
(from this I set v_osid, v_mostrecentscandate, v_scandate).
2. Before doing the crazy logic, pick the low hanging fruit
2a. if the the level2 status of the host is N, then v_level2 = 'N';
2b. if the level2 = 'Y' and the mostrecentscandate and scandate are identical, then v_level2 = 'Y';
2c. for all other cases, go to 3
3. Using v_mostrecentscandate, find all table id that may hold the most recent instance of data for the host
4. Loop through through the concatenation of that id + _base. If you find the id in those tables, then store the id for the next step.
5. When you I find the right id, I now concatenate the id + attrdata. For the host id, I look for any rows where attribute_value in (..) and the corresponding number_value is not null.
5b. set v_level2 = 'Y'
5c. otherwise, set v_level2 = 'N'
6 end the loop
7 wash, rinse, repeat for each OS.
create or replace package body mostrecentlevel2 as
function getMostRecentL2 return bdna_mostrecent_level2 pipelined IS
v_lsid NUMBER;
v_sql VARCHAR2(5000);
v_sql_baseid NUMBER;
v_sql_numv NUMBER;
v_lsidt VARCHAR2(5000);
v_lsidt2 VARCHAR2(5000);
v_sql_rec VARCHAR2(5000);
v_osid NUMBER;
v_anchor DATE;
v_ls CHAR(2);
v_level2 CHAR(1);
v_mostrecentscandate DATE;
v_scandate DATE;
cursor getOSinfo_cur is select operatingsystem_id, scandate, mostrecentscandate, level2 from bdna_all_os;
cursor getlsID_cur is select id from local_scan where
((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60)
and
((trunc(collect_end_time) - to_date(v_anchor))*24*60*60) >= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60);
getOSinfo_rec getOSinfo_cur%rowtype;
getlsID_rec getlsID_cur%rowtype;
BEGIN
v_ls := 'ls';
v_anchor := '01-JAN-01';
FOR getOSinfo_rec IN getOSinfo_cur LOOP
v_osid := getOSinfo_rec.operatingsystem_id;
v_mostrecentscandate := getOSinfo_rec.mostrecentscandate;
v_scandate := getOSinfo_rec.scandate;
IF getOSinfo_rec.level2 = 'N' THEN
v_level2 := 'N';
ELSIF getOSinfo_rec.level2 = 'Y' THEN
IF v_mostrecentscandate != v_scandate THEN
FOR getlsID_rec IN getlsID_cur LOOP
v_lsid := getlsID_rec.id;
v_lsidt := v_ls||v_lsid;
v_sql := 'select id from '||v_lsidt||'_base where id = '||chr(39)||v_osid||chr(39);
EXECUTE IMMEDIATE v_sql into v_sql_baseid;
IF SQL%ROWCOUNT > 0 THEN
v_lsidt2 := v_lsidt;
v_sql := '';
END IF;
END LOOP;
v_sql := 'select number_value from '||v_lsidt2||'_attr_data where
lower(attribute_name) IN ('||chr(39)||'numcpus'||chr(39)||', '||chr(39)||'totalmemory'||chr(39)||', '||chr(39)||'cpuutilpercent'||chr(39)||', '||chr(39)||'numprocesses'||chr(39)||')
and
number_value is not NULL
and
element_id = '||chr(39)||v_osid||chr(39);
EXECUTE IMMEDIATE v_sql into v_sql_numv;
IF SQL%ROWCOUNT > 0 THEN
v_level2 := 'Y';
ELSE v_level2 := 'N';
END IF;
END IF;
v_level2 := 'Y';
END IF;
PIPE ROW (mostRecentLevel2Format(v_osid,v_mostrecentscandate,v_level2));
END LOOP;
END;
END;
/Now some will ask why I'm using pipelining? Again, I'm green.. I was reading around, looking for a way to make this code run as fast as possible (because it's potentially got to go through 56K records and perform the expensive work on).
I also realize I'm not providing the type or package code, and that's because I think I'm good on that. The code above compiles just fine without errors and when it runs, it only returns 6 consecutive rows.. I'm expecting 70K lol. So I know I'm doing something wrong. You're calling TO_DATE with a DATE argument. Why are you calling TO_DATE at all?
It seems like this condition:
((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60) is equivalent to
TRUNC (collect_start_time) <= v_mostrecentscandateThat probably has nothing to do with why you're only getting 6 rows. -
Previous function is working fine. But Relative value function is not working?
HI Experts,
I have used previous function based on calender year it is working fine. but when i have used Relative function based on calender year. It is not working fine. Here I have attached screen shot. Please find the attachment.
Previous Function.
Relative value Function:OK, I added a NEW password to my account settings and everything is fine. **** computers.
-
Tax value is not picked up correctly for the condition type in SO creation
Hi All,
I have a issue in Picking up Tax value correctly for the condition type in SO Creation.
Actual Issue:
When creating the sales order manually,
tax value is picked up correctly for one condition type: ISS3.
When the Sales Order is created via Idoc using the function module 'idoc_input_orders', tax value is not picked for same condition type: ISS3.
We need to find out why the value for the condition type 'ISS3' is not picked in this way!
Can anybody solve this issue!
What can be the reason which is stopping picking up tax value for condition type: ISS3 when Sales Order is created via F.M 'IDOC_INPUT_ORDERS'! While it picked up the same while creating Sales Order manuallly.
Thanks in advance.
Thanks,
Deep.Hi All,
Can anybody give the solution for above posted issue!
Working:
When creating the sales order manually,
tax value is picked up correctly for the condition type ISS3.
Actual Issue:
When the Order is created via Idoc using the function module 'idoc_input_orders',
tax value is not picked .
I need to find out why the value for the condition type 'ISS3' is not picked.
I have debugged the issue from WE19 but upto Conditions tab it is picking up tax value but then it is becoming zero again it remains zero after saving SO.
But Manually tax value is picked up for condition type ISS3 and remains same after saving order.
I have debugged it several times fro WE19 but not able to find route cause for the issue.
What can be the issue over here!
Can anybody give me solution for the same!
Thanks in advance.
Thanks,
Deep. -
DQS Term-based relations value contains white space is not allowed
Hi
SQL Server 2012:
I have a term 'R & D' which i would like to replace with 'Research and Development'. How do i incorporate it in the DQS 2012 cleansing?
I want to replace 'I C G E B' with 'International Centre for Genetic Engineering and Biotechnology'. I created a Domain values. On cleasning, it corrected the source value 'Centre for Genetic Engineering
and Biotechnology, Cuba' with 'International Centre for Genetic Engineering and Biotechnology' with Confidence score was 81%. Not sure, why is it replacing. I have only one domain value. I have
no other rules or term-based relations during my testing. Probably it took the initials of 'I C G E B' and partially matched in 'Centre for Genetic Engineering and Biotechnology, Cuba'.
Any solution how to solve this.
Any help much appreciated.
Nikesh Shah
Nikesh ShahHi Nikesh,
If I understood you correctly, it is correcting your string because you gave it a domain value and no rules to guide the correction behavior. This way, DQS is comparing everything with that domain value to check if it is similar, and that stringwas similar
enough, so DQS corrected it to the value you said "it was the only one valid in the domain"
You can implement that correction in two ways
- Using a term-based relation, specifying that every time DQS encounters the string "I C G E B" (even inside other strings) it will replace it with International Centre for Genetic Engineering and Biotechnology
- Specifying a correction in your domain values. Manually insert the value "I C G E B", mark it as an error and specify its correction with International Centre for Genetic Engineering and Biotechnology.
Given your case, I'd rather take the first option, because we are talking about a replacement of initial letters, not about a correction. If you take the second option, you will get weird corrections as you have encountered already.
Regards.
Pau. -
COPA Derivation Rules are not assigning the correct values
COPA Derivation Rules are not assigning the correct values when we process billing documents in batch. We currently have derivation rules defined to take the ship to country and refer to custom tables were we identify custom geographic groups (INT/DOM and EAM, AP, etc.). The derivation rules work accurately when the billing documents are created individually, and more than 75% of them are accurate when generated in batch, but in some circumstances, it populates the derived values with the wrong field and we can not identify where or why that's happening. It looks like it may have something to do when the ship to customer number account group is different, but that's not consistent.. Does anyone know how or where these values get populated, or have any ideas why incorrect values are appearing sporadically throughout the billing run? Thanks!!!
Leigh,
Apparently the function module is changing the values for some billing docs. Check one of the following user exits, if it gets triggered and the values are changed:
COPA0001 Enhancement for derivation in Profitability Analysis (CO-PA)
Function Module: EXIT_SAPLKEDRCOPA_001
COPA0002 Enhancement for valuation in Profitability Analysis (CO-PA)
Function Module: EXIT_SAPLKEAB_001
COPA0003 Enhancement for assignment to profitability segment (CO-PA)
Function Module: EXIT_SAPLKEAK_001
COPA0005 Enhancement for actual data update (CO-PA)
Function Module: EXIT_SAPLKEII_001
Function Module: EXIT_SAPLKEII_002
Award suitable points if the above helps. You can also reach me at [email protected]
Thanks
Ajay -
I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
The value returned from the load function is not of type numeric.
The error occurred in
D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
Called from D:/website/NECPhase2/action.validate.cfm: line 54
261 : <cfif isNumeric(get.idCountry)>
262 : <cfset rc = this.objCountry.setID(get.idCountry)>
263 : <cfset rc = this.objCountry.load()>
264 : </cfif>
265 : <cfset this.sPostcode = get.sPostcode>
Have there been any changes between CF8 and CF11 that could cause this error?
Does anyone have ideas?This is the code in file object file country.cfc (nec.com.objects.country):
<cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
<!---
// Construct this object
--->
<cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
<cfscript>
this.idCountryID = 0;
this.sCountryName = "";
this.sISOCode = "";
this.sDHLCode = "";
this.iErrorID = "";
</cfscript>
<!---
// The following functions are the setters and getters. offering us a better way to get
// at the contents of the object
--->
<!---
// Getters
--->
<cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
<cfreturn this.idCountryID>
</cffunction>
<cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
<cfreturn this.sCountryName>
</cffunction>
<cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
<cfreturn this.sISOCode>
</cffunction>
<cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
<cfreturn this.sDHLCode>
</cffunction>
<cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
<cfreturn this.iError>
</cffunction>
<!---
// Setters
--->
<cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
<cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
<cfset this.idCountryID = arguments.idCountryID>
<cfreturn true>
</cffunction>
<cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
<cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
<cfset this.sCountryName = arguments.sCountryName>
<cfreturn true>
</cffunction>
<cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
<cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
<cfset this.sISOCode = arguments.sISOCode>
<cfreturn true>
</cffunction>
<cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
<cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
<cfset this.sDHLCode = arguments.sDHLCode>
<cfreturn true>
</cffunction>
<!---
// Clear, to empty out the contents of this object
--->
<cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
<cfscript>
this.sCountryName = "";
this.sISOCode = "";
this.sDHLCode = "";
this.iErrorID = "";
</cfscript>
<cfreturn true>
</cffunction>
<!---
// The following functions deal with the load, save and deleting of objects
--->
<!---
// Load
--->
<cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
<cfset rc = this.clear()>
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Check to see if it exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif not checkID.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
if(isDefined("session.afr")){
whichOne = "#session.afr.getsAFRNumber()#";
} else {
whichOne = "";
iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfif>
<!---
// If we got past all then then load in the details
--->
<cftry>
<cfquery name="get" datasource="#sDatasource#">
SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("load: get: #cfcatch.detail#");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfset this.idCountryID = get.idCountryID>
<cfset this.sCountryName = get.sCountryName>
<cfset this.sISOCode = get.sISOCode>
<cfset this.sDHLCode = get.sDHLCode>
<cfset this.iErrorID = "">
<cfreturn true>
</cffunction>
<!---
// Save
--->
<cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Now check to see if ithat ID exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<!---
// If it doesn't exist, then add the record, otherwise update the record
--->
<cfif not checkID.recordCount>
<cfreturn this.add()>
<cfelse>
<cfreturn this.update()>
</cfif>
</cffunction>
<!---
// Add
--->
<cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
<!---
// Check to see if that a different item isn't already using the same unique details
--->
<cftry>
<cfquery name="checkUnique" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkUnique.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
</cfscript>
<cfreturn iErrorID>
</cfif>
<cftry>
<cfquery name="add" datasource="#sDatasource#">
SET nocount on
INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
SELECT @@identity as autoID
SET nocount off
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("add: add: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn add.autoID>
</cffunction>
<!---
// Update
--->
<cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
<!---
// Check to see if that a different item isn't already using the same unique details
--->
<cftry>
<cfquery name="checkUnique" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
AND idCountryID <> #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkUnique.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Attempt to update the record to the datasource
// if this fails for any reason then we submit an error message
// to the error component and return the ID of the error
--->
<cftry>
<cfquery name="update" datasource="#sDatasource#">
UPDATE tblCountry
SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("update: update: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn this.idCountryID>
</cffunction>
<!---
// Delete
--->
<cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Now check to see if ithat ID exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif not checkID.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Now check to see if there are any dependancies, if so we can't delete the item
--->
<cftry>
<cfquery name="checkDependancies" datasource="#sDatasource#">
SELECT idCountry
FROM tblAddress
WHERE idCountry = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkDependancies.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("That Country is being used by an address, delete failed.");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Now attempt to remove the record.
// if this fails for any reason then we submit an error message
// to the error component and return the ID of the error
--->
<cftry>
<cfquery name="delete" datasource="#sDatasource#">
DELETE FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn this.idCountryID>
</cffunction>
</cfcomponent> -
Print preview not showing values correctly. (single words are omitted)
Hi,
When viewing print preview of ME23n , it does not shows the values correctly.
It omitting the single words.
If its having 2 or more words, it displaying correctly
For example;
This is the vendor & its address. (check attached image img1.jpg)
ZERANDIB BUSINESS APPLIANCES
Number-122/A
PO BOX 41,112,REID AVENUE
COLOMBO-04
When displaying the print preview, it shows only some parts of the above address
Shows only; (check attached image img2.jpg)
ZERANDIB BUSINESS APPLIANCES
PO BOX 41,112,REID AVENUE
These values are getting from a table called LFA1. I have checked that table & in that table all the values exists correctly.
I have noted issue is with, having only a single word. (If address or name having only a single word, that is without spaces, it will not going to show in the print preview) -
In the above example, it is not showing Number-122/A and COLOMBO-04 (Its a single word. No spaces there)
If its like --> Number - 122/A & COLOMBO - 04 , then it will display in the print preview correctly (where there are spaces after - mark)
check img3.jpg
If its having more than one word, then it will display correctly in the print preview. As below;
ZERANDIB BUSINESS APPLIANCES
Number - 122/A
PO BOX 41,112,REID AVENUE
COLOMBO - 04
Any ideas how to resolve this issue?
Is there any thing to do with printer settings & configurations / netweaver admin point of view?
Best Regards.
ZerandibHi Zerandib,
By the way , since its a standard program, i think that code is out of our scope.
Me23N is a standard tcode but cusomters create Z-Program for printing by making a copy of standard.
You may please check upon the same.
Is it possible to check the results on a system where patch has not been applied ?
Regards,
Deepak Kori -
ME23n , Does not shows the values correctly in print preview
Hi,
When viewing a PO using ME23n , it does not shows the values correctly in the print preview.
For example;
This is the vendor & its address. (check attached image img1.jpg)
ZERANDIB BUSINESS APPLIANCES
Number-122/A
PO BOX 41,112,REID AVENUE
COLOMBO-04
When displaying the print preview, it shows only some parts of the above address
Shows only; (check attached image img2.jpg)
ZERANDIB BUSINESS APPLIANCES
PO BOX 41,112,REID AVENUE
These values are getting from a table called LFA1. I have checked that table & in that table all the values exists correctly.
I have noted issue is with, having only a single word. (If address or name having only a single word, that is without spaces, it will not going to show in the print preview) -
In the above example, it is not showing Number-122/A and COLOMBO-04 (Its a single word. No spaces there)
If its like --> Number - 122/A & COLOMBO - 04 , then it will display in the print preview correctly (where there are spaces after - mark)
check img3.jpg
If its having more than one word, then it will display correctly in the print preview. As below;
ZERANDIB BUSINESS APPLIANCES
Number - 122/A
PO BOX 41,112,REID AVENUE
COLOMBO - 04
If its 2 or more words, it shows correctly.
If its 1 word, then its not showing!
Why it is happening like that? Any ideas how to resolve this issue?
regards.
zerandibIt turns out that this problem went away after the program crashed. Everything seems to be working well now.
-
I used to print all my BioBench data by first exporting them to Excel and then print from there. Recently I need to print some of the screen shots and some data directly from array analysis, but when I click on the "print" buttons, the "Error, the printer is not set up correctly" message occurs. The only thing I can print from BB without this error is the report printing function. I have a postcript printer and I have set the postscript option to be "true"... Thanks !
This problem is a result of a limitation in Windows 9x regarding the size of an image that you can send to the printer. The problem does not occur on Windows 2000/NT. This problem appeared with the increased color options of LabVIEW 6.0 on which the BB1.2 is based.Although it is not immediately obvious, your video driver and settings play a role in printing.
1. Try adjusting the color palette your driver uses (i.e., 256 color, high olor, true color). The error may occur only in one of these modes. Also, change the resolution (number of pixels) to represent the Screen Area; e.g., change from a 1024 x 768 display to an 800 x 600 pixel display.
2.Certain video drivers also support "acceleration" modes. Using a non-accelerated mode often eliminates the error. For
Windows 95/98, right-click on your My Computer icon and select "Properties" from the pop-up
menu. On the Performance tab, click the Graphics button and change the Hardware Acceleration (e.g., if it is set to "Full", lower the setting a notch or two); for Windows 2000/NT, right-click on your Desktop and select "Properties" from the pop-up menu. On the Settings tab, click the Advanced button and go to
Troubleshooting.
3.In Windows, the standard VGA driver provided by the operating system is very stable. Try using this driver in place of the specific one written for your video hardware. If the error is eliminated, there is likely a problem with your vendor-provided video driver.
4.These errors are most often fixed with the latest
video/printer driver. Be sure to contact your hardware manufacturer and install the latest driver. An easy way to determine if your error is "driver-related" is to move your code to another machine (and hopefully a different set of drivers) and see if th
e error persists. If the problem is printer related, try another printer.
5.Make sure there are at least 100M avalible space in your C: drive. If not, set the virtual memory to the other drive which has larger available space. -
I am using TABLE(CAST()) operation in PL/SQL and it is returning me no data.
Here is what I have done:
1. Created Record type
CREATE OR REPLACE TYPE target_rec AS OBJECT
target__id NUMBER(10),
target_entity_id NUMBER(10),
dd CHAR(3),
fd CHAR(3),
code NUMBER(10),
target_pct NUMBER,
template_nm VARCHAR2(50),
p_symbol VARCHAR2(10),
pm_init VARCHAR2(3),
target_name VARCHAR2(20),
targe_type VARCHAR2(30),
target_caption VARCHAR2(30),
sort_order NUMBER (4)
2. Created Table type
CREATE OR REPLACE TYPE target_arr AS TABLE OF target_rec
3. Created Stored procedure which accepts parameter of type target_arr and runs the Table(Cast()) function on it.
Following is the simplified form of my procedure.
PROCEDURE get_target_weights
p_in_template_target IN target_arr,
p_out_count OUT NUMBER,
IS
BEGIN
SELECT count(*) into p_out_count
FROM TABLE(CAST(p_in_template_target AS target_arr)) arr;
END;
I am calling get_target_weights from my java code and passing p_in_template_target with 10140 records.
Scenario 1: If target_pct in the last record is 0, p_out_count returned from the procedure is 0.
Scenario 2: If target_pct in the last record is any other value(say 0.01), p_out_count returned from the procedure is 10140.
Please help me understand why the Table(Cast()) is not returning the correct results in Scenario 1. Also adding or deleting any record from the test data returns the correct results (i.e. if keep target_pct in the last record as 0 but add or delete any record).
Let me know how can I attach the test data I am using to help you debugging as I don’t see any Attach file button on Post Message screen on the forum.I am not able to reproduce this problem with a small data set. I can only reproduce with the data having 10140 records.
I am not sure if this is the memory issue as adding a new record also solves the problem.
This should not be the error because of wrong way of filling the records in java as for testing purpose I just saved the records which I am sending from java in a table. I updated the stored procedure as well to read the data from the table and then perform TABLE(CAST()) operation. I am still getting 0 as the output for scenario 1 mentioned in my last mail.
Here is what I have updated:
1. Created the table target_table
CREATE Table target_table
target_id NUMBER(10),
target_entity_id NUMBER(10),
dd CHAR(3),
fd CHAR(3),
code NUMBER(10),
target_pct NUMBER,
template_nm VARCHAR2(50),
p_symbol VARCHAR2(10),
pm_init VARCHAR2(3),
target_name VARCHAR2(20),
target_type VARCHAR2(30),
target_caption VARCHAR2(30),
sort_order NUMBER (4)
2. Inserted data into the table : The script has around 10140 rows. Pls let me know how can I send it to you
3. Updated procedure to read data from table and stored into variable of type target_arr. Run Table(cast()) operation on target_arr and get the count
PROCEDURE test_target_weights
IS
v_target_rec target_table%ROWTYPE;
CURSOR wt_cursor IS
Select * from target_table;
v_count NUMBER := 1;
v_target_arr cws_target_arr:= target_arr ();
v_target_arr_rec target_rec;
v_rec_count NUMBER;
BEGIN
OPEN wt_cursor;
loop
fetch wt_cursor into v_target_rec; -- fetch data from table into local record.
exit when wt_cursor%notfound;
--move data into target_arr
v_target_arr_rec := cws_curr_pair_entity_wt_rec(v_target_rec target_id,v_target_rec. target_entity_id,
v_target_rec.dd,v_target_rec.fd,v_target_rec.code,v_target_rec.target_pct,
v_target_rec.template_nm,v_target_rec.p_symbol,v_target_rec.pm_init,v_target_rec.template_name,
v_target_rec.template_type,v_target_rec.template_caption,v_target_rec.sort_order);
v_target_arr.extend();
v_target_arr(v_count) := v_target_arr_rec;
v_count := v_count + 1;
end loop;
close wt_cursor;
-- run table cast on target_arr
SELECT count(*) into v_rec_count
FROM TABLE(CAST(v_target_arr AS target_arr)) arr;
DBMS_OUTPUT.enable;
DBMS_OUTPUT.PUT_LINE('p_out_count ' || v_rec_count);
DBMS_OUTPUT.PUT_LINE('v_count ' || v_count);
END;
Output is
p_out_count 0
v_count 10140
Expected output
p_out_count 10140
v_count 10140 -
Relative value in Crosstab in Business Objects WebI
Hi All,
I have an Cross tab report where I need to compare between Current Year data and Previous Year data. My table structure is like below:
2012 2013 CY vs PY
US 100 150
UK 250 230
AUS 140 150
Now, whenever I am trying to calculate Previous Year value through relative value function I am getting #computation error.
My formula =RelativeValue([measure];([Year]);-1)
Year is the dimension used horizontally in above crosstab.
Can you please suggest what I am missing here. Please provide your solution with Relative Value () only as this is only a prototype we are working on and Relative Value() is going to be required in large scale for the project.
Thanks in advance.Have you tried using the NoFilter function?
For example:
=NoFilter(Sum(RelativeValue([measure] ;([year] );-1)) ;All ) -
Relative Values in the Appearance Palette
The values in the Appearance palette should have an option to be relative. For example, in the Transform Effect, you should be able to specify a Horizontal or Vertical movement based on a percentage of the height or width of the Object instead of an absolute value of 0.139", for example.
The relative values are very very much needed functionality. Through the use of effects and the philosophy of the use of applets apperance significantly changed the quality of the work and the capabilities of Illustrator.
Are there any flammable implement this functionality? -
Relative values - true, new opportunities
Introduction to the pallet apperance relative values such as "+5%" or "- 6mm" or "+12 pkt" free the potential of flexible palette apperance.
Is anyone else could use the opportunity to enter relative values?
Are there any side-effect of working with these values?
Best Regards!
Message was edited by: art.MariuszDoes someone have experiences with SAP customer development?
we would like to send a message to SAP, because this function is really helpfull with working with cumulated data.
http://service.sap.com/communities OSS 357732
or
http://service.sap.com
http://service.sap.com/customdev .
Maybe you are looking for
-
Bridge Vs. Photoshop Elements 5.0 Organizer
I posted something similar in the PSE forum without any feedback. I've used PSE for a while through many versions and have many pictures in the catalog. However I really mostly use the version sets and stacks. A few notes here and there but nothing e
-
Can I import "Open Tabs" from a previous installation?
So i'm building a new computer for my friend's dad, and he's going on about how he needs his old tabs back because he never closes his tabs and he has dozens open and it helps him keep track of what he's doing. Is there any way to import what was goi
-
Had to wipe my hard drive and lost my purchases. Help?
I know how to get purchases off my ipod and on to my new itunes but I have one little problem that I hadn't anticipated. The day I had my hard drive wiped I bought some music and hadn't yet had the chance to put it on my ipod. Is there some way I can
-
Mail error since migration to SL.
Since i installed leopard, i have been unable to connect my acounts by Mail. This error apears. Connection to server pop3.live.com in port 995 has failed. Can anyone help me with this? i cant figure it out.
-
I've created a prproj file and want to create a master DVD. Is there a simple way to do this?