Simple Type Enumeration Problem

Hi,
i have one simple type with an enumeration in a dictionary DC. I use this Simple Type in a WebDynpro Screen for Dropdown Value Help.
There were some values before and it worked very well. After that I have added one more value with key 40.
I can see the new value in the dropdown. If I choose this value and click on "OK" I get this error from the screen:
java.lang.IllegalArgumentException: Value '40' of type ... fails validation check: enumeration="10, 20, 30"
I tried the following:
- Reload / Rebuild DC's
- Delete the simpleType and create it new with new public part and new dependency to WD
- Complete Undeploy and new deployment of all components
I still get the same error.  Also when I'm changing the new value I get this error.
Any suggestions?
Thanks in advance
BR, Timo

HI,
Please try following, I hope it would be helpful
1. Close the Dc, go to Navigator and right click on the project and Refresh.
          Try to Delpoy and check
2. Close NWDS, start again and deploy again.
     This may sound weird.. but this has sometimes managed to remove error like these for me
Regards,
Aditya Deshpande

Similar Messages

  • Need example for code use with Simple Type Enumeration

    Hello,
    I've created a Simple Type Enumeration in my Web DynPro Project's Local Directory.
    I see that there is an option there to generate a class representation of this Enumeration. Can someone please show me an example code of how to use this Class. For example, to go over the Enumeration and get all the values?

    hi Roy,
    Try this.
    Iterator chk =
    wdContext.nodeB().getNodeInfo().getAttribute("val").getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet().entrySet().iterator();
    I will check it and tel u in some time...
    Regards
    Bharathwaj
    Message was edited by: Bharathwaj R

  • Simple type enumeration access

    Hello colleagues,
    while creating a data dictionary type, you can define an enumeration with keys and description texts. Additionally you can let the WD generator to create the class representation for this enumeration. So you can use it in your code.
    The generated enumeration only provides the key constant value (enum.getName()) but doesn't bring the description text. Is there any "official way" to read it in code providing certain locale?
    I know, you can create a context attribute of this simple type and go for the following expression:
    wdContext.nodeTableLine().getNodeInfo().getAttribute("attr").getSimpleType().getSVServices().getModifiableSimpleValueSet()
    but I can't imagine the WD doesn't provide any context independent way for this simple operation.
    Regards
    Dimitri

    Hi
    I donu2019t want to populate the list of the enumeration. The list is defined at design time. I just want to read key descriptions of the enumeration programmatically and I donu2019t want to use the context for that.
    To your comment: if you use an input field with an enumerated data dictionary type, only the key of the enumeration will be shown in the field.
    Regards
    Dimitri

  • How do I get enumeration description from simple type?

    Hello!
    I want to display the value of a simple type in a table and display the description in a tool tip for the cell, how do I do that?
    I'm using Web dynpro for java 7.0 ehp1.
    I'm using an enumeration with 5 possible values with corresponding descriptions.
    If I use a (read only) dropdownByKey the description is shown in the drop down, but I only want to show it as a tooltip since it takes up some screen space.
    I would like to use a textview, is there a simple way to get the description as a tooltip? I thought about doing a calculated attribute that gets the description but I'm not sure about how to do it or if its the easiest way.
    Thank you for any help!

    Hi Richard,
    for getting the description of the simple type attribute ( Ex.X) create a context attribute of type string (Ex. Y) and bind it to the tooltip property of table cell editor.
    Set the read only and calculated property of the attribute Y to true.
    Put this code in the automatic generated method for calculated attribute :-
    String value1 = nodeElement.getX;
    IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("X");
    ISimpleValueSet valueset = attInfo.getModifiableSimpleType().getSVServices().getValues();
    if(valueset.containsKey(value1)){
    String value2 = valueset.getText(value1);
    wdContext.node<NodeName>.setY(value2);
    By this way you can set the description of the simple type as tooltip but by using dropdown by key and index you cannot  show the valueof the simple type in the UI.
    So another way is bind the simple type attribute to a inputfield uielement in the table column.  Your simple type enumeration data will come as a F4 help in the UI and after selection you will be able to see value in inputt field and description as a tooltip.
    Regards
    Ravindra

  • Is it possible to edit Simple Type enum imported with a model?

    I have a Simple Type enum which has been created from a model. Is it possible for me to edit the list in Web Dynpro as the 'Add' / 'Edit' button are greyed out?

    Hi Adams
    It is not possible to edit Simple Type enumeration imported from model.
    if you want to use your own values under the list create your own SVS and pass those values to the model
    Best Regards
    Chaitanya.A

  • Create at run-time enumeration of a Dictionary simple type - String

    How can I change dynamically (at run-time) the enumeration of a Dictionary simple type (String) ?

    This reference explains how to set values for a simple type.
    http://help.sap.com/saphelp_nw04/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm
    Cindy

  • Get an enumeration value (not a description) of Simple type

    Hi,all
    How can I get an enumeration value (not a description) of Simple type that I have created?
    Regards,
    Michael

    Michael-
    Here is how you do it:
    1. Create an attribute of the Simple Type you have created in your controller context.
    2. Insert a DropDownByKey in your view.
    3. Create a data binding between the attribute and the selectedKey property of the drop down list.
    4. To get the key of the selected value use the following code in your controller:
    String key = wdContext.currentContextElement().get_AttributeName_();
    Where AttributeName is the name of the attribute you have created in step 1.
    Cheers-
    Atul

  • Get an enumeration value of Simple type

    Hi,all
    How can I get an enumeration value (not a description) of Simple type that I have created?
    Regards,
    Michael

    Michael-
    Here is how you do it:
    1. Create an attribute of the Simple Type you have created in your controller context.
    2. Insert a DropDownByKey in your view.
    3. Create a data binding between the attribute and the selectedKey property of the drop down list.
    4. To get the key of the selected value use the following code in your controller:
    String key = wdContext.currentContextElement().get_AttributeName_();
    Where AttributeName is the name of the attribute you have created in step 1.
    Cheers-
    Atul

  • Reading valueset of a  mapped Simple Type

    Hi,
    We have a attribute coming from a model. This attribute is of a simple type format.
    we have a scenario where we have to read the number of values in the enumeration  of the simple type.
    Since its mapped , it a modifiablesimpletype could not be obtained.
    How else can we get the vaue set ?
    Regards
    Bharathwaj

    Hi,
    Anil : Oh ya.. Just a simple type is sufficient...! I guess it should solve the problem .. ! Will try and update.
    Satyajit : Not sure abt this. It should also work.
    Enumeration might not exist. It throws a NULL pointer in my case.
    Thanks and Regards
    Bharathwaj
    Message was edited by: Bharathwaj R
            Bharathwaj R

  • Select query based on Simple Type field in JDT

    Hello Experts,
    We have a JDT table consisting of a field "CONSUMPTION_ID" which refers to a Simpletype.So at oracle level the datatype of the field shows as CLOB instead of String. I am unable to use this simple type field in the WHERE clause in my bean .
    Following are the queries i have tried and the errors i have got executing them :
    Query1 -  SELECT * FROM TEST_TABLE WHERE CONSUMPTION_ID <> 'RT'
    Error - com.sap.sql.log.OpenSQLException: The SQL statement "SELECT * FROM "TEST_TABLE " WHERE "REF_MAT_DOC_NO" = ? AND "REF_MAT_DOC_YEAR" = ? AND "CONSUMPTION_ID" <> 'RT'" contains the semantics error[s]: - 1:84 - type check error: the expression >>"CONSUMPTION_ID"<< (CLOB) is not comparable and must not be used with "<>"
    - 1:84 - type check error: the left hand side >>"CONSUMPTION_ID"<< (CLOB) and the right hand side >>'RT'<< (CHAR) of a comparison operator are not comparable
    Query 2 - SELECT * FROM TEST_TABLE WHERE to_char(CONSUMPTION_ID) <> 'RT'
    Error - com.sap.sql.log.OpenSQLException: The SQL statement "SELECT * FROM TEST_TABLE  WHERE REF_MAT_DOC_NO = ? AND REF_MAT_DOC_YEAR = ? AND to_char(CONSUMPTION_ID) <> 'RT'" contains the syntax error[s]: - 1:91 - SQL syntax error: the token "(" was not expected here
    Please let me know if any one has used WHERE clause on fields which refer to a simpletype in JDT, or any other solution to the above problem
    Regards,
    Virag

    Hello Experts,
    We have a JDT table consisting of a field "CONSUMPTION_ID" which refers to a Simpletype.So at oracle level the datatype of the field shows as CLOB instead of String. I am unable to use this simple type field in the WHERE clause in my bean .
    Following are the queries i have tried and the errors i have got executing them :
    Query1 -  SELECT * FROM TEST_TABLE WHERE CONSUMPTION_ID <> 'RT'
    Error - com.sap.sql.log.OpenSQLException: The SQL statement "SELECT * FROM "TEST_TABLE " WHERE "REF_MAT_DOC_NO" = ? AND "REF_MAT_DOC_YEAR" = ? AND "CONSUMPTION_ID" <> 'RT'" contains the semantics error[s]: - 1:84 - type check error: the expression >>"CONSUMPTION_ID"<< (CLOB) is not comparable and must not be used with "<>"
    - 1:84 - type check error: the left hand side >>"CONSUMPTION_ID"<< (CLOB) and the right hand side >>'RT'<< (CHAR) of a comparison operator are not comparable
    Query 2 - SELECT * FROM TEST_TABLE WHERE to_char(CONSUMPTION_ID) <> 'RT'
    Error - com.sap.sql.log.OpenSQLException: The SQL statement "SELECT * FROM TEST_TABLE  WHERE REF_MAT_DOC_NO = ? AND REF_MAT_DOC_YEAR = ? AND to_char(CONSUMPTION_ID) <> 'RT'" contains the syntax error[s]: - 1:91 - SQL syntax error: the token "(" was not expected here
    Please let me know if any one has used WHERE clause on fields which refer to a simpletype in JDT, or any other solution to the above problem
    Regards,
    Virag

  • How to refer global simple types in another schema?

    Hello All,
    Any help would be greatly appreciated. My problem is , I have a global.xsd schema which declare simple types such as
    <xsd:simpleType name="DecimalMin1Max14Places2Type">
    <xsd:restriction base="xsd:decimal">
    <xsd:totalDigits value="14"/>
    <xsd:fractionDigits value="2"/>
    </xsd:restriction>
    </xsd:simpleType>
    I am referring to this type in my another schema forms.xsd. It is used as an attribute to an element. for example an element in forms.xsd is
    <xsd:element name="BudgetFourthYearAmount" type="glob:DecimalMin1Max14Places2Type"/>
    where glob is the prefix associated with global.xsd
    I am sucessfully able to register global.xsd in xdb, but when i try to register forms.xsd, i get sql mapping error. Oracle is able to resolve all the global elements from global.xsd , but it cannot resolve the global simple types i declared.
    My question is how i can refer global simple types declared in one xsd and use them in another xsd?
    Thank you,
    Maninder

    Using an include statement in forms.xsd to import in the global.xsd
    <xs:include schemaLocation="Global.xsd"/>
    If Global.xsd was the shcema_url that you registered the first xsd to.
    Regards
    Coby

  • Simple type of type integer

    Hi All,
    I have create simple type which is of type integer. And i have set the maximum and minimum length for the simple type which is bounded with the input field. When i try to display it, it displayes with ",".
         Example 70,000,000.
    My require is to remove the commas in between the number. Is there solution for this.
    Regards,
    Revathy Madhavan.

    Hi Revathy,
    the display of numbers is localized, here in germany I see "70.000.000". So whenever you change the behaviour, consider that you skip the automated localization provided by sap.
    That said: Open your simple type and go to the "Representation" Tab. in the right upper corner, enter "#" into the field format.
    Problem solved.
    If you want to know more, read the java api of NumberFormat which describes various options for Number presentations based on String patterns.
    Jan

  • XSD complexType to simple type

    Hi all!
    Please help me with my problem.
    I have two XSD files
    First contain complex type description - metadata_types.xsd
         <xs:complexType name="NUM">
              <xs:simpleContent>
                   <xs:extension base="xs:integer">
                        <xs:attribute name="TYPE" use="optional"/>
                        <xs:attribute name="derived" use="optional"/>
                        <xs:attribute name="readonly" use="optional"/>
                        <xs:attribute name="required" use="optional"/>
                   </xs:extension>
              </xs:simpleContent>
         </xs:complexType>
    Second contain members with types from my first files - metadata_schema.xsd
         <xs:import namespace="http://www.xxx.com/metadata_types" schemaLocation="metadata_types.xsd"/>
         <xs:element name="ACCOUNT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Account_Num" type="metadata_types:NUM" minOccurs="0"/>
    How can I convert my second file in corresponding simple types ?
         <xs:import namespace="http://www.xxx.com/metadata_types" schemaLocation="metadata_types.xsd"/>
         <xs:element name="ACCOUNT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Account_Num" type="xs:integer" minOccurs="0"/>
    ...

    I have two files books.xsd and books_types.xsd
    books.xsd
    =========================================================================================================
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="books" xmlns:books_types="http://www.xxx.com/books_types">
    <xs:import namespace="http://www.xxx.com/books_types" schemaLocation="books_types.xsd"/>
    <xs:complexType name="books">
    <xs:sequence>
    <xs:element name="author" type="books_types:TXT"/>
    <xs:element name="title" type="books_types:TXT"/>
    <xs:element name="genre" type="books_types:TXT"/>
    <xs:element name="price" type="books_types:NUM"/>
    <xs:element name="pub_date" type="xs:date"/>
    <xs:element name="review" type="books_types:TXT"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    books_types.xsd
    ========================================================================================================
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.xxx.com/books_types">
         <xs:complexType name="NUM">
              <xs:simpleContent>
                   <xs:extension base="xs:integer">
                        <xs:attribute name="TYPE" use="optional"/>
                        <xs:attribute name="derived" use="optional"/>
                        <xs:attribute name="readonly" use="optional"/>
                        <xs:attribute name="required" use="optional"/>
                   </xs:extension>
              </xs:simpleContent>
         </xs:complexType>
         <xs:complexType name="TXT">
              <xs:simpleContent>
                   <xs:extension base="xs:integer">
                        <xs:attribute name="TYPE" use="optional"/>
                        <xs:attribute name="derived" use="optional"/>
                        <xs:attribute name="readonly" use="optional"/>
                        <xs:attribute name="required" use="optional"/>
                   </xs:extension>
              </xs:simpleContent>
         </xs:complexType>
    </xs:schema>
    I need to get this result
    out.xsd
    ==================================================================================================
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="books" xmlns:books_types="http://www.xxx.com/books_types">
    <xs:complexType name="books">
    <xs:sequence>
    <xs:element name="author" type="xs:string"/>
    <xs:element name="title" type="xs:string"/>
    <xs:element name="genre" type="xs:string"/>
    <xs:element name="price" type="xs:integer"/>
    <xs:element name="pub_date" type="xs:date"/>
    <xs:element name="review" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    whether there is the possibility get this result using xsl transformation ?

  • Accessing Simple Type Variable Defined in BPEL Flow, in Transformation

    Hi,
    I am using Transform Process Activity. In transform mapping, i would like to map one target element with a value defined in a 'simple type variable' which is defined in calling BPEL Flow, however I am not able to do it.
    for example:
    I have a BPEL process A where there is a variable NOTIFICATION_EVENT_ID of simple type integer. when I am trying to access it through the function bpws.getVaraibleData(NOTIFICATION_EVENT_ID, "") then it is failing, while giving a hard-coded value makes it run
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="MarketStatus.xsd"/>
    <rootElement name="MarketStatus" namespace="http://www.j.com/soa/2007-07-17/MarketStatus.xsd"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="MarketNotificationMsg.xsd"/>
    <rootElement name="MarketNotificationMsg" namespace="http://www.j.com/soa/2007-07-17/MarketNotificationMsg.xsd"/>
    </target>
    </mapTargets>
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:m="http://www.j.com/soa/2007-07-17/MarketStatus.xsd"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:ns0="http://www.j.com/soa/2007-07-17/MarketNotificationMsg.xsd"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    exclude-result-prefixes="xsl m xs ns0 xp20 bpws ora ehdr orcl ids hwf">
    <xsl:template match="/">
    <ns0:MarketNotificationMsg>
    <xsl:for-each select="/m:MarketStatus/m:MarketRun[1]">
    <ns0:MarketEvent>
    <ns0:eventID>
    <!--          <xsl:value-of select='string("33")'/> -->
    <xsl:value-of select='bpws:getVariableData("NOTIFICATION_EVENT_ID","")'/>
    </ns0:eventID>
    <ns0:tradeDay>
    <xsl:value-of select="m:marketStartTime"/>
    </ns0:tradeDay>
    <ns0:MarketRun>
    <ns0:marketRunID>
    <xsl:value-of select="m:marketRunID"/>
    </ns0:marketRunID>
    <ns0:marketID>
    <xsl:value-of select="m:marketID"/>
    </ns0:marketID>
    </ns0:MarketRun>
    </ns0:MarketEvent>
    </xsl:for-each>
    </ns0:MarketNotificationMsg>
    </xsl:template>
    </xsl:stylesheet>
    Suggest some pointers.

    > You could use the processXSLT with parameters like here :
    >
    http://blogs.oracle.com/rammenon/2007/05/07
    Hey Eric,
    Thanks for the reply and indeed that was a direct pointer for the problem I was facing.
    HOWEVER :) it dint work on the version of BPEL PM or BPEL Engine I am working on. it seems that either I have configured wrongly or version on which I am working doesn't support this.
    Version I am working on: 10.1.3.2.0
    I am not getting any compile time error however on runtime it is failing saying:
    ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "ora:processXSLT('Map_Notification.xsl', bpws:getVariableData('Invoke_CreateMarketAndRelatedEntities_process_OutputVariable','payload'), bpws:getVariableData('Properties'))", the reason is Error in expression: 'ora:processXSLT('Map_Notification.xsl', bpws:getVariableData('Invoke_CreateMarketAndRelatedEntities_process_OutputVariable','payload'), bpws:getVariableData('Properties'))'.. Please verify the xpath query "ora:processXSLT('Map_Notification.xsl', bpws:getVariableData('Invoke_CreateMarketAndRelatedEntities_process_OutputVariable','payload'), bpws:getVariableData('Properties'))" which is defined in BPEL process.
    I will upload BPEL process created snip of my complex Bigger BPEL process but till the time suggest me if this hints you anything.
    Is I am missing something?
    Thanks.

  • Simple Type Format Validation

    Hi,
    I have a simple type Buil-In Type double with External Representation->Format as follows: "$ ###,##0.00"
    My attribute is binded to an Inputfield and the data is presented correcty, for example "$ 2,000.00".
    But my problem is when the user wants to change that value and gives for example "1000" on that same Inputfield, on any action the framework is validating that the input data is in incorrect format, and the user has to enter explicit the format with the currency symbol "$"...
    Is there a way I can avoid this validation?
    I do want the framework to validate if the value is a Build-in type double and showed as currency on screen, but let the user the capability to enter any number without the format with the sign "$"
    Is this possible???
    Thanks in advance.

    Hi Alan,
    You can use the concept of calculated attribute for achieving this. Create a calculated attribute based on this attribute.
    Once the user enter something in the input field and some action is called by framework, the caculated setter method will be called and then  you can change the format in which ever way you want.
    A calculated attribute is an attribute that is not stored by the element, but calculated each time the attribute is accessed. Therefore it must be marked in the IDE and controller methods must be declared.
    Calculated attributes can have getters and (unless they are read only) setters. The getter calls the declared controller method with the following signature:
                          AttrClass getNodenameAttributename(NodenameElement element);
    It is expected to calculate and return the value based on other values of the element.
    The setter is only generated if the attribute is not marked read only. It has the following signature:
                          void setNodenameAttributename(NodenameElement element, AttrClass value);
    This method is expected to modify other attributes of the element based on the given value. It does not mark anything changed by itself. Only the modification of other attributes leads to updates of the GUI.
    (The above method names are proposals of the IDE. You may change them.)
    Refer to these links as well:
    http://help.sap.com/saphelp_sm32/helpdata/de/7f/a0384162316532e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1ee0e990-0201-0010-75bf-a087c241cb83
    https://wwwn.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/0c0dcacd-0401-0010-b4bd-a05a0b4d68c8
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    No need to remove the validation code. That is actually a good feature provided by the framework. Why to remove that?
    I hope that helps!! Please revert back in case you have further issues.
    Thanks and Regards,
    Pravesh

Maybe you are looking for