Convert TYPE string to TYPE p in a UNICODE system

Hi-
I've got a string that contains an amount and I want to convert it into a TYPE p in my program to store as a proper amount in the database.
I can't do a simple move or use FMs like HMRC_AMOUNT_STRING_CONVERT as I am in a Unicode system and it errors if I try these.
How can I do it.
Example.
parameters p_amount type string.
start-of-selection.
data l_amount TYPE p decimals 2.
MOVE p_amount TO l_amount.
=>compile error.

Hi   Tristan.....
IN PARAMETERS we ca have only have predefined data
The data types valid for parameters include The built-in ABAP types c, d, i, n, p, t, and x
You cannot use data type F, references and aggregate types.
But you are using type STRING which is not allowed.
so you are getting a compiler error.
Suresh.....

Similar Messages

  • Cannot implicitly convert type 'Microsoft.SharePoint.SPListItemCollection' to 'System.Collections.Generic.List T '_

    Hi
    I want use SPListItemCollection' to 'System.Collections.Generic.List<T>'.
    How to achieve this.
    Thanks,
    Siva.

    Hi Siva,
    This is how I code it for looping all SPListItem in the SPListItemCollection using Generic List<T>
    public IEnumerable GetEnumerator()
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    var list = web.Lists["Friends"];
    var query = new SPQuery();
    query.Query = "<FieldRef Name='ID'/>";
    IEnumerable items = list.GetItems(query);
    return items;
    Then calling the method would be
    var items = GetEnumerator();
    foreach(SPListItem item in items)
    Response.Write(item["FirstName"]);
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • Unicode: Is it Possible to convert a string, or text, for Output?

    Can you take a string (or text) in Unicode (4 bytes each character),  and by using its string (or text), as input it to a Function Module, or Method, have the string's hex values converted into the old non-unicode value (2 bytes each character) to send to an external system?   
    I wish it were this easy, but am finding out it is not. Seems like whenever I run  a process to convert a field (4 bytes) in the new unicode system, to old non-unicode (2 bytes each), and move it back into a field in the unicode system, it automatically  converts it back to 4 bytes automatically?
    It is causing issues on the external tergat system that is not using unicode.
         Thank-You.

    Not that I know of. But you could convert your text to RAW or XSTRING, and send that value to the external system.
    Jan

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

  • "Property value is not valid" when PropertyGridView tries to convert a string to a custom object type.

    Hi,
    I have a problem with an PropertyGrid enum property that uses a type converter.
    In general it works, but when I double clicking or using the scoll wheel,  an error message appears:
    "Property value is not valid"
    Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
    I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
    Here is the code that causes the error (see line 33):
    (Using the .net symbols from the PropertyGridView.cs file)
    1
            internal bool CommitValue(GridEntry ipeCur, object value) {   
    2
    3
                Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose,  "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");   
    4
    5
                int propCount = ipeCur.ChildCount;  
    6
                bool capture = Edit.HookMouseDown;  
    7
                object originalValue = null;   
    8
    9
                try {   
    10
                    originalValue = ipeCur.PropertyValue;   
    11
    12
                catch {   
    13
                    // if the getter is failing, we still want to let  
    14
                    // the set happen.  
    15
    16
    17
                try {  
    18
                    try {   
    19
                        SetFlag(FlagInPropertySet, true);   
    20
    21
                        //if this propentry is enumerable, then once a value is selected from the editor,   
    22
                        //we'll want to close the drop down (like true/false).  Otherwise, if we're  
    23
                        //working with Anchor for ex., then we should be able to select different values  
    24
                        //from the editor, without having it close every time.  
    25
                        if (ipeCur != null &&   
    26
                            ipeCur.Enumerable) {  
    27
                               CloseDropDown();   
    28
    29
    30
                        try {   
    31
                            Edit.DisableMouseHook = true;  
    32
    /*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/ 
    33
                            ipeCur.PropertyValue = value;   
    34
    35
                        finally {   
    36
                            Edit.DisableMouseHook = false;  
    37
                            Edit.HookMouseDown = capture;   
    38
    39
    40
                    catch (Exception ex) {   
    41
                        SetCommitError(ERROR_THROWN);  
    42
                        ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);  
    43
                        return false;  
    44
    I'm stuck.
    I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
    Thanks in advance,
    Eric

     
    Hi,
    Thank you for your post!  I would suggest posting your question in one of the MS Forums,
     MSDN Forums » Windows Forms » Windows Forms General
     located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
    Have a great day!

  • Convert from String data type to Character data type

    Hi...,
    I'm a beginner. I try to make a program. But I don't know how to convert from string to data type. I try to make a calculator with GUI window. And when somebody put "+" to one of the window, I just want to convert it to Character instead of String.
    Sorry of my bad english..
    Please help me....
    Thanks

    String s = "a+b";
    char theplus = s.charAt(1);

  • Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)

    Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'Microsoft.ReportingServices.DataProcessing.IDataReader'. An explicit conversion exists (are you missing a cast?)
    I am getting the above error in c#. Please help me. Thanks in advance
    public IDataReader ExecuteReader(CommandBehavior behavior)
    string query = "select * from Sales.Store";
    SqlConnection readerconn = new SqlConnection("Data Source=localhost;Initial Catalog=AdventureWorks2000;Integrated Security=SSPI");
    SqlCommand readercmd = new SqlCommand(query);
    try
    readerconn.Open();
    readercmd = readerconn.CreateCommand();
    readercmd.CommandText = query;
    readercmd.CommandType = System.Data.CommandType.Text;
    SqlDataReader TestReader = readercmd.ExecuteReader();
    return TestReader; //Getting error at this line
    readerconn.Close();
    catch (Exception e)
    throw new Exception(e.Message);

    Hi,
    Please firstly take a look at the documentation:
    IDbCommand.ExecuteReader
    Method
    Users do not create an   instance of a
    DataReader   class directly. Instead, they obtain the
    DataReader   through the
    ExecuteReader   method of the Command   object. Therefore, you should mark
    DataReader   constructors as internal.
    You need to use this method to get the IDataReader object, all the IDbCommand and IDataReader are in the Microsoft.ReportingServices.DataProcessing namespace. There's another IDataReader object which is in System.Data namespace, but they're actually two different
    objects, that's why you got the exception.
    For how to properly implement this Microsoft.ReportingServices.DataProcessing.IDataReader, please check this documentation:
    Implementing a DataReader Class for a Data Processing Extension
    It also provides code samples there.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Converting types/reading using java.io.file

    I have an existing method that reads a directory.
    File[] list = dir.listFiles();
    I populate a vector from this file list.
    vector.add(list);
    What I am currently trying to do is populate this vector from another source which happens to be another vector. I am basically replacing reading from a directory to reading from a vector that already has the file list. The problem I am having is that the value that I am populating the receiving vector with, the type needs to be "file".
    The vector that I am reading from contains string values of the filepath+filename
    Thanks.

    So, disregarding all that stuff about Vectors, your question is how to convert a String (of a certain form) to a File object? To answer that you could look in the API documentation for File and check out the available constructors. It appears that you have a pathname already, so the second constructor in the list, "new File(pathname)" is what you want.

  • Convertion To type x  to char field in unicode system......

    Hi all
    please refer the following code .i need to assign type xstructure to single char field where data are .........
    SRTFDHIGH =  xsrtfdhigh
    unicode system gives error to convertion
    DATA: BEGIN OF xsrtfdhigh,
              pernr LIKE pc2b0-pernr,
              restkey1(16) TYPE x VALUE 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
              restkey2(16) TYPE x VALUE 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
            END OF xsrtfdhigh.
       DATA: SRTFDHIGH LIKE PCL2-SRTFD VALUE                   
             '9999999999999999999999999999999999999999'.
    PCL2-SRTFD type char 40.
    pc2b0-pernr  type numc 8.
    is there any solution to convert this .....
    Edited by: Vikram  shirole on Feb 23, 2008 8:52 AM
    Edited by: Vikram  shirole on Feb 23, 2008 8:54 AM

    Read first some documentation like [Character String Processing|http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554d9b3dc11d5993800508b6b8b11/frameset.htm], usually hexadecimal fields contain control characters (line feed, carriage return, tabulations and the like), so use constants of class [CL_ABAP_CHAR_UTILITIES|http://help.sap.com/abapdocu_70/en/ABENCL_ABAP_CHAR_UTILITIES.htm].
    Regards,
    Raymond

  • Problem with smart guides in CS5 with converting type object to outlines.

    Hi There,
    I recently upgraded to Illustrator CS5, and am having some issues with the smart guides.  I create some type with the text tool, then convert that type object to outlines.  Now, when I want another graphical object to "snap" to any of the anchors of the outlined text graphic, the smart guides don't kick in!  The problem does not seem to occurr if I make a standard graphic with other tools, only when I create a graphic from a type object.  I need to be able to snap to graphical objects that are created via the convert type to outlines command.  Has anybody experienced this issue before?  It's kinda frustrating.
    The issue didn't seem to happen in CS3, and I've noticed the design of the smart guides is a bit different in the CS5 version as well.  Am I missing something?
    Any tips would be greatly appreciated.  Thanks!

    When you switched to CS5 did you turn on view >> snap to Point
    If your snapping tolernace is set to a small value, you may need to zoom in more to get snapping to work, or just increase the value. Also make sure you have the appropriate items checked (eg:Anchor Path Labels)
    Edit Preferences >> Smart Guides >> Snapping Tolerance

  • Can't convert type to outlines

    I recently purchased CS5, and find there's a feature I'd like in Illustrator that doesn't appear to work. The option Type>Create Outlines is grayed out. I'm using Mac OS X 10.6. Is this another instance of a feature only available on Windows? Is there another way to convert type to outlines, using LIve Trace or something?
    Thanks
    dh
    [email protected]

    David,
    You may try to close down Illy and press Cmd+Option+Shiftduring stratup, or reversibly Move the folder,
    If that does not help, you may look for interfereing applications, see item 7 in Other options

  • How to solve this Error?? Error_2_Cannot implicitly convert type 'int' to 'int[]'_

    Hi,
    I created a structure. It contains 1& 2 diamensional arrays. Now I want to pass values to these arrays. But at that time I got the following error.
        Error 2 Cannot implicitly convert type 'int' to 'int[]' 
            publicstructtest
              [FieldOffset(160)]
             [MarshalAs(UnmanagedType.ByValArray,
    SizeConst = 3)]
            publicint[]
    DC;
               [FieldOffset(168)]
              [MarshalAs(UnmanagedType.ByValArray,
    SizeConst = 8)]
              publicfloat[]
    IN;
               [FieldOffset(176)]
              [MarshalAs(UnmanagedType.ByValArray,
    SizeConst = 8)]
            publicbyte[,]
    us;
    privatevoidbutton1_Click(objectsender,
    EventArgse)
    //int[] T_ADC = new int[3];
                array[0].DC =12
                array[0].IN[0] = 11;
                array[0].us[0, 0] = 1;

    @DAANNIII
    >>I wrote the code as follows
    array[0].DC[0]
    =12
    but after that I got an error that  " Object reference not set to an instance of an object".Why this type of error occurs??
    Still confused about how you define variable "array[0]".
    Based on your error information, because your DC is null. As I said before, DC is an int[]. You must assign an array to DC.
    int[] array = new int[] { 2, 43 };
    test s = new test();
    s.DC = array;
    s.DC[0] = 12;//It works fine
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • OTT does not convert types that created as TABLE

    I use this SQL script:
    create or replace TYPE REC_5WORDS AS OBJECT
         (WO1_FREQ INT,
    WO1_TEXT VARCHAR2(30),
    WO2_FREQ INT,
    WO2_TEXT VARCHAR2(30),
    WO3_FREQ INT,
    WO3_TEXT VARCHAR2(30),
    WO4_FREQ INT,
    WO4_TEXT VARCHAR2(30),
    WO5_FREQ INT,
    WO5_TEXT VARCHAR2(30)
    create or replace TYPE TAB_5WORDS AS TABLE OF REC_5WORDS
    and when I run OTT Utility I have type REC_5WORDS converted, but it does not convert type TAB_5WORDS.
    What I do wrong?

    I made also what is written in a OCCI Objects White Paper:
    Ref<REC_5WORDS> refRec5Words = new(m_pConnection,"TAB_5WORDS") REC_5WORDS();
    where m_pConnection is declared as oracle::occi::Connection *.
    But I got the compilation error error C2061: syntax error : identifier 'm_pConnection'
    in VC++.NET 2003

  • Converting type to paths- CS3 vs. CS5

    I have CS3, but am now trying out fw CS5, and have a weird issue when converting type to paths.
    Original type:
    Converted to paths on cs3:
    Converted to paths on cs5
    This is just an example, I tried with several different fonts, and they all produce different results, with cs5 always doing a much poorer job. is is because of the new type engine? Can anything be done about it?
    it makes me question upgrading a lot!

    Thanks for the feedback. I had tried your first suggestion to no avail, but had not tried the second. Now that I have, selecting the type only instead of the frame still caused a grad shift when converted. I ended up just re-applying all the gradients, but it would be nice to figure out if this is possible for the future. Appreciate the input, though.

  • Getting "unable to convert type -15 to a numeric type"

    I see below error... i have checked the data types. it all looks good.
    (Wrapped) unable to convert type -15 to a numeric type) unable to convert type -15 to a numeric type
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:88)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.run(PartitionedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    at <process boundary>
    at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
    at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
    at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
    at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:358)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:1)
    at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
    at com.tangosol.coherence.component.net.message.SimpleResponse.read(SimpleResponse.CDB:6)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:42)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:31)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    at <process boundary>
    at (unknown function)(AbstractPofRequest.cpp:189)
    at coherence::lang::TypedHandle<coherence::net::messaging::Response>coherence::component::net::extend::AbstractPofRequest::Status::getResponse()
    at coherence::lang::TypedHandle<coherence::net::messaging::Response>coherence::component::net::extend::AbstractPofRequest::Status::waitForResponse(long long)
    at coherence::lang::TypedHolder<coherence::lang::Object>coherence::component::net::extend::PofChannel::request(coherence::lang::TypedHandle<coherence::net::messaging::Request
    ,long long)at coherence::lang::TypedHolder<coherence::lang::Object>coherence::component::net::extend::PofChannel::request(coherence::lang::TypedHandle<coherence::net::messaging::Request
    )at __1cJcoherenceJcomponentDnetGextendQRemoteNamedCacheLBinaryCacheGinvoke6Mn0AElangLTypedHandle4Ckn0GGObject___n0GLTypedHandle4n0AEutilMInvocableMapOEntryProcessor____n0GLTy
    pedHolder4n0H____
    at __1cJcoherenceEutilUConverterCollectionsVConverterInvocableMapGinvoke6Mn0AElangLTypedHandle4Ckn0EG
    Edited by: LSV on Oct 5, 2012 1:11 AM

    The gateway can't convert datatypes. You need to cast the source column to numeric and then use the view.

Maybe you are looking for

  • Cant mount usb sticks with fat32 ISO-8859-1 2.6.31-ARCH

    when trying to mount my usb sticks from xfce4 desktop(halmount). Following error occurs (as told by dmesg). FAT: IO charset ISO-8859-1 not found First i suspected hal being the culprit but now im not so sure anymore. im using stock 2.6.31-ARCH. when

  • [SOLVED] usb archlinux boot goes black hanging

    Hi I have a thinkpad Edge e330 3354. Currently i have grub2 with ubuntu and win8 dual booting. I want to replace ubuntu with arch. I found out i had UEFI so i followed the instructions to install UEFI version of usb installer. However whenever i boot

  • Automatic determination of header condition in sales document

    Hi Friends,                 How can we make a header condition automatically determined in a sales document ? Regards Mahesh

  • Search for contracts with "ship to party"

    Hi, I am trying to search for contracts with a ship to party. We had a number of contracts input to SAP under one sold to party, now i I am trying to match sites to the contracts. I cannot seem to get a function to be able to search for them with jus

  • Authentication using database in j2ee ri server? URGENT!!

    Hello I have installed j2sdkee1.3.1 and I use the web and ejb server that it includes. I start it with j2ee.bat and I create a application with jsp and ejb, and I use deploytool to deploy it. I don't have problem, but now I would like to use a form-b