How to convert a string to a currency value ? getting a dump with exception

Hi,
I am getting a exception not caught in CX_SY_CONVERSION_NO_NUMBER.
I am trying to convert a string value with ',' to a currency value.
I tried using Replace and Condense. But the error still persists.
Is there a FM or a casting that I can use?
Cheers
Kiran

Hi,
Sorry I got my question wrong. I have a problem - that when I'm trying to pass a value from a string to a currency field.
But, the currency field is a field symbol.
so, I have
data abc type string.
abc = "5345"
<curr_val> = abc.
now <curr_val> = 0.000
Please suggest.

Similar Messages

  • How to convert a string value to date

    Dear All,
    I am new to powershell script, i was trying to store a Ad user password set date to a variable add, add a number of days to get the expire date.
    but when i try to convert the variable to date value, I am getting the error as below.
    Please help me......
    PS C:\script> $passwordSetDate = (get-aduser user1 -properties * | select PasswordLastSet)
    PS C:\script> $passwordSetDate
    PasswordLastSet
    7/15/2014 8:17:24 PM
    PS C:\script> $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)
    Cannot find an overload for "ParseExact" and the argument count: "3".
    At line:1 char:1
    + $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodException
        + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    PS C:\script> $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)

    Dear All,
    I am new to powershell script, i was trying to store a Ad user password set date to a variable add, add a number of days to get the expire date.
    but when i try to convert the variable to date value, I am getting the error as below.
    Please help me......
    PS C:\script> $passwordSetDate = (get-aduser user1 -properties * | select PasswordLastSet)
    PS C:\script> $passwordSetDate
    PasswordLastSet
    7/15/2014 8:17:24 PM
    PS C:\script> $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)
    Cannot find an overload for "ParseExact" and the argument count: "3".
    At line:1 char:1
    + $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodException
        + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    PS C:\script> $a = [datetime]::ParseExact($passwordSetDate,"MM/dd/yyyy HH:MM:SS", $null)
    In your post you ask how to convert a string value to a date.  The value returned from the Get-AdUser is already a date.  It does not need to be converted.
    Bill has sshown one way to convert a date to a string and there are other methods.  You need to clarify your question.
    If you are really trying ot convert strings to dates then you can start with this:
    [datetime]'01/21/1965 13:33:23'
    Most date strings aer autodetected by the class.
    ¯\_(ツ)_/¯

  • How to convert a String("yyyy-mm-dd") to the same but in Date format ?

    Hi,
    can anyone plz tell me how to convert a String to a date format.I'm using MSACCESS database.I want to store this string in the database.So i need to convert it to a date format since the table is designed such a way with date/time type for date field.I used SimpleDateFormat ,but i can't able to convert.The code is given below:
    coding:
    public String dateconvertion(String strDate)
    try
    SimpleDateFormat sdfSource = new SimpleDateFormat("yyyy-MM-dd");
    Date date = sdfSource.parse(strDate);
    SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd ");
    strDate = sdfDestination.format(date);
    catch(ParseException pe)
    System.out.println("Parse Exception : " + pe);
    return(strDate);
    }

    i used prepared statement even now i am getting error like this.....
    i have included the prepared statement package also...
    my coding:
    ResultSet rsdatetemp = null;
    PreparedStatement ps = null;
    String query ="select distinct itemcode from sales where bill date between ? and ?";
    ps = precon.prepareStatement(query);
    ps.setDate(1,d1);//d1 and d2 are in date format
    ps.setDate(2,d2);
    rsdatetemp = ps.executeQuery();
    error :
    symbol : method setDate(int,java.util.Date)
    location: interface java.sql.PreparedStatement
    ps.setDate(1,d1);
    symbol : method setDate(int,java.util.Date)
    location: interface java.sql.PreparedStatement
    ps.setDate(2,d2);

  • How to convert a String to an Icon

    Hello,
    I'm trying to figure out how to convert a String (specifically one letter) to an Icon for a JTree. The program I am working on uses .png files for the icons at the moment, with each .png being a single uppercase letter. However, recent discussion has us wanting to change to something more dynamic, since we anticipate needing new letters in the near future.
    My task is to modify the current codebase so that the Icons used to identify nodes in the tree are created from a Font within code, rather than reading in .png files. I have done some experimenting with creating a Label with just that String, setting the font and trying to extract the image using calls like createImage(int width, int height) and so on, but so far to no avail.
    If I could figure out how to at least convert the String to an image, I could probably make it work (since I can play around with creating an ImageIcon with that image). Thanks in advance for any help.
    Allan

    Here is some quick and dirty code:
    import java.awt.*;
    import javax.swing.*;
    public class BasicIcon implements Icon {
        private String text;
        public BasicIcon(String text) {
            this.text = text;
        public int getIconWidth() {
            return 16;
        public int getIconHeight() {
            return 16;
        public void paintIcon(Component c, Graphics g,  int x, int y) {
            Color old = g.getColor();
            g.setColor(c.getForeground());
            g.drawString(text, x, y+13);
            g.setColor(old);
        public static void main(String[] args) {
            JPanel cp = new JPanel();
            for (char ch = 'A'; ch < 'F'; ++ch) {
                cp.add(new JButton("letter " + ch, new BasicIcon(String.valueOf(ch))));
            JFrame f = new JFrame("BasicIcon");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(cp);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }One thing that could be improved is the vertical positioning of the letter in the Icon.
    The x,y values passed into paintIcon are the upper-left hand corner of the icon,
    but the y value needed by drawString is the position of the String's baseline.
    To do it right, use one of Font's getLineMetrics methods and play around with ascent.

  • How to convert a string from upper case to lower case in FOX formula

    Hi Experts,
    How to convert a string from upper case to lower case in FOX formula?
    Thanks,
    Cheers!!!
    PANKAJ

    The last result.append( c ) should be:
    result.append( Character.toLowerCase(c) );

  • How to convert a string from lower case to upper case withour using transla

    Hi all,
    how to convert a string from lower case to upper case withour using translate,
    Thanks in Advance,
    Reddy

    Refer to this related thread
    Re: hi guys this very urgent please help

  • How to convert a String to an array

    Can somebody tell me how to convert a String to an array

    ronisto wrote:
    Can somebody tell me how to convert a String to an arrayI assume you mean to convert it into an array of the individual characters that comprise the String.
    Can you not simply look at the API documentation? Nothing in the String API jumps out at you?
    http://java.sun.com/javase/6/docs/api/index.html

  • How to convert my MM alias into an AppleID to use it with iCloud?

    I used MobileMe and created a mail that became my Apple ID. Then I created an alias that became my main e-mail so now with iCloud I wish that aslias could become my Apple ID. I don't care to loose the first Apple ID but "How to convert my MM alias into an AppleID to use it with iCloud?"

    You cannot convert an alias to Apple ID.
    You can transfer your MM to iCloud with your main Apple ID.
    There will be your alias as well.
    Regards

  • XML: How to convert xml string into Node/Document

    I have a string in xml form.
    <name>
    <first/>
    <second/>
    </name>
    I want to convert this string into DOM Node or Document.
    How can I do this?
    Any help or pointer?
    TIA
    Sachin

    Try this :
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(new org.xml.sax.InputSource(new StringReader(strXml)));Hope this helps.

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • Help with how to convert a string to a number ??

    Hi All,
    I am having problem converting a string to number.
    Looks like my to_number function is not working.
    Help is very much appreciated.
    My query is below, and I know my problem is in my inner query.
    I am getting the following error:
    what am I doing wrong ? and how should I fix it.
    If there is a better approach, please share it.
    ORA-01722: invalid number
    01722. 00000 -  "invalid number"
    *Cause:   
    *Action:
    SELECT
        A.OBJECT_NAME,
        A.TIMESTAMP,
        A.SESSION_ID,
        A.REQUISITION_ID,
        TO_DATE(CUT(RR_PACE_FUNCTIONS.NAME(A.REQUISITION_ID),3,'.'),'YYYYMMDD') CSD,
        SUBSTR(SUBSTR(RR_PACE_FUNCTIONS.DESCRIPTION(A.REQUISITION_ID),9),1,30) COURSE_ID,
        A.WEEK_GROUP,
        A.APTITUDE_AREA,
        SUM(NVL(GTEP_ASGN,0)) GTEP_ASGN,
        SUM(NVL(AI_ASGN,0)) AI_ASGN,
        SUM(NVL(GTEP_ASGN,0) + NVL(AI_ASGN,0) ) BMT_ASGN
      FROM
        (SELECT OBJECT_NAME,
          SESSION_ID,
          TIMESTAMP,
          TO_NUMBER(FIELD1) REQUISITION_ID,  -- I believe here is the problem
          TO_NUMBER(FIELD2) WEEK_GROUP,     -- here as well
          SUBSTR(FIELD3,1,80) APTITUDE_AREA,
          TO_NUMBER(FIELD4) GTEP_ASGN,  -- here
          TO_NUMBER(FIELD5) AI_ASGN      -- here
        FROM RR_REPORT_QUEUES
        ) A
      GROUP BY OBJECT_NAME,
        TIMESTAMP,
        SESSION_ID,
        WEEK_GROUP,
        APTITUDE_AREA,
        REQUISITION_ID ;Many Thanks,

    Are you sure Field1, Field2, Field4 and Field5 contain a number information in all rows?
    If there is a non numeric String in your Field<x> columns in any row the error will occor.

  • [Oracle 8i] How to convert a string (time stamp) into a date?

    I'm having difficulty figuring out how to convert a time stamp string into a date (or possibly a number).
    The time stamp is 20 positions, character (NOT NULL, CHAR(20))
    in the format: YYYYMMDDHHMMSSUUUUUU
    where Y = Year, M = Month, D = Day, M = Minutes, S = Seconds, and U = Microseconds
    The reason I want to convert this is so that I can compare one time stamp to another (i.e. I want to be able to find the MIN(timestamp), MAX(timestamp), and do inequality comparisons).
    Is this at all possible?
    Thanks in advance for help on this!

    Hi,
    As Damorgan said, if all you want to do is find which is the earliest or latest, then you can just compare the strings: they happen to be in a format where that works.
    If you need to do other things, such as compare them to today's date, or see the difference between two of your rows in days, then you have to convert them to DATEs. (There's no point in converting them to NUMBERs).
    A new data type, TIMESTAMP, which handles fractions of a second, was introduced in Oracle 9.
    Since you're using Oracle 8 (according to your subject line), you either have to
    (1) ignore the microseconds, or
    (2) use a separate NUMBER column for the microseconds.
    Either way, use TO_DATE to convert the first 14 characters to a DATE:
    TO_DATE ( SUBSTR (txt, 1, 14)
            , 'YYYYMMDDHH24MISS'
            )where txt is your CHAR column.
    To convert the microseconds to a number (between 0 and 999999):
    TO_NUMBER (SUBSTR (txt, 15))

  • How to convert a string

    I have a string "March 2006", that I would like to convert into two dates, one is first date of the month and second is the last date of the month.
    For example:
    String strDate="March 2006"
    Now I want to convert it into two dates:
    03/01/2006 and 03/31/2006 and assign those two dates to two variables.
    I have been trying something like this just to convert string to date but no luck:
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         java.util.Date mydate = new java.util.Date();
         try{
         mydate = sdf.parse("March 2006");
         }catch(ParseException e){}
         System.out.println("Java data object is"+mydate);
    I get following output : Tue Jun 20 10:34:30 CDT 2006

    Thanks for your patience guys. First I am not a java
    expert and just a new bee to Java, and second I guess
    we are going into a different direction here. My
    basic problem is that is there a way to convert
    "March 2006" string to 03/2006? Then once we get
    03/2006, can we find what is the first date ,
    offcourse 01, and what is the last date, which in
    this case is 31?Convert the String to a Date, as you've already been shown how to do
    Use the java.util.Calendar methods to get your last day of the month value (check the javadoc, especially the get method and look at the fields) Post back with any specific questions.
    Good Luck
    Lee
    >
    For example:
    My variable is "March 2006". The end product I want
    is:
    strDate1=03/01/2006
    strDate2=03/31/2006.
    How should I get my end product?
    I can write string manipulation functions to get this
    done,but trying to see if there is an easiest way to
    do this. Thanks.

  • How to convert a string-xml placed  inside an xml tag to xml format.

    I have a invoke activity to invoke Web service(code snippet from bpel) .The text in bold is a string that gets formed based on some condition using concat inside while loop .Before calling the WS i need to convert this string into xml
    Any idea how can we do this ?
    <Invoke_A9WS_createObject_InputVariable>
    <part name="parameters">
    <createObject>
    <request>
    <requests>
    <classIdentifier>10141</classIdentifier>
    <data rowId="0">*<number>C0001</number><description>Component from CDM</description>*</data>
    </requests>
    </request>
    </createObject>
    </part>
    </Invoke_A9WS_createObject_InputVariable>
    Request someone to please help .
    Edited by: 869283 on Jul 14, 2011 4:34 AM

    Thanks Dev for your reply ..I have tried using parsEscapedXML but it gives exception
    Fault ID     default/ProjReverseTransform!1.0*soa_6761b853-f458-4b1a-b9c3-6c060cde9350/transform/210018-BpAss3-BpSeq0.3-3
    Fault Time     Jul 15, 2011 1:23:42 PM
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:parseEscapedXML('&lt;?xml version="1.0"?>&lt;number xmlns:ns2="http://schemas.oracle.com/service/bpel/common&amp;quot;>C0001 &amp;lt;/number>&amp;lt;description xmlns:ns2=&amp;quot;http://schemas.oracle.com/service/bpel/common">Component from CDM &lt;description>'). The XPath expression failed to execute; the reason was: internal xpath error. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>
    I am using the assign activity as below
    <assign name="Assign_BpelVar">
    <copy>
    <from expression="oraext:parseEscapedXML('&lt;?xml version=&quot;1.0&quot;?>&lt;number xmlns:ns2=&quot;http://schemas.oracle.com/service/bpel/common&amp;quot;>C0001 &amp;lt;/number>&amp;lt;description xmlns:ns2=&amp;quot;http://schemas.oracle.com/service/bpel/common&quot;>Component from CDM &lt;description>')"/>
    <to variable="parameterVar"
    query="/ns2:parameters/ns2:item/ns2:value"/>
    </copy>
    </assign>
    I have harcoded the string here so as to check the working othersie this string gets formed inside a while loop and is stored in a variable.
    parameterVar is variable of type
    <variable name="parameterVar" element="ns2:parameters"/>
    XSD for parameterVar
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/service/bpel/common"
    targetNamespace="http://schemas.oracle.com/service/bpel/common"
    elementFormDefault="qualified">
    <xsd:element name="parameters">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="value">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:any minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

  • How to convert a string to hex in TestStand

    Hi everyone, I think this is a fairly easy question to answer but I am newer to TestStand.
    In one step I am pulling in the Serial Number of a Device (which is alpha and numeric characters) and storing it as a String Local called Local.SerialNumberString.  In the following step I need to convert this Local to a Hex value and store it as Locals.SerialNumberHex
    Here is the data representation I need to take place:
    Locals.SerialNumberString = ABC123456
    and would like to know of a function that would convert to the following:
    Locals.SerialNumberHex = 414243313233343536
    How can this be done?
    Thanks so much!

    It looks like what you are asking for is more than just converting to hex, it looks like you want to convert the characters in the string to their ascii value representation and then convert that to hex.
    1) Use a for loop Locals.i = 0; Locals.i < Len(Locals.SerialNumberString); Locals.i++
    2) Inside the loop do: Locals.SerialNumberHex += Str(Asc(Mid(Locals.SerialNumberString, Locals.i, 1)), "%.2x")
    Hope this helps,
    -Doug

Maybe you are looking for

  • Getting error msg while inserting a record

    HI Am getting error msg while am inserting a new record. Am unable to view the data that i inserted in to database. If any one can help in sorting of the problem plz help. I used the following code in Application Module(AM) and Controller(CO) process

  • Valuation of Open Items - US

    SAP Gurus, Valuations of open items are done with update or with out update for US regulations. Could some one suggest what is the valuation approach followed for country US and what is the valuation method? your help is highly appreciated. Thanks, P

  • How to hide Ping in iTunes 10?

    Whatever the heck Ping is, I know I don't need it. Is there any way to hide it from the sidebar?

  • Getting new sizes immediately after calilng setVisible

    How can I get the new sizes after hiding/showing a panel? I have a left and right panels, and a thin vertical bar in between that will alternatively collapse/expand the left panel whenever a user click on it. There's a PDF document in the right panel

  • System errors and replys not posting

    Over the last couple of days I've had several intermittent problems trying to view threads in this forum, mainly shown as System connection errors. Today I've also tried to post a reply in a thread, the submit appears to work (no error message) but m