Decimal error

Hi guys,
I have an issue where I want to have 2 decimals. But when the input is for example 88.10 then the second decimal will not appear because it is a zero. But whenever the input is for example 88.11 I will get 2 decimals.
Is there any standard function to push out the zero?
Thanks

>>>How should I use FormatNumber?
Your mapping will be : Source -> FormatNumber(From Arithmetic Functions)  -> Target
In Format Number, if you go to properties , it asks for the following two parameters:
1. number format: 00000.00   (here, the default is five characters before decimal and two characters after decimal) you can enter accordingly as per your custom requirement. Eg. if you want two digits before decimal and two digits after decimal, enter 00.00 in Number format. In this way, you will be able to retain 0 in the second place after the decimal.
2. Decimal Separator: .   (Enter a . 'Dot')
I hope this helps.
Regards, Gaurav.

Similar Messages

  • Decimal error in table BSEG.

    Dear experts,
    I will present my problem in a scenario.
    I'm using txc FB70 to make an invoice in currency COP (columbian peso) or MXP (mexican peso).
    When using MXP it works fine, but with COP the amount entry in table BSEG gets divided by 100.
    The reason is that the amount field in bseg is packed with decimal 2 and FB70 automatically adds *.00 on every amount (that does not already have it) entered by me. Thus 150 becomes 150.00. This is fine except in my system the currency COP is not allowed to contain any decimal and therefore, somehow it get stored as 1.50 instead.
    I have tracked what I believe to be the fault to the FM CURRENCY_AMOUNT_IDOC_TO_SAP which returns the value of 1.50 when entering 150 in a currency that do not contain decimals. I also found a note that described this error (69944) but it was posted in 1998 referring to txc MR01, and should be taken care of in following releases.
    So my question is: Is this the way it should be? is my system obsolete (missing updates of some sort)? or is there an alternative way of reading the data from BSEG? for instance a flag that says I need to multiply by 100 in these scenarios. I know it is a long shot, but still I cannot imagine that this is something that only me have encountered.
    Thanks in advance.

    Hi Johan,
    I do not think, that there is something wrong with your definitions. Please, read the following note 126857 and you will see how the system treats these cases storage-wise.
    Regards,
    Eli

  • Currency decimal error

    Hi Team,
    We have created PR in USD and released. We have converted this PR to PO in JPY currency. Net price is displaying without currency decimal in JPY currency. When we display the print preview, system is automatically considering the last two digits as decimal and in table entry also.
    For example, PO total price is 68,323,120 JPY.
    When we see the table (EKPO-NETWR) it is showing the value as 683,231.20 and it is displaying this value in print preview also.
    When we try to maintain the values in SPRO - u201CSet Decimal Places for Currenciesu201D, it is displaying the warning message as u201CIn a productive system, you must not delete the currencies in use or change the decimal places. This could make amounts in documents already posted incorrect or invalidu201D.
    Pl let me know the further process for this issue.
    Thanks & Regards
    R.Saravanan
    09582188409

    JPY does not have decimals. However, as the value field is a decimal field SAP stores the value with decimals in the tables.
    But SAP knows that it has to use a certain function module to get it right before the value is shown to the user, e.g. inME23N.
    The form, is more or less customized to your companies need, If it is shown with decimals in your form, then contact your developer to fix this problem in the form.

  • Decimal Error: Input must be in the format ___,___,__~.__V

    Hi Gurus,
    We have manual pricing in sales order. When i enter the price say, 0.405 USD/KG for a  material..sytem throwing an error msg..
    Input must be in the format ___,___,__~.__V
    I have maintained SU01, OY04, CUNI settings properly..and system allows me to enter 0.40 but not 0.405..
    Help me out to resolve this error..
    Thanks& Reg
    JJ

    If I am correct, in oy04, we can see USDN only and not USD.  Since I dont have access to SAP right now, not sure whether my understanding is correct.
    Nevertheless, you can maintain 4.05 USD /  10KG so that the net value will flow exactly in sale order / billing.
    thanks
    G. Lakshmipathi

  • Exchange rate table Decimal error

    Dear All,
    In my multi currency classic application I have created exchange rate table in that against Euro the value for 1 Madagascar Ariary is 0.000358720 ; but when I enter this value in exchange rate table it shows "-3.59E-4".
    It affects the conversion value in application when I see the consolidated currency in Euro. Pls post the solution to rectify this issues.
    Thanks,
    Kamal

    Hi,
    could you pls. check if the values are displayed/stored correctly in your planning repository (table: hsp_fx_rates). If no, you should change your database settings, if yes one solution could be to change the regional and language settings on the planning server for the user who starts the planning service.
    Kind regards
    André

  • Getting Error while creating Calculation view.

    Hi Expert,
    I was trying to create one simple calculation view using SQL script but getting below error.
    /********* Begin Procedure Script ************/
    BEGIN
    create type var_out1 as table (ebeln varchar(10),menge decimal);
            var_out  = CE_COLUMN_TABLE ("SAPEH2"."EKKO",[EBELN,AEDAT] );
            var_out1 = CE_COLUMN_TABLE ("SAPEH2"."EKPO",[EBELN,MENGE] );
            var_out2 - CE_UNION_ALL (:var_out1,:var_out2);
    END
    /********* End Procedure Script ************/
    I thought , i might need to declare a table type for output table var_out1 and var_out2. I tried by declaring table like below couldn't get any success.
    create type var_out1 as table (ebeln varchar(10),menge decimal);
    create type var_out2 as table (ebeln varchar(10), aedat DATE ,menge decimal);
    error:
    Message :
         Internal deployment of object failed;Repository: Encountered an error in repository runtime extension;Internal Error:Deploy Calculation View: SQL: sql syntax error: CREATE TYPE is not allowed in SQLScript: line 5 col 2 (at pos 277)nSet Schema DDL statement: set schema "SAPEH2"nType DDL: create type "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc/tabletype/VAR_OUT" as table ("EBELN" VARCHAR(10), "AEDAT" DATE, "MENGE" DECIMAL(13,3))nProcedure DDL: create procedure "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc" ( OUT var_out "_SYS_BIC"."pkg-sapuser03.test_giri/CA_SALES1/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as  n /********* Begin Procedure Script ***********/ n BEGIN n n create type var_out1 as table (ebeln varchar(10),menge decimal);n create type var_out2 as table (ebeln varchar(10), aedat DATE ,menge decimal);n n t   var_out  = CE_COLUMN_TABLE ("SAPEH2"."EKKO",[EBELN,AEDAT] );n t   var_out1 = CE_COLUMN_TABLE ("SAPEH2"."EKPO",[EBELN,MENGE] );n t   var_out2 - CE_UNION_ALL (:var_out1,:var_out2);nnEND /******** End Procedure Script ************/n
    Could you please help me to understand the cause of this?
    Thanks,
    Girdhari

    Hi Lars,
    Thanks for the reply.
    If i understood correctly , you are suggesting to create var_out1 and var_out2 in output ? If yes can you please guide me on how to do that? I tried but did not find anything suitable to declare table.
    Thanks,
    Girdhari

  • LDAP: error code (s) library ???

    Where will I get the list of all LDAP errors and the explanation about the error. Any document OR webpage is available with such list ???
    Example: Assume I got a error, "[LDAP: error code 65 - Object Class Violation]", where will I check for the exact explanation about this error.
    Please help...

    Hi Guy's
    Here you go,
    Code
    (decimal) Error code (string) Description
    0 LDAP_SUCCESS Success
    1 LDAP_OPERATIONS_ERROR Operations error
    2 LDAP_PROTOCOL_ERROR Protocol error
    3 LDAP_TIMELIMIT_EXCEEDED Timelimit exceeded
    4 LDAP_SIZELIMIT_EXCEEDED Sizelimit exceeded
    5 LDAP_COMPARE_FALSE Compare false
    6 LDAP_COMPARE_TRUE Compare true
    7 LDAP_STRONG_AUTH_NOT_SUPPORTED Strong authentication not supported
    8 LDAP_STRONG_AUTH_REQUIRED Strong authentication required
    9 LDAP_PARTIAL_RESULTS Partial results
    16 LDAP_NO_SUCH_ATTRIBUTE No such attribute
    17 LDAP_UNDEFINED_TYPE Undefined attribute type
    18 LDAP_INAPPROPRIATE_MATCHING Inappropriate matching
    19 LDAP_CONSTRAINT_VIOLATION Constraint violation
    20 LDAP_TYPE_OR_VALUE_EXISTS Type or value exists
    21 LDAP_INVALID_SYNTAX Invalid syntax
    32 LDAP_NO_SUCH_OBJECT No such object
    33 LDAP_ALIAS_PROBLEM Alias problem
    34 LDAP_INVALID_DN_SYNTAX Invalid DN syntax
    35 LDAP_IS_LEAF Object is a leaf
    36 LDAP_ALIAS_DEREF_PROBLEM Alias dereferencing problem
    48 LDAP_INAPPROPRIATE_AUTH Inappropriate authentication
    49 LDAP_INVALID_CREDENTIALS Invalid credentials
    50 LDAP_INSUFFICIENT_ACCESS Insufficient access
    51 LDAP_BUSY DSA is busy
    52 LDAP_UNAVAILABLE DSA is unavailable
    53 LDAP_UNWILLING_TO_PERFORM DSA is unwilling to perform
    54 LDAP_LOOP_DETECT Loop detected
    64 LDAP_NAMING_VIOLATION Naming violation
    65 LDAP_OBJECT_CLASS_VIOLATION Object class violation
    66 LDAP_NOT_ALLOWED_ON_NONLEAF Operation not allowed on nonleaf
    67 LDAP_NOT_ALLOWED_ON_RDN Operation not allowed on RDN
    68 LDAP_ALREADY_EXISTS Already exists
    69 LDAP_NO_OBJECT_CLASS_MODS Cannot modify object class
    70 LDAP_RESULTS_TOO_LARGE Results too large
    80 LDAP_OTHER Unknown error
    81 LDAP_SERVER_DOWN Can't contact LDAP server
    82 LDAP_LOCAL_ERROR Local error
    83 LDAP_ENCODING_ERROR Encoding error
    84 LDAP_DECODING_ERROR Decoding error
    85 LDAP_TIMEOUT Timed out
    86 LDAP_AUTH_UNKNOWN Unknown authentication method
    87 LDAP_FILTER_ERROR Bad search filter
    88 LDAP_USER_CANCELLED User cancelled operation
    89 LDAP_PARAM_ERROR Bad parameter to an ldap routine
    90 LDAP_NO_MEMORY Out of memory
    questions please contact me @ [email protected]
    Thanks
    srinivasa

  • During Load Configuation datatype mismatch - invalid type "mdex:decimal"

    The DB Column SET_ID type is NUMBER(15).When we generate the meta data the type is shown as decimal. So we uploaded PDR Config data as mdex:decimal.
    When we do a load configuration it fails with the following error message,
    ERROR [WatchDog] - Graph execution finished with error
    ERROR [WatchDog] - Node WEB_SERVICE_CLIENT3 finished with status: ERROR caused by: Error applying updates: Record put for property "SET_ID" has invalid type "mdex:decimal"
    ERROR [WatchDog] - Node WEB_SERVICE_CLIENT3 error details:
    org.apache.axis2.AxisFault: Error applying updates: Record put for property "SET_ID" has invalid type "mdex:decimal"
    at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:451)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    We tried changing it to number and it dint work.Please help.
    Thanks,
    Indhu

    Indhu,
    Datatype configuration exists in 2 places. Once a PDR has been created the Integrator datatype will be ignored.
    1: Integrator (Use Decimal)
    2. Endeca Server (Create your PDR as mdex:double)
    - Ryan

  • Invoice Verification process with multiple payments

    Please advise us on the Invoice Verification process in case of multiple payments required  for single Quantity Purchase Order Lines. [ i.e. If the quantity of Purchase is 1 and we need to process  multiple invoices involving partial amount of the PO value, we end up in decimal errors in many cases. ]
    For e.g. we had a case were the Total PO amount was 7638, against quantity 1. A partial invoice was raised for amount  7545. We were unable to determine the exact quantity in the invoice document to derive the said amount. This was due to the limitation in the quantity field which is only supporting 3 decimals. Subsequent to this, we need to round off and also this caused problems in the next payment lot. The issue becomes more complicated when there is header discount , freight etc. specified in the PO  Header Conditions.
    This resulted in the discrepancy between Goods Receipt and Invoice Receipt Amounts for such POs.
    Please throw us some light to tackle this issue as per the best practices available in SAP.
    Also in this relation, Is it possible to enforce Quantity Tolerance in PO.

    HI,
    What you can do to over come such problem, is Put the Value Figure in Quantity field & Quantity in Net price field,
    As the Qty is 1, The total Amount paid to vendor will be same & no Need of calculating decimal.
    While making GRN, Put the actual Invoice value as qty.
    Hope this serves the purpose.
    Regards
    Mascot

  • Plz help me out in modelling the scenario

    Hi Guys
    I have a requirement where in  i  am pulling data from table KNVP...this table has  info-objects customer and some thing called as PDP days...i.e the days in which the customer will be serviced...01,02,03....are the days say monday,tuesday,wednesday etc...
    Actually for this i have first created the data source and the mapped it to  a DSO for the one which captures the PDP day i have created it as a characteristic with CHAR and 30...
    now when i map the data source to the DSO it is throwing an error saying it is a hexa decimal error,since the days are separated by comma this is throwing an error..
    so where should we write a code in order to handle that and also filter the list of customers who has only PDP days mentioned and load it to DSO..
    when we write the code do we write it in the Start routine or on that particular object rule details..
    i asked the ABAper to write the code to handle it but he says he is not able to pass the value from the start routine to that particular obkect routine...
    can any one please tell me a solution for this..
    Regards
    Shilpa

    Hi there,
    Having that string in a mapping of DSO when DSO will process the SIDs it doesn't like that string and therefore throws an error.
    You could for example transform that field in for example start routine or customer exit R/3 side, like for example split string with commas, and concatenate everything like this: 01,02,03 should retrieve 010203.
    Other option is to first create master data texts datasource for that field PDP and for each key retrieves a string, like this for example:
    010203 - text 01,02,03, or text MDTDWD
    than when you fill the DSO with that field aready fixed in the form 010203, you can in the query represent it with text, it should represent in the form 01,02,03 or MDTDWD, see the picture?
    You can do this kind of fixing of the filed 01,02,03 or in the start routine, or the transfer structure.
    And to only get those records with the field being there, just write in the start routine something like:
    DELETE <SOURCE_PACKAGE> where your_field is initial.
    Hope this helps,
    Diogo.

  • PO Price issue

    Hi
    I am facing following issue:
    My company code currency is USD.
    When I am creating a PO on Vendor (Order currency= INR) and Gross price = 10 INR , The price appearing in ME23N and In table EKPO is same ...i.e. 10 INR.
    But when I am creating a PO on Vendor (Order currency= UF) and Gross price = 10 UF , The price appearing in ME23N and In table EKPO is not same ...Price in ME23N is 10 UFand Price in Table EKPO is 100 UF (original price multipled by 10)......
    Can ypu please letme know why it is happening?
    Regards
    Ravi

    UF is a currency without decimals, because of this and the fact that the EKPO price field is with decimals, SAP uses its own logic to store the value in this field.
    check this thread:
    Re: Currency decimal error
    There is an OSS note about JPY currrency where SAP explains in detail  the background.

  • Planning form , column formula not adding correctly.

    Hi all,
    I have a small issue with a planning form. I have two columns
    Column1 - Decendants of Units
    Column2 - Formula column, sum of col1 (sum of units)
    Figures are entered as percentages. I have a validation rule for Column 2 such that if the sum isn't 1 (adding percentages so it's 1 and not 100) then cell colour should be red.
    Issue appears if I enter .1 for 10 units, I get an error and for some reason the value of column 2 is .9999999999999 instead of 1.
    If I enter .5 for two units, it's fine.
    If I enter .5 , .3, .1,.1 it's fine
    If I enter .3,.3,.3,.1, it's fine
    If I enter .1,.1,.1,.1,.1,.1,.1,.1,.1,.2 the result is 1.1 which is correct.
    Not sure why is this issue happening.
    Screnshot: http://i44.tinypic.com/2nk5mz8.png
    Any input would be helpful.
    Using 11.1.2.1, accessing Planning via workspace.
    Edited by: N13 on Jun 7, 2013 6:09 AM

    Hi
    I had logged something similar on here a little while back.
    Webform "Validation" column issue
    Something to do with 'floating point decimal errors'.....I realise this doesnt help much as the solution was the same, but it might give you a place to start if you wanted to embark on the tiresome odyssey of Googling.
    JB

  • Connection closed but i open it why?

    my code:
    GetRecordsByPaging_v4(.......)
    OracleCommand CalPgCountRdCount=null;
    OracleCommand GetRecordFromPage=null;
    try
    common.ErrorLog("before " + orlConn.State.ToString());
    if (orlConn.State != ConnectionState.Open)
    orlConn.Open();
    common.ErrorLog("after " + orlConn.State.ToString() + "\r\n");
    CalPgCountRdCount = new OracleCommand();
    CalPgCountRdCount.CommandText = "Records.CalPgCountRdCount_v3";
    CalPgCountRdCount.CommandType = CommandType.StoredProcedure;
    CalPgCountRdCount.Connection = orlConn;
    CalPgCountRdCount.ExecuteNonQuery(); //here get error:
    my error:
    stack error: 在 Oracle.DataAccess.Types.OracleRefCursor..ctor(OracleConnection con, IntPtr opsSqlCtx, OpoSqlValCtx* pOpoSqlValCtx, Int32 freeOpsSqlCtx)
    在 Oracle.DataAccess.Types.OracleRefCursor..ctor(OracleConnection con, IntPtr opsSqlCtx, OpoSqlValCtx* pOpoSqlValCtx)
    在 Oracle.DataAccess.Client.OracleParameter.PostBind_RefCursor(OracleConnection conn, OpoSqlValCtx* pOpoSqlValCtx)
    在 Oracle.DataAccess.Client.OracleParameter.PostBind(OracleConnection conn, OpoSqlValCtx* pOpoSqlValCtx, Int32 arraySize)
    在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
    在 Oracle.DataAccess.Client.OracleCommand.ExecuteReader()
    在 EC168CH.OracleDAL.DataPaging.GetRecordsByPaging_v4(String strTableName, String strFiledName, String strWhereFiliter, Decimal
    error message is : 必须打开连接才能执行此操作( the connection must be open before this operation)
    i install ODAC1020221.exe on my server windows 2003 for oracle 10.2 ,i use asp.net 2.0

    here is all the code of c#
    public DataTable GetRecordsByPaging_v4(string strTableName,
    string strFiledName,
    string strWhereFiliter,
    decimal decPageSize,
    decimal decPageIndex,
    decimal decOrderType,
    out decimal decRecordCount,
    out decimal decPageCount)
    decRecordCount = 0;
    decPageCount = 0;
    orlConn = new OracleConnection(common.ConnStr());
    DataTable dtData = new DataTable();
    OracleCommand CalPgCountRdCount=null;
    OracleCommand GetRecordFromPage=null;
    OracleConnection orlConn_ora = new OracleConnection(common.ConnStr());
    try
    common.ErrorLog("before " + orlConn.State.ToString());
    if (orlConn.State != ConnectionState.Open)
    orlConn.Open();
    common.ErrorLog("after " + orlConn.State.ToString() + "\r\n");
    orlConn_ora.Open();
    CalPgCountRdCount = new OracleCommand();
    CalPgCountRdCount.CommandText = "Records.CalPgCountRdCount_v3";
    CalPgCountRdCount.CommandType = CommandType.StoredProcedure;
    CalPgCountRdCount.Connection = orlConn;
    //2
    CalPgCountRdCount.Parameters.Add("PageCount", OracleDbType.Decimal);
    CalPgCountRdCount.Parameters[0].Direction = ParameterDirection.Output;
    //3
    CalPgCountRdCount.Parameters.Add("RecordCount", OracleDbType.Decimal);
    CalPgCountRdCount.Parameters[1].Direction = ParameterDirection.Output;
    //4
    CalPgCountRdCount.Parameters.Add("tblName", OracleDbType.Varchar2);
    CalPgCountRdCount.Parameters[2].Direction = ParameterDirection.Input;
    CalPgCountRdCount.Parameters.Add("strWhere", OracleDbType.Varchar2);
    CalPgCountRdCount.Parameters[3].Direction = ParameterDirection.Input;
    //7
    CalPgCountRdCount.Parameters.Add("PageSize", OracleDbType.Decimal);
    CalPgCountRdCount.Parameters[4].Direction = ParameterDirection.Input;
    CalPgCountRdCount.Parameters["tblName"].Value = strTableName.Trim();
    CalPgCountRdCount.Parameters["strWhere"].Value = strWhereFiliter.Trim();
    CalPgCountRdCount.Parameters["PageSize"].Value = decPageSize;
    GetRecordFromPage = new OracleCommand();
    GetRecordFromPage.CommandText = "Records.GetRecordFromPage_v3";
    GetRecordFromPage.CommandType = CommandType.StoredProcedure;
    GetRecordFromPage.Connection = orlConn_ora;
    //1
    GetRecordFromPage.Parameters.Add("ref_cursor", OracleDbType.RefCursor);
    GetRecordFromPage.Parameters[0].Direction = ParameterDirection.Output;
    GetRecordFromPage.Parameters.Add("tblName", OracleDbType.Varchar2);
    GetRecordFromPage.Parameters[1].Direction = ParameterDirection.Input;
    //5
    GetRecordFromPage.Parameters.Add("fldName", OracleDbType.Varchar2);
    GetRecordFromPage.Parameters[2].Direction = ParameterDirection.Input;
    //6
    GetRecordFromPage.Parameters.Add("strWhere", OracleDbType.Varchar2);
    GetRecordFromPage.Parameters[3].Direction = ParameterDirection.Input;
    //7
    GetRecordFromPage.Parameters.Add("PageSize", OracleDbType.Decimal);
    GetRecordFromPage.Parameters[4].Direction = ParameterDirection.Input;
    //8
    GetRecordFromPage.Parameters.Add("PageIndex", OracleDbType.Decimal);
    GetRecordFromPage.Parameters[5].Direction = ParameterDirection.Input;
    //9
    GetRecordFromPage.Parameters.Add("OrderType", OracleDbType.Decimal);
    GetRecordFromPage.Parameters[6].Direction = ParameterDirection.Input;
    GetRecordFromPage.Parameters["tblName"].Value = strTableName.Trim();
    GetRecordFromPage.Parameters["fldName"].Value = strFiledName.Trim();
    GetRecordFromPage.Parameters["strWhere"].Value = strWhereFiliter.Trim();
    GetRecordFromPage.Parameters["PageSize"].Value = decPageSize;
    GetRecordFromPage.Parameters["PageIndex"].Value = decPageIndex;
    GetRecordFromPage.Parameters["OrderType"].Value = decOrderType;
    CalPgCountRdCount.ExecuteNonQuery();
    decRecordCount = Convert.ToDecimal(CalPgCountRdCount.Parameters["RecordCount"].Value.ToString());
    decPageCount = Convert.ToDecimal(CalPgCountRdCount.Parameters["PageCount"].Value.ToString());
    if (decRecordCount > 0 && decPageCount > 0)
    OracleDataReader drData = GetRecordFromPage.ExecuteReader();
    dtData.Load(drData);
    catch (Exception err)
    string errString = "分页错误:";
    if (err.StackTrace != null)
    errString += "\r\n错误堆栈:" + err.StackTrace.ToString();
    if (err.InnerException != null)
    errString += "。\r\n内部错误:" + err.InnerException.Message;
    if (err.InnerException.StackTrace != null)
    errString += "\r\n内部错误堆栈:" + err.InnerException.StackTrace.ToString();
    if (err != null)
    string rows = "null";
    if (dtData != null)
    rows = dtData.Rows.Count.ToString();
    Exception er = new Exception(errString + "\r\n" + err.Message + "|| exterl:" + rows + " ;\r\nUrl:" + HttpContext.Current.Request.Url.AbsoluteUri + " \r\nstrTableName:" + strTableName + "\r\nstrFiledName:" + strFiledName + "\r\nstrWhereFiliter:" + strWhereFiliter + "\r\ndecPageSize" + decPageSize + "\r\ndecPageIndex:" + decPageIndex + "\r\ndecOrderType:" + decOrderType);
    common.ErrorLog(er);
    else
    Exception er = new Exception("error is null");
    common.ErrorLog(er);
    finally
    GetRecordFromPage.Dispose();
    CalPgCountRdCount.Dispose();
    orlConn.Close();
    orlConn.Dispose();
    orlConn1.Close();
    orlConn1.Dispose();
    return dtData;
    }

  • Error in running a function to convert coordinates in degrees to decimal for EXCEL VBA

    For your information, I have 3 cross-posts regarding this question - and all I can said there is still no firm solution regarding this error.
    1) http://stackoverflow.com/questions/27634586/error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-exc/27637367#27637367
    2) http://www.mrexcel.com/forum/excel-questions/826099-error-running-function-convert-coordinates-degrees-decimal-excel-visual-basic-applications.html#post4030377 
    3) http://www.excelguru.ca/forums/showthread.php?3909-Error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-EXCEL-VB&p=16507#post16507
    and the story of the error is as below:
    Currently I am working on VBA excel to create a widget to verify coordinates whether it lies under the radius of ANOTHER predefined and pre-specified sets of coordinates.
    In the module, I want to convert the coordinates from degrees to decimal before doing the calculation - as the formula of the calculation only allow the decimal form of coordinates.
    However, each and every time I want to run the macros this error (Run-time error '5', invalid procedure call or argument) will appear. Then, the debug button will bring me to below line of coding:
    degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
    For your information, the full function is as below:
    Function Convert_Decimal(Degree_Deg As String) As Double
    'source: http://support.microsoft.com/kb/213449
    Dim degrees As Double
    Dim minutes As Double
    Dim seconds As Double
    Degree_Deg = Replace(Degree_Deg, "~", "°")
    degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
    minutes = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "°") + 2, _
    InStr(1, Degree_Deg, "'") - InStr(1, Degree_Deg, "°") - 2)) / 60
    seconds = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "'") + _
    2, Len(Degree_Deg) - InStr(1, Degree_Deg, "'") - 2)) / 3600
    Convert_Decimal = degrees + minutes + seconds
    End Function
    Thank you.
    Your kind assistance and attention in this matter are highly appreciated.
    Regards,
    Nina.

    You didn't give an example of your input string but try the following
    Sub test()
    Dim s As String
    s = "180° 30' 30.5""""" ' double quote for seconds
    Debug.Print Deg2Dec(s) ' 180.508472222222
    End Sub
    Function Deg2Dec(sAngle As String) As Double
    Dim mid1 As Long
    Dim mid2 As Long
    Dim degrees As Long
    Dim minutes As Long
    Dim seconds As Double ' or Long if only integer seconds
    sAngle = Replace(sAngle, " ", "")
    mid1 = InStr(sAngle, "°")
    mid2 = InStr(sAngle, "'")
    degrees = CLng(Left$(sAngle, mid1 - 1))
    minutes = CLng(Mid$(sAngle, mid1 + 1, mid2 - mid1 - 1))
    seconds = Val(Mid$(sAngle, mid2 + 1, 10)) ' change 10 to 2 if only integer seconds
    Deg2Dec = degrees + minutes / 60 + seconds / 3600
    End Function
    As written the function assumes values for each of deg/min/sec are included with unit indicators as given. Adapt for your needs.
    In passing, for any work with trig functions you will probably need to convert the degrees to radians.

  • Error while updating decimal places in general settings

    Hii All
             I have got an error while updating Decimal places in General Settings
    Cannot update while another user is connected to the company i have checked, there is no other user logged in, i could add other settings but the problem is only with Decimal Places
    Note : there are no postings yet, a fresh database for a new client
             what could be the possible reason
                                                                 thanks
                                                                         RIYAZ

    Hiii All
          As a forum rule, i have initially gone through with the existing threads and then i was force to post a thread,
              would be helpfull if there is any other way..
                                                Thanks
                                                         RIYAZ

Maybe you are looking for