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

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 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

  • 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

  • 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.

  • 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

  • Read enumaration list of simple type

    Hi,
    I want to read enumaration list of simple type and compare it with user input. Simple type is not bound to any attribute.
    How can I read enumeration list values?
    Regards,
    Apurva

    Hi,
    Thanks for replies.
    I wanted to use simple type as storage space for Enumeration list. So, I can refer to this list and fill values from this list as required in the valueset.Not all values, based on some condition, some of the values in the list, will be added in the dropdown.
    Now, if I cant refer to simple type without creating attribute, I will have to create redundant attribute just to access Enumeration list values.
    Can I avoid it? Is there any better way of achieving this?
    Regards,
    Apurva

  • Error calling BPEL from ESB  Multi-part simple type

    I am trying to define a soap service in ESB which is refering a BPEL service. I get the error
    The selected porttype is using a message that is invalid for ESB because it is multi-part or has a simple type.The message RuntimeFaultMessage in operation process of port type exportCaCustomers is invalid. Please select another portype.
    Here is the wsdl for the BPEL service. exportCaCustomers.wsdl
    <definitions
    name="exportCaCustomers"
    targetNamespace="http://xmlns.oracle.com/exportCaCustomers"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:ns1="http://www.globalcompany.com/ns/order"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:ns3="http://usconcrete.com/v1/interfaces/common/InputMessage.xsd"
    xmlns:ns2="http://schemas.oracle.com/bpel/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:client="http://xmlns.oracle.com/exportCaCustomers"
    xmlns:ns10="http://usconcrete.com/v1/interfaces/common/InputMessage.xsd"
    >
    <import namespace="http://schemas.oracle.com/bpel/extension" location="RuntimeFault.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.globalcompany.com/ns/order"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:client="http://xmlns.oracle.com/exportCaCustomers">
    <import namespace="http://xmlns.oracle.com/exportCaCustomers" schemaLocation="exportCaCustomers.xsd"/>
    </schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.globalcompany.com/ns/order"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:client="http://xmlns.oracle.com/exportCaCustomers">
    <xsd:import namespace="http://www.globalcompany.com/ns/order" schemaLocation="sampleTax.xsd"/>
    </xsd:schema>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://usconcrete.com/v1/interfaces/common/InputMessage.xsd" schemaLocation="InputMessage.xsd"/>
    </xsd:schema>
    </types>
    <message name="exportCaCustomersRequestMessage">
    <part name="payload" element="ns10:CVInputMessage"/>
    </message>
    <message name="exportCaCustomersResponseMessage">
    <part name="payload" element="client:exportCaCustomersProcessResponse"/>
    </message>
    <portType name="exportCaCustomers">
    <operation name="process">
    <input message="client:exportCaCustomersRequestMessage"/>
    <output message="client:exportCaCustomersResponseMessage"/>
    <fault name="bindingFault" message="ns2:RuntimeFaultMessage"/>
    </operation>
    </portType>
    <plnk:partnerLinkType name="exportCaCustomers">
    <plnk:role name="exportCaCustomersProvider">
    <plnk:portType name="client:exportCaCustomers"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    These are the contents of RuntimeFault.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="RuntimeFault"
    targetNamespace="http://schemas.oracle.com/bpel/extension"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <message name="RuntimeFaultMessage">
    <part name="code" type="xsd:string"/>
    <part name="summary" type="xsd:string"/>
    <part name="detail" type="xsd:string"/>
    </message>
    </definitions>
    This looks like a very basic thing to do. My BPEL process is working fine. I just want to access it from ESB. Any ESB gurus there. Please respond.

    <fault name="bindingFault" message="ns2:RuntimeFaultMessage"/>Don't think this is the way to define the RuntimeFaults.
    the fault-element you use to 'throw' you own business faults.
    RunTimeFaults are handled by the bpel framework itself and aren't throwable like this.
    See :
    http://www.oracle.com/technology/products/ias/bpel/htdocs/orabpel_technotes.tn007.html
    ""Business faults are application specific faults and occur when an explicit <throw> activity is executed or an <invoke> activity gets a fault as response. The fault name of a business fault is specified by the BPEL process and the messageType, if one exists, is defined in the WSDL.
    Runtime faults are not user defined and will not appear in the WSDL for a process or service.""

  • 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

  • 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

  • Simple type binding

    I declared in the context an element for having a custom simple type defined by me.
    I use this type for a drop down element.
    I filled this simple type dynamically in the controller init.
    How can i access in another view all the elements (that i have filled in the controller init method) for this simle type, not only the selected key??
    Thnak you,
    Florin

    Florin,
    1. Create same attribute in component controller.
    2. Move your code for dynamic value set to component controller init
    3. Map any original view context attribute and context attribute of any additional view(s) to attribute in component controller.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • NW 7.40: Cannot edit CAF simple type

    Hi,
    I've a CAF simple type "ApproverType".
    In the past I was always able to change enumeration values etc. for the created simple types.
    For the complex types this is still possible.
    But since we moved to NWDI it appears as non-editable in NWDS (before the lock symbol was not there):
    I've found a file called "ApproverType.java" in the CAF EJB package.
    But if I add the new enumeration there, the file always gets overwritten when I regenerate the CAF DC.
    How can I edit the enumeration values for that simple type?
    Thanks in advance.
    Best regards,
    Thorsten.

    Hi Christian,
    where and how should I create a new workspace?
    Meanwhile I've found a workaround:
    I've created a copy of "ApproverType":
    There I've added the missing enumeration.
    But personally I don't like this solution...
    The strange thing is that the new type remains editable, whereas the old simple types are all non-editable.
    Additionally all complex structures can still be edited.
    I don't get this.
    Best regards,
    Thorsten.

Maybe you are looking for

  • System Image Backup to flashdrive: HP change to software prevents this option - per support

    HP informs me System Image Backup to flashdrive (per Win 8.1 documenttion) has been disabled by HP. Does anyone know a workaround? Perhaps from Cmd line?   Recovery/File History/System Image Backup - will not function to a flashdrive per Win 8.1 dire

  • Return Mail--Invalid TAO ID(s)

    The TAO Internet E-mail Gateway could NOT deliver your message to the following invalid @mayspeh.com TAO mail ID's (all other @mayspeh.com TAO recipients addressed received your message): [email protected] ----------------------> Document Follows <--

  • Advanced Format Conversion - PAL - NTSC question

    I need to convert from DV PAL (@ 25fps) to DV NTSC (@ 23.98fps). My first test conversion resulted in a DV file running at 29.97 fps. Also, I seem unable to modify the speed settings in order to re-time from PAL to NTSC, which should run approximatel

  • BO data services: Profiler cannot connect. error is - No JVM

    Hi, I just installed BODS on solaris. I had configured the job servers and repositories and my designer can connect to the job server. However, my designer cannot connect to the profiler. I'm having an error message of 'no JVM is available to process

  • Php gd library

    can flash supports the multimedia file such as jpg, mp3 which generates from php? for example http://www.myServer/php/image/myPic.php (the .php is the image itself, not using <img>) i've tried using MovieClipLoader() to load it but it shows nothing i