Numeric value deviates from legal range
Dear Experts,
I am facing this error(Numeric value deviates from legal range (ODBC -1015) [131-183]) while copying P.O. to GRPO.
Plz help on this.
Any suggestion will be highly appreciated.
Regards,
Ravi
Hi,
Please check SAP note:
902123
- Maximum Number in Numeric UDF
Thanks & Regards,
Nagarajan
Similar Messages
-
Date Deviates from permissible range [Purchase Order - Value Date]
hello all,
i want to add a Purchase Order (Services) Posting date 05/07/2008 and Delivery Date is 09/30/2008, it prompts me the Error "Date Deviates from permissible range [Purchase Order - Value Date]", now this is my question.
what is the date range for PO posting date and delivery date that the system will allow(date difference)? can i set this one?
Note: we need to make an advance PO for this since our BP required this time period for them to accomplished.
Please help.
Thanks.
FIDELFIDEL,
All documents have 3 dates DocDate, DocDueDate, TaxDate. The date ranges for these dates are taken from the Active Posting period definition.
Open Administration > System Initialization > General Settings > Posting Periods
Click on the Yellow link arrow next to the current posting period and check the Due Date From and To Range and expand the To date to cover 09/30/2008
Posting Date From
Due Date From
Document Date From
Suda -
Date deviates from permissible range
hi all,
I need help for sales order entry.
When I enter sales order entry then I get the error.
Error Is:
Date deviates from permissible range
My Code is :
Document doc = new Document();
_OrdSer = new OrdersService();
doc.Address = "ab";
doc.AgentCode = "ab";
doc.CardCode = "pmgweb2";
doc.CardName = "PMG Web Store Test Cust";
doc.DocDate = DateTime.Parse("2008-02-11");
doc.DocDueDate = DateTime.Now.Date;
//doc.TaxDate = DateTime.Parse("2008-02-11");
doc.DocType = DocumentDocType.dDocument_Service;
doc.DocumentStatus = DocumentDocumentStatus.bost_Open;
doc.BaseAmount = 1000;
doc.DocCurrency = "USD";
doc.DocNum = 1;
doc.HandWritten = DocumentHandWritten.tYES;
MsgHeader msgHeader = new MsgHeader();
msgHeader.SessionID = _SID;
msgHeader.ServiceName = MsgHeaderServiceName.OrdersService;
msgHeader.ServiceNameSpecified = true;
_OrdSer.MsgHeaderValue = msgHeader;
DocumentDocumentLine[] d = new DocumentDocumentLine[1];
d[0] = new DocumentDocumentLine();
d[0].ItemCode = "9786306243753";
d[0].ItemDescription = "abc";
d[0].UnitPrice = 10;
d[0].Quantity = 4;
d[0].SerialNum = "1";
d[0].LineNum = 0;
d[0].BaseLine = 1;
d[0].ItemDetails = "abdc";
d[0].TaxCode = "0";
DocumentDocumentLineSerialNumber[] dl = new DocumentDocumentLineSerialNumber[1];
dl[0] = new DocumentDocumentLineSerialNumber();
dl[0].SystemSerialNumber = 1;
dl[0].BaseLineNumber = 1;
dl[0].BatchID = "01";
d[0].SerialNumbers = dl;
DocumentDocumentLineBatchNumber[] db = new DocumentDocumentLineBatchNumber[1];
db[0] = new DocumentDocumentLineBatchNumber();
db[0].BatchNumber = "01";
db[0].Quantity = 4;
d[0].BatchNumbers = db;
doc.DocumentLines = d;
_OrdSer.Add(doc);
Please Help Me.
thanks.Rob,
1st try to add the same sales order with out coding, with the same values. Add it directly frm the SAP UI, and then check for the result.
I guess the problem is in the posting periods and settings related to it, actually there is one setting that tell if we can post documents with earlier dates, plz check that setting.
Vasu Natari. -
While adding PO "Discount deviates from authorized range [PO-Discount %]"
Hello Experts,
While adding PO I am getting an error "Discount Deviates from Authorised range [Purchase Order - Discount % per document]"
ThanksHi,
When you goto the Administration > System Initialization > Authorisations and General Authorization, there need to select the user on the left and on the right hand footer, there is a field called 'Max. Discount'. Please check what discount percentage is mentioned in that field.
Regards,
Jitin
Business One Forum Team -
Discount deviates from authorized range
Dear Experts,
I am trying to add a GRPO document with 51% discount. But it gives the error message like "Discount deviates from authorized range".
How can check it and where can i find that information.
Thanks,
Suresh YerraHi Suresh,
Under Adminsitration> System Initialization> Authorization> general authorization> slect user who is facing this issue and see whats entered in Max. Discount filed. Check and update. Hope this helps you.
Thanks,
Joseph -
Date deviates from permissible range [journal entry - Document Date]
Hi, i have problem to add journal entry, when i creat journal document last year with:
Posting date: 06-02-09 (this date)
Due date: 06-002-09
and Document date: 20-11-08 (couse the document late to creat at the journal)
kindly, and thx for solution..
Regards,
AniAni,
Take a look at this thread
Re: Delivery Date on Sale Order
Suda -
How to get the numeric value of DocTotal from UI API
When I hit the ADD button I need to get the DocTotal from the UI API !
All I have is the EditText which gives it in string and the problem is to double.Parse it
it's a pain to do it while there is CultureInfo related issue with it.
So It would be wise to get the numeric value directly from the UI API instead of getting the DocTotal by string and trying to convert it. So is there any way to get the numrci value of DocTotal from UI API ?Hello Marc,
Here is a function which considering the Culture Info and always working. You can speed it up by using extending admininfo to global vairables, and loading the values at startup of the addon.
Use the oEditText.value.ToString() to convert into into the doulbe number:
Public Function _string2double(ByVal s As String) As Double
Dim d As Double
' This part is fast, when regional settings equal to sap B1 settings:
Try
d = Convert.ToDouble(s)
d = Math.Round(d, 6)
Return d
Catch
End Try
' Speed up performance: extend CompaneService variables to global variables and query them at addon startup.
Try
Dim nfi As System.Globalization.NumberFormatInfo = System.Globalization.CultureInfo.CurrentCulture.NumberFormat
Dim oCompanyService As SAPbobsCOM.CompanyService = oCompany.GetCompanyService()
Dim oAdminInfo As SAPbobsCOM.AdminInfo = oCompanyService.GetAdminInfo()
Dim sbodsep As String = oAdminInfo.DecimalSeparator
Dim sbotsep As String = oAdminInfo.ThousandsSeparator
If s.IndexOf(Space(1)) > 0 Then
If oAdminInfo.DisplayCurrencyontheRight = BoYesNoEnum.tYES Then
s = s.Substring(0, s.IndexOf(Space(1)))
Else
s = s.Substring(s.IndexOf(Space(1)), s.Length - s.IndexOf(Space(1)))
End If
End If
Dim s1 As String = s.Replace(sbotsep, nfi.NumberGroupSeparator)
s1 = s1.Replace(sbodsep, nfi.NumberDecimalSeparator)
d = Convert.ToDouble(s)
d = Math.Round(d, 6)
Return d
Catch
Return 0
End Try
End Function
Regards,
J.
Edited by: János Nagy on Oct 7, 2009 8:55 AM -
Get numerical values from 2D array of string
Hello!
I start by saying that I have a base knowledge of LabView. I'm using LabView 2011. I'm doing some communications test via Can-Bus protocol. As you can see in pictures of the block diagram and of the front panel that I've attached I'm using "Transmit Receive same Port" LabView example. It works very good but I would need to insert the 8 data bytes that I receive from the server in 8 different numerical variables so that I could use them to make some operations. How can I get numerical values from the 2D array of string that I attached?
Every example that you can provide is important!
Thank you very much!
Attachments:
1.jpg 69 KB
2.jpg 149 KBHi martiflix,
ehm: to unbundle data from a cluster I would use the function Unbundle(ByName)…
When you are new to LabVIEW you should take all the FREE online resources offered by NI on their website!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Creating a sound from an array of numeric values and playing it on speakers
How do I create take a sound I have stored as an array (or could be an arraylist if needed) of numeric values (at the moment as doubles) whiten my program and output it to speakers? I am using blueJ.
for example (0, 0.1, 0.4, 0.8, 0.9, 1, 0.8, 0.6, 0.3, 0.1, etc...) would be a very high frequency sin wave.
Edited by: alan2here on Feb 6, 2008 11:28 AMI stumbled upon this thread with a question somewhat related:
I've recorded a wave file from microphone. But what I would like is an array of numbers in the same way alan said. I'm also working on my own project involving signal processing (i'm trying to do speech recognition).
I can't really find a nice way of getting that array of numbers. I've tried to find out how wave file stores it's data, and directly read from the File object, but i figured there should be an easier way...
I used this code to read the sound:
* SimpleAudioRecorder.java
* This file is part of jsresources.org
* Copyright (c) 1999 - 2003 by Matthias Pfisterer
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
|<--- this code is formatted to fit into 80 columns --->|
import java.io.IOException;
import java.io.File;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.TargetDataLine;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.AudioFileFormat;
public class SimpleAudioRecorder
extends Thread
private TargetDataLine m_line;
private AudioFileFormat.Type m_targetType;
private AudioInputStream m_audioInputStream;
private File m_outputFile;
public SimpleAudioRecorder(TargetDataLine line,
AudioFileFormat.Type targetType,
File file)
m_line = line;
m_audioInputStream = new AudioInputStream(line);
m_targetType = targetType;
m_outputFile = file;
/** Starts the recording.
To accomplish this, (i) the line is started and (ii) the
thread is started.
public void start()
/* Starting the TargetDataLine. It tells the line that
we now want to read data from it. If this method
isn't called, we won't
be able to read data from the line at all.
m_line.start();
/* Starting the thread. This call results in the
method 'run()' (see below) being called. There, the
data is actually read from the line.
super.start();
/** Stops the recording.
Note that stopping the thread explicitely is not necessary. Once
no more data can be read from the TargetDataLine, no more data
be read from our AudioInputStream. And if there is no more
data from the AudioInputStream, the method 'AudioSystem.write()'
(called in 'run()' returns. Returning from 'AudioSystem.write()'
is followed by returning from 'run()', and thus, the thread
is terminated automatically.
It's not a good idea to call this method just 'stop()'
because stop() is a (deprecated) method of the class 'Thread'.
And we don't want to override this method.
public void stopRecording()
m_line.stop();
m_line.close();
/** Main working method.
You may be surprised that here, just 'AudioSystem.write()' is
called. But internally, it works like this: AudioSystem.write()
contains a loop that is trying to read from the passed
AudioInputStream. Since we have a special AudioInputStream
that gets its data from a TargetDataLine, reading from the
AudioInputStream leads to reading from the TargetDataLine. The
data read this way is then written to the passed File. Before
writing of audio data starts, a header is written according
to the desired audio file type. Reading continues untill no
more data can be read from the AudioInputStream. In our case,
this happens if no more data can be read from the TargetDataLine.
This, in turn, happens if the TargetDataLine is stopped or closed
(which implies stopping). (Also see the comment above.) Then,
the file is closed and 'AudioSystem.write()' returns.
public void run()
try
AudioSystem.write(
m_audioInputStream,
m_targetType,
m_outputFile);
catch (IOException e)
e.printStackTrace();
public static void main(String[] args)
if (args.length != 1 || args[0].equals("-h"))
printUsageAndExit();
/* We have made shure that there is only one command line
argument. This is taken as the filename of the soundfile
to store to.
String strFilename = args[0];
File outputFile = new File(strFilename);
/* For simplicity, the audio data format used for recording
is hardcoded here. We use PCM 44.1 kHz, 16 bit signed,
stereo.
AudioFormat audioFormat = new AudioFormat(
AudioFormat.Encoding.PCM_SIGNED,
44100.0F, 16, 2, 4, 44100.0F, false);
/* Now, we are trying to get a TargetDataLine. The
TargetDataLine is used later to read audio data from it.
If requesting the line was successful, we are opening
it (important!).
DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);
TargetDataLine targetDataLine = null;
try
targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
targetDataLine.open(audioFormat);
catch (LineUnavailableException e)
out("unable to get a recording line");
e.printStackTrace();
System.exit(1);
/* Again for simplicity, we've hardcoded the audio file
type, too.
AudioFileFormat.Type targetType = AudioFileFormat.Type.WAVE;
/* Now, we are creating an SimpleAudioRecorder object. It
contains the logic of starting and stopping the
recording, reading audio data from the TargetDataLine
and writing the data to a file.
SimpleAudioRecorder recorder = new SimpleAudioRecorder(
targetDataLine,
targetType,
outputFile);
/* We are waiting for the user to press ENTER to
start the recording. (You might find it
inconvenient if recording starts immediately.)
out("Press ENTER to start the recording.");
try
System.in.read();
catch (IOException e)
e.printStackTrace();
/* Here, the recording is actually started.
recorder.start();
out("Recording...");
/* And now, we are waiting again for the user to press ENTER,
this time to signal that the recording should be stopped.
out("Press ENTER to stop the recording.");
try
System.in.read();
catch (IOException e)
e.printStackTrace();
/* Here, the recording is actually stopped.
recorder.stopRecording();
out("Recording stopped.");
private static void printUsageAndExit()
out("SimpleAudioRecorder: usage:");
out("\tjava SimpleAudioRecorder -h");
out("\tjava SimpleAudioRecorder <audiofile>");
System.exit(0);
private static void out(String strMessage)
System.out.println(strMessage);
}Daniel -
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> -
How to capture the data within the given range of maximum and minimum values ? from csv files
My requirement,
1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
2. Then VI should calcluate the average value for captured data and export it to excel.
This is my requirement can anyone help me on this.
Many thanks in advance
rc_cks
Attachments:
sample_short.csv 2439 KBHi,
Thanks for remnding me. I forgt to attach the VI,
Here I am attaching the VI, what I tried.
From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined by user ), focused only on these columns
Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.
FYI: I tried manually for two instance i.e column H & I. As per H column one steady state values from 7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
More Info on requirement:
--> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture that data range and it has to caculate the average value for that range of data. This is the task I have to complete.
--> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user,
Can anyone help me on this.
If my explanation is not clear, Please let me know.
Many thanks, help mw
rc
Attachments:
VI_rc.vi 25 KB
sample.zip 4166 KB -
Error : CLI0111E Numeric value out of range
Hello:
While extracting data through generic datasources, extraction fails in the source system with the following error message.
Database error text........: "CLI0111E Numeric value out of range.
SQLSTATE=22003 row=1 col=12"
Any idea what does this mean?
ThanksHello:
While extracting data through generic datasources, extraction fails in the source system with the following error message.
Database error text........: "CLI0111E Numeric value out of range.
SQLSTATE=22003 row=1 col=12"
Any idea what does this mean?
Thanks -
Bcp import error numeric value out of range
lo, I have table with columns of type int. I export this table by using bcp:
bcp dbo.int_table out file.dat -q -CRAW -T -S localhost -E .
Now I want to import it to table with columns of type bigint. I use bcp command:
bcp dbo.bigint_table in file.dat -q -CRAW -T -S localhost -E
I get error:
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
i was trying import table by using format file created based on bigint_table by command:
bcp dbo.bigint_table in file.dat -f format_file_bigint.xml -q -CRAW -T -S localhost -E
but i also gets the same errors.
Can I use format file when during export was used -CRAW option????int table:
CREATE TABLE [INT_TABLE](
[ID] [int] IDENTITY(1,1) NOT NULL,
[COL1] [int] NOT NULL,
[COL2] [datetime] NOT NULL,
[COL3] [datetime] NOT NULL,
[COL4] [datetime] NOT NULL,
[COL5] [datetime] NOT NULL,
[COL6] [bit] NOT NULL,
[COL7] [bit] NOT NULL,
[COL8] [numeric(15,2)] NOT NULL,
[COL7] [numeric(15,2)] NOT NULL,
[COL8] [numeric(15,2)] NOT NULL,
[COL9] [int] NOT NULL,
[COL10] [int] NOT NULL,
[COL11] [datetime] NULL
big int table:
CREATE TABLE [BIGINT_TABLE](
[ID] [int] IDENTITY(1,1) NOT NULL,
[COL1] [int] NOT NULL,
[COL2] [datetime] NOT NULL,
[COL3] [datetime] NOT NULL,
[COL4] [datetime] NOT NULL,
[COL5] [datetime] NOT NULL,
[COL6] [bit] NOT NULL,
[COL7] [bit] NOT NULL,
[COL8] [numeric(15,2)] NOT NULL,
[COL7] [numeric(15,2)] NOT NULL,
[COL8] [numeric(15,2)] NOT NULL,
[COL9] [bigint] NOT NULL,
[COL10] [bigint] NOT NULL,
[COL11] [datetime] NULL
The int table was exported by bcp command:
bcp int_table out 'c:\int_table.dat' -q -N -T -C RAW -S localhost
and i try import it by command:
bcp bigint_table in 'c:\int_table.dat' -T -C RAW -q -S localhost -E
then i get this errors:
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Native Client]Numeric value out of range
SQLState = 22003, NativeError = 0 -
JMS Queue XML numeric value out of range
Hi
I have an interface that process the root element of the JMS message.
It is failing on the step Load JMS to XML. The error states: numeric value out of range.
I've analysed the message and determined the exact data item which is 11 digits long.
The JMS model only accomodates for numeric(10,0). I tried changing it, but still get the error.
Any idea what I need to do so that this step will process that data without error?
Cheers
PS ODI 11.1.1.6Hi All, I have one scenario to read the source file . The file delimiter is '|' . The no of pipeline for each line is 17. So if a line containing more than 17 , send an error email. For this first i am printing tota pipeline in ecah line to afile called pipelinecount.txt . Then i will read this file and send each value to while loop /for loop , where it will get > 17 , it will exit the process and send an email. But here in script i am getting error at while line. Could anyone help. #! /bin/kshset -x SOURCE_DIR=/vp01/SrcFilessed 's/[^|]//g' /vp01/SrcFiles/Test.txt | awk '{ print length }'> /vp01/SrcFiles/pipelinecount.txtcd $SOURCE_DIRwhile line in `cat pipelinecount.txt`; do if [ $line -eq 17 ];thenecho "No issue in pipeline"exit 0;fiif [ $line -gt 17 ];thenecho "No of pipelines exceeded the expected. Please verify the source file." | mailx -s "WKFS Load: Failed" [email protected]
-
Numeric Value Out Of Range Error in Callable Statement
I keep getting an error whenever I try and pass in a value greater than 9000 into my stored procedure. The procedure call looks like this:
sSelect = "execute sp_storedproc ?, ?, ?, ?, ?, ?, ?";
CallableStatement call = objConn.prepareCall(sSelect);
call.setString(1, "TEST"); //DB TYPE = VARCHAR
call.setInt(2, 4); // DB TYPE = INTEGER
//*******************PROBLEM LINE***************************
call.setFloat(3,(float) 9001); //DB TYPE = MONEY
call.setInt(4, 25 ); // DB TYPE = INTEGER
call.setFloat(5,(float) 0); // DB TYPE = MONEY
// output parameters
call.setDouble(6, 0);
call.setDouble(7, 0);
call.registerOutParameter(6, Types.DOUBLE);
call.registerOutParameter(7, Types.DOUBLE);
// execute stored procedure
call.execute();
// retrieve value
val1= call.getDouble(6);
val2= call.getDouble(7);
I keep getting a "[Microsoft][ODBC SQL Server Driver]Numeric value out of range." error.
I'm using MS SQL server 2000. The error only occurs when I pass in values > 9000. Since there's no direct mapping between java data types and SQL MONEY data type, I've tried passing every possible type into the procedure with the same result (e.g. float, long, double, int, BigDecimal). If anyone has come across this problem and knows a solution please help!!
Thanks.knows a solution please help!!Modify the stored proc so it takes a varchar. In the stored proc convert the string to the correct type. In java use setString() to pass in the value.
Maybe you are looking for
-
Is it normal to hear my Macbook Pro's fan?
i have a early 2011 MBP , and never really heard the fan until about this past week. Im not very technical but i installed iStat Pro . my CPU is about 41 , the fans are about 1998 rpms, and they stay around that area. Also i dont run a lot of intensi
-
Mapping of Sales Org of CRM and R/3
Hello all, the sales org in CRM are mapped to the sales orgs in R/3 and there is data flow between R/3 and CRM.Where is the mapping done.In CRM, CRMD_ORGMAN contains org data however this is in the CRM number range.How can I find out which sales org
-
I am working on a site and it's home page is done all in flash. From that main flash piece there is a button that once clicked should load an external swf that contains a video clip. That external swf has the transparency turned on. The external swf
-
Posting videos without using Youtube or Vimeo
It is needed to be able to post videos and audio files directly with out going through a third party site like Youtube or Vimeo.
-
Dear all After upgrade from R3 4.6 to ECC6.0, we can't directly create/change catalog in productive system using QS41. After click 'create/change' , the system always pop up the message 'Client xxx has status 'not modifiable'. Experts, cloud you pl