How to get POF object's field value from query result

hi,all:
I want to get field value from the query result, my code is below
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Contact c=(Contact)iter.next();
System.out.println ("firstame####=" + c.getFirstName());
* but I get error*
Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
at com.oracle.handson.QueryExample.query(QueryExample.java:86)
at com.oracle.handson.QueryExample.main(QueryExample.java:43)
who can tell me how to get POF object's field value from query result

Hi,
If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
    Map.Entry entry = iter.next();
    Contact c=(Contact)entry.getValue();
    System.out.println ("firstame####=" + c.getFirstName());
}JK

Similar Messages

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How to fetch the Business area field value from MIRo into report

    Hi,
    I want to create a report for MIRO with payment details.
    How to fetch the business area field value in to report.
    What is the table name. I verified it is storing in structure. Which is the right table for fetching that value with reference to MIRO.
    After that, how to find the accounting document for payment and check details.
    What are the table names and field names. What we can get from PAYR table.
    With regards
    Lakki

    Dear,
    For Bussiness area
    RKPF-GSBER

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • How to get the Open Order Qty value from Transaction Code RWBE?

    Hello,
    Recently I have a program that needs to extract the value of Open Order Qty value from RWBE.
    My specific steps are as follows:
    - I go to tcode <b>RWBE</b>
    - I select the <b>material and plant</b>
    - I tick the checbox for <b>"Also select special stocks"</b> and <b>"Also select stock commitments"</b>
    - I execute the program double click one of the rows for the <b>Unrestricted Use coulmn</b> and view the <b>Open Order Qty</b>.
    My question is how is this particlar variable attained? I tried Ekbe and the ELIKZ feild from EKPO and I still cant seem to get the right value.
    Hope to hear from you soon.
    Thank you and good day.

    check with FM :
    CALL FUNCTION 'MB_ADD_PURCHASE_ORDER_QUANTITY'
           EXPORTING
              x_matnr = t_matnr-matnr         " TGA/4.6 Erw. Lot
              x_meins = t_matnr-basme         " TGA/4.6 Erw. Lot
                x_matnr = prt_matnr-matnr  " TGA/4.6 Erw. Lot
                x_meins = prt_matnr-basme  " TGA/4.6 Erw. Lot
                x_elikz = space
                x_loekz = space
           TABLES
                xtab    = xtab
                xwerks  = r_werks.
    above fm will get open order qty for given material in po

  • How to get extended object id (field OBJEC-REALO)

    Hi,
    anybody knows  where extended object id are stored, or how can I get this value? I have object id but i also need extended objetc value. I suppose that a function module exists to get this value, but I didn't find it.
    My program doesn't use PCH logical database, so it isn't an option for me
    Any idea, thanks in advance

    I answer to myself, FM HR_MACO provides the information I need.
    Anyway thanks for the interest

  • How to get the people & group field value in sharepoint 2013 editform.aspx using jquery

    i got in sharepoint 2010 by using following-
    var personfield= $("#ctl00_m_g_01cc9f37_2366_400e_aefc_afbe38c5caa5_ff51_ctl00_ctl00_UserField_upLevelDiv");
     var Assigned=personfield.find('span').attr('id');
    But,I want same for sharepoint 2013 .
    Please,tell me
    -Thanks,
    Swapnil

    Swapnil,
    See this link - 
    http://stackoverflow.com/questions/27519795/sharepoint-2013-editform-people-picker-new-value-not-saving
    http://www.sharepointcolumn.com/sp2013-setting-people-picker-value-in-newform-aspx/
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to get the last sub folder value from the string in Webi report

    I have an object coming from universe, this object will contain string e.g. \\Users\Public\Pictures\Sample\
    or    \\Users\Doc\BI\BO\Webi\
    I need the last sub folder from this path to be displayed i.e. Sample and Webi.
    I would like to know how it can be done.
    I tried using formulas like POS, SubStr and Length. however the issue is that the length of the the sting is not fixed and the number of "\" are also not fixed.
    I would appreciate any help regarding this.
    Regards,
    Yogesh

    Hi,
    What is the formula you have written though?.
    =length(right([folderpath]);pos([folderpath];"\")+1)
    Thanks,
    Jothi

  • How to get the database table field names from program

    Hi,
    Can any one tell me,whether any function module is there which can get the table field name and its details ,when we pass database table name to it.
    Thanks in Advance
    <REMOVED BY MODERATOR>
    Regards
    Shibin
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:41 PM

    Hi,
    DD02L Table contains the SAP Tables.
    DD02T Table contains the SAP Table Texts.
    DD01L Table contains the Domains
    DD01T Table contains the Domain Texts.
    DD03L Table contains the Table Fields.
    DD03T Table contains the Table Field Texts. (Language Dependent)
    DD04L Table contains the Data Elements.
    DD04T Table contains the Data Element Texts.
    DD05s Table contains the Foreign Key Fields
    last words with L and T only. L->Database Fetch T-> Text
    For ur question use table DD03L or DD03T.
    Regards,
    Chandru

  • How to get a data element's value from the data file while bursting

    For faxing bursted data into rightafx, I need to first burst my invoice data file into numerous pdf files in the filesystem, and then use the rightfax function of the delivery manager to send those files to different faxes. Integration with rightfax is not available in the bursting engine.
    While bursting the xml data file based on invoice number, I need to get the fax number that is different for each invoice in a java variable so that I can use it to pass fax number information to rightfax. Is it possible?
    Thanks.

    Can any one help?
    Edited by: MTW on Apr 16, 2010 6:58 AM

  • ADF - How to create table which column header come from query result

    I would like to create table that show the summary of task for each month, the query result such as
    Status MonthofYear Total Task
    03 2007/06 9
    03 2007/05 12
    03 2007/04 10
    03 2007/03 7
    05 2007/06 6
    05 2007/05 3
    06 2007/06 1
    09 2007/06 1
    And the table that I would like to show in jdeveloper is
    Status 2007/06 | 2007/05 | 2007/04 | 2007/03 | ......... | 2006/05
    03 9 | 12 | 10 | 0 | .......
    05 6 | 3 | 0 | 0 | .......
    06 1 | 0 | 0 | 0 | .......
    09 1 | 0 | 0 | 0 | .......

    Lucas worked out a solution for this:
    http://technology.amis.nl/blog/?p=2070

  • [ASK] Get One Row of Property Value From Dimension in Script Logic

    Hello, i need help about how to get one row of property value from dimension in script logic.
    Let say there is CATEGORY dimension and the members are like this :
    ID                                                  YEAR   Status
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    PLAN_2012                                  2012        A
    PLAN_2012_V1                           2012        I
    ACTUAL_2012                             2012        I
    FORECAST_2012                         2012        I
    FORECAST_2012_V1                  2012        A
    If i scope CATEGORY like this :
    *XDIM_MEMBERSET CATEGORY = [CATEGORY].PROPERTIES("YEAR") = "2011"
    Then i will get member scope like this :
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    Question :
    In script logic, how can i read the second record of scope and move it to variable ?
    Ex. : I read second record, so i can get the data of second record (PLAN_2011_V1, 2011, A).
    Is there any function to read all record that had been scope ? So i can read all those 5 records.
    Is there any substring or offset function in script logic ? How to use it ?
    Thank you.

    Hi,
    Firstly, when we scope the logic, it doesnt fetch the entire record from the member sheet. It just fetches the ID.
    Secondly, we dont have the feasibility to read only the second ID and skip the others. However, one alternative is that you use the SELECT statement to store all the IDs in a variable, and then use a FOR loop. But this will loop through all the 5 IDs, as per your example. If you want to skip all the IDs except one, you should maintain some property, so that all the IDs are neglected which doesnt have a particular property value.
    Hope you got the idea.

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • How to  get formated value from query

    i get value from query use the follow method
    Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_UNFORMATTED);
    Object obj1 = dataAccess.getValue(i,j,DataMap.DATA_FORMATTED);
    the first method retrun a value '1666.0',
    the second method return a value null
    but i want to get the value '1,666'.
    who can tell me how can get the formated value?

    Ahu,
    An implementation of DataAccess is not required to support all DataMap constants. For example, the OLAP-based Query object does not support DataMap.DATA_FORMATTED. To find out which DataMaps are supported for a particular implementation, you can call the DataDirector's getSupportedDataMap method.
    If you have an Crosstab instance, there is a way to get the formatted cell value, based upon the formatting rules associated with the Crosstab. Get the GridViewFormatManager reference from the Crosstab, and call its formatDataValue method to return a String representation of the formatted data value.
    Hope this helps,
    djb

Maybe you are looking for