Get the objects for getDeclaredFields

Hi,
Can I get the objects of the Fields in my class.
I want to go through my Fields and find the ones with a certain suffix in there name. This I have done with getDeclaredFields. But know I want to get and set the data for the corresponding objects.
for (Field zField : getClass().getDeclaredFields())
    if (zField.getName().endsWith("_Save"))
         // I need somethign that will do something like this. I know the next lines don't work
         Object zObject = zField.getObject();
         if (zObject  instenceof jCheckBox)
             ((jCheckBox)zObject).isSelected();
}Thanks,
Shaul

Shaul wrote:
I'm sorry. I didn't understand that the object is the one that contains the objects that I need.Exactly. And if the field is static you pass in 'null'

Similar Messages

  • Getting the objects for a class

    I am able to get all live classes of a dynpro by using method cl_gui_cfw=>get_living_dynpro_controls. (Also thanks to this forum).
    The resulting table has a reference to a class like ...
    How do I use this reference to:
    1. Get the objects for it?
    2. How can I then free the object from memory by using the "free" method.
    I guess I am asking how to dynamically assign it, then make sure it has a free method and then to use the method to actually free it.

    Hello Uwe
    My first reaction was "NO it cannot be that easy!!". It almost was but on the second line I get a short dump. Then I realised why: the other live control in the table was a sub class of the first class and as a result it was cleared on the first call.
    So I modified the call to be a recursive call (of the form) as follows...
    form clear_live_controls .
    DATA:
      gt_list       TYPE cnto_control_list,
      gt_wa like line of gt_list.
      REFRESH: gt_list.
      CALL METHOD cl_gui_cfw=>get_living_dynpro_controls
        IMPORTING
          control_list = gt_list.
      describe table gt_list lines tab_lines.
      if tab_lines = 0.
    *    Nothing
      else.
         loop at gt_list into gt_wa.
           gt_wa->free( ).
           exit.
         endloop.
         perform clear_live_controls.
      endif.
    endform.                    " clear_live_controls
    This took care of it.
    Many thanks for your help.
    Regards

  • 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 to get the values for the Authorization Object Fields....

    Hi Everyone,
    I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
    Conditions                                                   COND
    Maintain Condition: Auth. for Use/Appl./Cond.Type/Table      V_KOND_VEA
    Activity                       03                                                                        ACTVT
    Application                                                                                KAPPL
    Condition table                                                                                KOTABNR
    Condition Type                                                                                KSCHL
    Usage of the condition table                                                                 KVEWE
    Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
    My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
    All the help in this regard is sincerely appreciated along with the awarding of points...

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • Getting the object id after persisting

    Is there an easy way of getting the object id after using the persist method? I tried the following code piece but it didn't work. Do I have to run a query? I'm new to JPA and waiting for your suggestions. Thanks..
    Bill b = new Bill(); .... .... entityManager.persist(b); int id = b.getId()

    I tried flushing and refreshing the entity but got an EntityNotFoundException.
    Bill b = new Bill();
    entityManager.persist(b);
    entityManager.flush();
    entityManager.refresh(b); // Here where the exception is thrown
    int id = b.getId();When I try without refresh, it still get no id

  • Workitem ID wise to get the Object value

    Hi All,
    is it possible to get the object value form Workitem id wise.
    for example workitem id '446085' based on that workitem id i want to retrieve the object value.
    Please clarify.,
    Thanks & Regards
    K.Gunasekar.

    Hi
    I want to update the object Reference.
    for example i am getting the object value from SAP_WAPI_GET_OBJECTS. (F.M)
    based on the workitem_id.
    i want to update the objects reference from the original one.
    if is it possible means please let me know.
    Thanks & Regards
    K.Gunasekar.

  • Getting the Object Access key

    This weird question,
    But does any one know how to get the object access key for Standard SAP object is changed..
    Normally when we try to do any modification on Standard SaP object it asks for and access key.. We need to enter it once, after which the object is open for editing.
    I have an SAP object which as been modified .
    I want to know that number?? Is it possible..
    Any help will be highly appreciated..
    Regards,
    Samir.

    Hi Samir,
    You have to contact SAP Support to obtain the access key for a Standard SAP Object. The correct channel for that is the OSS, where yo can raise a message requesting the same.
    But you are saying that there's one object that has already been modified. Who has done the modification ? When they have done it, they must have specified the access key. If you want to modify the same object, then the best thing for you to do is to contact the person who has changed it.
    By the way, have the modifications been done using the Modififcation Assistant?
    Regards,
    Anand Mandalika.

  • Error while getting data objects for instance

    Hello Expert,
    I am getting some weird error - whenever there is a new process is triggered and I check context Data, I get following error -
    "Error while getting data objects for instance processinstanceid"
    Thanks is advance
    Priya

    Hi Priya,
    this is a known issue in the xml processing of the Java Virtual Machine. Please refer to the SAP Note for this issue: 1949395
    This should solve your issue.
    Best regards,
    Stefan

  • Get the object type

    hi,
    i have only ONE field that has a formatted search,
    but a want to get the object type of the document,
    for example.
    if i am in a A/R Invoice, i want to get some value (i.e. OINV)
    if i am in a A/P Invoice , i want to get some value (i.e. OPCH)

    Hi,
    You may get the object type by ObjType field.  However, it is not available by UI.  Therefore, you may only get it after the document has been saved.
    Thanks,
    Gordon

  • How to get the values for checked and unchecked chekboxes

    Hai i have using the checkbox in for loop.
    I need the urgent help from anyone,
    for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can anyone help me for this
    i am using the following jsp code for this. If anyone can know about this please post me the sample code.
    <form name="confirmcontainer" id="confirmcontainer" method="post" action="submit.jsp">
    <% for(int i=0;i<value.length;i++) {%>
    <tr>
    <td><input name="assigncontainer_chkbox" d="assigncontainer _chkbox" type="checkbox" value="<%=value[0]%>"></td>
    <td class="bottomborder"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[1]%> </font></div></td>
    <td bgcolor="#FFFFFF" class="bottomborder"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=value[2]%></font></td>
    </tr>
    <% } %>
    <tr><td><input type="submit" name="submit" value="submit"> </td></tr>
    </form>
    Thanks & Regards,
    Tamilvanan

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • Get the Stock for a given Material no

    Hi,
         I'm an ABAP consultant, new to MM.
         I have a requirement - For a given Production Order I have to find the Material and respective BOM Explosion. Once that is done I have to get the Stock for those Materials [Child Materials].
    I have used AUFK and AFPO to get the material from the Production Order and Used MAST table to get the other details and passed it to FM - 'CS_BOM_EXPL_MAT_V2' - This gives me the Child materials.
    Now I want to know how can I find the Stock for a given Material. I want to get the Overall Unrestricted stock. Which Table do I have to use. Is there any standard Function Module [FM] or BAPI to get it.
    Please help.
    Thanks & Regards,
    Ashish

    I have gone through  the MARD table. I want to confirm - for a Material no there are more than 1 plant and for each plant there are more than storage location. So I have to add the Unrestricted Stock of all those to get the Full Unrestricted Stock.
    Please refer Transaction MMBE - I have to use that output.

  • I tried getting the update for my new iphone and now it is asking me to activate it again but won't let me, how do I fix this?

    I tried getting the update for my new iphone and now it is asking me to activate it again but won't let me, how do I fix this? I had started using it for a few hours and tried getting the update and now it won't let me activate the phone. I also can't call the helpline because it won't let me leave this screen on the phone that says "Your iPhone could not be activated because the activation server is temporarily unavailable. Try connecting your iPhone to iTunes to activate it, or try again in a couple of minutes." What it says on iTunes after I fill out the activation info is "There was a problem activating your iPhone. Please contact Verizon Wireless at 1-800-922-0204 to have this iPhone added to your account. Click Continue to be able to explore its features and the App Store." Please help this is driving me nuts!

    iPhone User Guide
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • If i have an iPhone and an iPad on the same apple id, what do i do to NOT have my iPad get the imessages for my phone?

    If i have an iPhone and an iPad on the same apple id, what do i do to NOT have my iPad get the imessages for my phone?

    On the iPad:
    Settings > Messages > Send & Receive > Uncheck your phone number from both sections
    To turn it off completely:
    Settings > Messages > turn off iMessage

  • A^b = n ,How to get the value for a ?

    a^b = n ===> n = Math.pow(a,b)
    How to get the value for a ?
    dose Java have API to get the value for a ?
    Thanks for help~~~

    a^b = n
    =>
    a = n^(1/b)
    So,
    a = Math.pow(n,1.0/b)

  • How to get the date for the first monday of each month

    Dear Members,
    How to get the date for the first monday of each month.
    I have written the following code
    SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
    But it look bith complex.
    Abhishek
    Edited by: 9999999 on Mar 8, 2013 4:30 AM

    Use IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
    select  sysdate current_date,
            trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
      from  dual
    CURRENT_D FIRST_MON
    08-MAR-13 04-MAR-13
    SQL> Below is list of first monday of the month for this year:
    with t as(
              select  add_months(date '2013-1-1',level-1) dt
                from  dual
                connect by level <= 12
    select  dt first_of_the_month,
            trunc(dt + 6,'iw') first_monday_the_month
      from  t
    FIRST_OF_ FIRST_MON
    01-JAN-13 07-JAN-13
    01-FEB-13 04-FEB-13
    01-MAR-13 04-MAR-13
    01-APR-13 01-APR-13
    01-MAY-13 06-MAY-13
    01-JUN-13 03-JUN-13
    01-JUL-13 01-JUL-13
    01-AUG-13 05-AUG-13
    01-SEP-13 02-SEP-13
    01-OCT-13 07-OCT-13
    01-NOV-13 04-NOV-13
    FIRST_OF_ FIRST_MON
    01-DEC-13 02-DEC-13
    12 rows selected.
    SQL> SY.

Maybe you are looking for

  • FP installs WIN 10,2,152,32 on vista/ 32/ firefox but wont play content.

    Cannot find any shock wave,macromedia,flash player files on pc, but do see animated fp logo and version installed on Adobe site, have installed and reinstalled several times on firefox and IE8 it will not play content from some web sites.

  • Book file missing in Digital Editions folder.

    My PC has a folder named Digital Editions. Presently, it contains a PNG (Picture) and annotation of a purchased book. Normally, clicking on the book cover and selecting "Open with Digital Editions", the Digital Editions program immediately open with

  • Master Detail - Detail parent child relationship

    Hello All, I have a setup where I have 3 tables. Call them A, B, and C. Table A is the parent table to the child table B. Also table B is the parent table to the Child table C. Is there a way to represent this in Apex? So far I have created two Maste

  • I just connect portal from server machine. Help me!

    Please, can someone help me? I've instaled the Oracle portal 3.0.9.8.0 in the Oracle 8.1.7. From the server machine I can access the Portal, but if I try from a client machine, a error happens. If I try only the server machine's name, the Oracle Http

  • How to export the data to excel in OAF Page - Urgent

    Hi All, I have a developed a page wich dispaly the records based on some condition. The Page has two regions. 1.RowLayout Region 2.Table Region Both the regions are getting the data from two diffrent VOs. In this case how to export the data to excel