Detecting changes in class attributes

Hi,
I am trying to find the best way to do the following.
I have a class that has multiple attributes which can be access via getters and setters. I would like to persist this object in LDAP (I have my reasons) and would like to only persist the changes. Now I would like to do a Hibernate like service, where you define the attributes etc and then access them via the class, but I would like to be able to detect when a change has been made to the attributes and only persist those changes.
Is this possible to do? I was thinking using AOP to insert rules on the attributes at runtime and add a Map that contained the original and new value and what the change actually was i.e update, delete, add and then write the update as required.
This is mainly for 1.4.x

No, what I am trying to do is this.
I have a class that I know the fields I want to track / monitor for changes, and then have a method that I can call to find out if the class is 'dirty' i.e. there has been a change to one or more of the fields I am tracking / monitoring.
Once I know the class is dirty (it has been updated) I want to find out those fields that have changed and make a modification / addition / deletion request.
I think AOP is the way to go, but I am not sure.....
This is not for new object that I am not aware of, as the data has not been persisted yet. This is for new objects I construct and return to the user.
Message was edited by:
nirving

Similar Messages

  • Trouble changing a class attribute in a STATEFULL bsp app - PLEASE HELP!!!!

    hello, i have some trouble changing the value of a class attribute, in certain point of the execution of a statefull bsp app. The scenario is: the bsp app is on a url iview in a portal; i have some link in the portal, that do a window.open (pop up) of that app. the question is: how can i change the class attribute of the bsp app when i close that pop up?, if when i first click the link that show me the pop up, its doesn't create another instance of the class...i mean it continuing working with the same instance of the url iview in the portal. ANY help it will well received. Thanx in advance

    hello Durairaj...yes indeed in the other thread thats the issue with the portal_version attribute, the person who create the iview dont want to change it...so i try to solve it with something else....thats bring me to another problem (posted in this thread). Now i have a question...in the url iview it calls a template that start the bsp app...i mean is not the url iview who calls the bsp app is a middle template...with this scenario can i pass the parameter sap-sessioncmd=open to the url iview or i have to pass it to the bsp app directly when in the middle template i call it??? another question when i pass that parameter via url, it create another instances (apart) of the class or restart the same instance that the app work with until that moment....tell me more about that parameter coz' i am new in bsp and i need help....i will give a lots of rewards point who help me!!! i promise....i am kind of desperade for sure....  thanx in advance

  • Change of Unicode attribute in a custom made class

    Hi,
    In relation to a Unicode conversion, I have a program that calls a Class ZHRxxx.
    After I have changed the attribute to Unicode check, I get a new error in the method Constructor:
    Class ZHRCLPA001,Method CONSTRUCTOR
    In the constructor method, you can only access instance attributes,instance methods, or "ME" after calling the constructor of the          
    superclass . . . . . .          
    The code is one line:
    method CONSTRUCTOR.
    Assign pernr to class attribute
    a_pernr = i_pernr.
    endmethod.
    Any ideas ?
    Thanks

    Hello Peter
    Alexander gave you already the answer. However, based on the naming of your z-class I assume that you are trying to read or access infotype tables. Are you aware of class <b>CL_PT_EMPLOYEE</b>? This class provides you with a simple acccess to any <b>infotypes</b> you need.
    [code&----
    *& Report  ZUS_SDN_CL_PT_EMPLOYEE
    REPORT  zus_sdn_cl_pt_employee.
    DATA:
      go_employee    TYPE REF TO cl_pt_employee.
    PARAMETERS:
      p_pernr        TYPE pernr_d,
      p_begda        TYPE begda,
      p_endda        TYPE endda.
    START-OF-SELECTION.
      go_employee ?= cl_pt_employee=>get_employee( p_pernr ).
      CALL METHOD go_employee->get_master_data
        EXPORTING
          im_begda = p_begda
          im_endda = p_endda
       IMPORTING
         EX_I0000 =  " infotype 0000
         EX_I0001 =  " infotype 0001
         EX_I0002 =  " infotype 0002
         EX_I0007 =
         EX_I0008 =
    Using this method you can access any infotype(s)
      CALL METHOD go_employee->if_pt_employee~get_infotypes
        EXPORTING
          i_itlist      =
         I_FROMDATE    =
         I_TODATE      =
         I_FILTER      =
         I_NOAUTHCHECK =
       IMPORTING
         E_RESULT      =
         E_RETCD       =
    END-OF-SELECTION.[/code]
    The class is final. However, if you need a class hierarchy simply define your z-classes having CL_PT_EMPLOYEE as instance attribute.
    Regards
      Uwe

  • WLS 8.1, SP1 - Weblogic does not detect my servlet class has changed

              I've come across this problem in weblogic 7.0 sp2 and 8.1 sp1 and never found the
              solution. I've asked for solution in BEA's newsgroups and official support and
              NEVER received any suitable answer. I've found other people's quesions regarding
              this problem and they didn't found an answer either. I can't believe this is not
              happenning to more people and there is not solution!!!!!!
              Sometimes (don't know when or why) when we copy our servlets developed with JBuilder
              (6, 7 or 9) or javac and ant, into our exploded archive directory application,
              weblogic does not detect the change, and it serves the the servlet's old version.
              Of course, that servlet is not included in any classpath, and even if we delete
              the class file, it still executes the old version. We even delete the .wlnotdelete
              folder under our server, temp, etc. restart the machine, etc. and it does not
              load the updated servlet.
              The only solution is to change servlet's name and the reference in our web.xml.
              That's the moment that weblogic detects changes, but, for so long? Sooner or later,
              the problem appear again... or not. WHY!!??!! What should we change/delete or
              whatever for our new servlet to be updated?
              How can I force weblogic to register again as new servlets ALL my servlets?
              Now it's even happening to a class used in a very simple tag library. CAN'T BELEIVE
              IT!!!!
              It happens in NT 4.0 and W2K Prof. It happened in Weblogic 7.0 sp2 and now in
              Weblogic 8.1 sp1. It never happened in Weblogic 5.1 sp10.
              Looking forward to hearing a solution for this.
              

              I too am looking for this answer.
              I did notice that the BEA Docs mention that the compiled file needs to be in WEB-INF/classes,
              and mine is in WEB-INF/lib. However, ALL the .jar files are in the LIB directory.
              My jar file is never found when it's in the classes dir....
              Please let me know if you find the solution.
              "Ignacio Sanchez" <[email protected]> wrote:
              >
              >I've come across this problem in weblogic 7.0 sp2 and 8.1 sp1 and never
              >found the
              >solution. I've asked for solution in BEA's newsgroups and official support
              >and
              >NEVER received any suitable answer. I've found other people's quesions
              >regarding
              >this problem and they didn't found an answer either. I can't believe
              >this is not
              >happenning to more people and there is not solution!!!!!!
              >
              >Sometimes (don't know when or why) when we copy our servlets developed
              >with JBuilder
              >(6, 7 or 9) or javac and ant, into our exploded archive directory application,
              >weblogic does not detect the change, and it serves the the servlet's
              >old version.
              >Of course, that servlet is not included in any classpath, and even if
              >we delete
              >the class file, it still executes the old version. We even delete the
              >.wlnotdelete
              >folder under our server, temp, etc. restart the machine, etc. and it
              >does not
              >load the updated servlet.
              >
              >The only solution is to change servlet's name and the reference in our
              >web.xml.
              >That's the moment that weblogic detects changes, but, for so long? Sooner
              >or later,
              >the problem appear again... or not. WHY!!??!! What should we change/delete
              >or
              >whatever for our new servlet to be updated?
              >How can I force weblogic to register again as new servlets ALL my servlets?
              >
              >
              >Now it's even happening to a class used in a very simple tag library.
              >CAN'T BELEIVE
              >IT!!!!
              >
              >It happens in NT 4.0 and W2K Prof. It happened in Weblogic 7.0 sp2 and
              >now in
              >Weblogic 8.1 sp1. It never happened in Weblogic 5.1 sp10.
              >
              >Looking forward to hearing a solution for this.
              

  • Can we change the Super class attribute scope in Sub class

    Hi.
    I created a super class. In that i have 4 attributes. That attributes are PUBLIC.
    I created a sub class. In that i got all super class attributes. I want to change that attributes as a Private. Is it possible.
    If it is possible.Give me an Example with code or Pseudo code.
    Regards.
    Krishna.

    Hi Krishna,
    It is not possible... If you declare the Attributes again in Subclass of the same name as that of Super class
    then the way of accessing them would be different from that of attributes in the main class.
    Hope this would help you
    Good luck
    Narin

  • How to change standard class private section code

    Dear experts,
    I need to add new attributes in a standard class as per one OSS note. I took access key to add new attributes. I have a question.
    class name: CL_J_1BEFD
    Attribute: MT_GROUP_C350
    Level: Instance
    Visibility: Private
    Type STANDARD TABLE OF mty_result
    How do i add the instance attribute because i do not want to give the typing and associated type. instead i have to declare data: MT_GROUP_C350 type standard table of mty_result in class builder private section code.
    if you look at the pushbutton between Associated type and Description, for all instance attributes there's a green color lining below the arrow. I want my attribute also to be exactly same.
    Though i have access key, in private section the display<->Change button is disabled.
    Please suggest me how do i add code in private section of a standard class. i have required access key to change the class.
    Thanks,
    Rajesh.

    Hi ,
    Please follow the OSS note 1828074 - Syntax error in LSEPA_MANDATE_UI_LISTF01 / visibility of the method "GET_SELECTED_MANDATES" to change visibility section of a standard class.
    Regards,
    Chetan

  • Cannot change Valuation Class although no Open-PO

    Dear Gurus,
    I try to change Valuation Class in Material Master but I cannot after I created PO and still after MIGO and MIRO.
    We are using PS and Material Master is set as below;
    Ind./Coll in MPR4 = 1
    Since requirement comes from PS, PO is created with account assignment category Q.
    Once we execute MIGO and MIRO for the PO, still we cannot change Valuation Class.
    If you know the way to change Valuation Class, would you tell me how?
    Best Regards,
    AK

    Hi,
    The change of the valuation class will impact on ML (material ledger), if the ML
    is active. Is ML active on your system?
    The note 575632 explains partly the effects on CCS. The
    valuation class is used to allocate the plan costs to the related cost
    element. Therefore, it is advisable to create new materials instead of
    changing the valuation class. This would be straight forward and easy to
    follow-up. The CCS does not a change history. Consequently, the previous
    periods can not be explained with current CCS. That may lead
    inconsistencies under circumtances. It is up to your decision. You can
    change, test the impact and decide on. The proposed solution of SAP
    would be avoiding that change and creating new materials.
    When you try to change the valuation class, what is the details of the
    error?
    In order to change valuation class in the material master, you have to
    make sure that none of the following exist in you system:
    1  Valuated stocks in the current period or in the previous period
    2  Open purchase orders or delivery schedule lines
    3  Production orders for which a goods movement has already taken place
    The system checks the stocks (storage loc. stocks and special
    stocks) of the same period in which the valuation class will be changed.
    If the valuation class of current period will changed, check in
    transaction code MMBE for zero stocks, or in SE16: MARD/MBEW;
    MCHB/MKOL/MSKA/MSKU/MSLB/MSPR.
    The system checks all dependant purchase documents without delete flag
    and error M3368 occurs when it finds at least one non deleted po item
    (not only when stocks exist).
    1. First be sure that no stocks exist in current AND previous period!
       see note 30656, with an example how to get zero stocks.
    2. SE16 ->table EKPO. Select all po items of the related material.
       If you found items with LOEKZ <> 'L', you have to delete them in ME22
    3. SE16 ->table AFPO. Select all items of the related material/plant.
       If you find at least one item, change of val.clss. is not possible.
       You have to these production order(s) !
    These hard restrictions are necessary as inconsistencies in account
    assignment will follow after change of val.class, when proceeding
    follow up functions of a PO item before and after changing valuation
    class. Also attached is 146241.
    In customizing for the Material Master, you can switch the check for
    open purchase orders and/or for production orders to a warning.
    You do this in Define Attributes of System Messages by assigning
    the message type Warning to message MM 326 and/or MM 327 respectively.
    Please refer to note 160970 for more information.
    I hope this will help you in resolving the reported issue.
    Best Regards,
    Arminda Jack

  • Detect changes in an instance

    Hello,
    how can I detect changes in an instantiated object? I could serialize the object and write it into a file. After some minutes I could write it a second time into a file. Now I could compare the two files. But I thing this is not the best way for doing this, isnt't it.
    Any suggestions?
    Thanks

    it can be of any help, here's how I implement object changes:
    /** Interface for object instances comparison */
    interface ContentComparable {
       /** Returns a string describing the object instance for comparison */
       public String getCompareString();
    /** Custom class sample */
    public class CustomClass implements ContentComparable {
       private String    customField1;
       private int       customField2;
       /** Constructor */
       private CustomClass(String field1, int field2) {
          this.customField1 = field1;
          this.customField2 = field2;
       //------------------------------------------------------------ ContentComparable ---
       /** Returns a string describing the object instance for comparison */
       public String getCompareString() {
          String content = this.getClass().getName() + "["
                           + "customField1='" + this.customField1 + "', "
                           + "customField2=" + this.customField2 + "]";
           return content;          
       /** Returns TRUE if the object is equal to an other object
        * @param   otherobj  the other object
        * @return  TRUE or FALSE
        * @see #getCompareString()
       public boolean equals(Object otherobj) {
          if (otherobj instanceof CustomClass) {
             CustomClass classobj = (CustomClass)otherobj;
             return this.getCompareString().equals(classobj.getCompareString());
          return false;
    }With that, you just have to keep a copy of the getCompareString() of the object before any changes are made.
    When you want to test changes, call this method:
       // private member to hold copy of unchanged object string
       private String oldObjectValue;
       // Returns TRUE if object has changed
       private boolean testDataChanged() {
          if (oldObjectValue == null) oldObjectValue = object.getCompareString();
          String newObjectValue = object.getCompareString();
          return !oldObjectValue.equals(newObjectValue);  
       //...Hope this helped,
    Regards.

  • Model Binding and Calculated Field Syntax for "class" Attribute

    Hi,
    I tried to use the calculated field syntax from SAP UI5 to change the CSS class attribute of an element based on some model property, i.e., I wanted to change the class in the corresponding formatter function based on the currently bound value. However, my formatter function is not called. When I use the same syntax on a text attribute, it works.
    I also tried to use normal property binding, but it did not work on the class attribute either (it just put class="{property}" in the rendered HTML).
    Is there anything I missed or is it just not possible to use property binding and calculated field syntax for class attributes? Did anybody try something like this before?
    I think it is a standard use case to change the CSS class based on some model property. So, if anybody knows how to do that, could you give a short example?
    Best regards
    Svenja

    They have a class property. At least, I can do the following in an XML view:
    <Button
                  icon="sap-icon://add"
                  press="onButtonPress"
                  class="my-button-class" />
    I would expect the following to work as well, but for me it did not:
    <Button
                  icon="sap-icon://add"
                  press="onButtonPress"
                  class="{/customClass}" />
    This renders the following HTML (cropped to the important parts):
    <button type="button" class="sapMBtn {/customClass}">
    </button>
    It seems like the class attribute is something special although I don't see a reason why. Other HTML templating engines, for example, support things like that.

  • Field symbols as Class Attributes

    Hello Gurus,
    Is anybody able to say to me if it is possible to declare field symbols as class attributes? As I can understand until now, this is not possible and we need to use some attribute with the "TYPE REF TO Data" to get the information we need. Correct?
    Thanks,
    Daniel.

    Ok, let me see if someone can give me some idea on how to improve my method:
    Method: PREPARE_PTOOL_DATA
    Parameters specification:
    Parameter        Type     Typing     Reference Type
    PF_ANALYSIS        Importing     Type     /SYM/SC_PT_ID_ANALYSIS_D
    PF_ANAL_DESC        Importing     Type     /SYM/SC_NM_DESC_ANALYSIS
    PF_LOGIC        Importing     Type     CHAR01
    PF_MATERIAL        Importing     Type     MATNR
    PF_MAKTX        Importing     Type     MAKTX
    PT_DATA_COMPA        Exporting     Type     /SYM/SC_TAB_PT_RESULT_CP
    PT_CALC_ANALY        Exporting     Type     /SYM/SC_TAB_PT_RESULT_CA
    PT_DATA_MATERIAL1 Changing     Type     /SYM/SC_TAB_PROC_ALLERG_RESULT
    PT_DATA_MATERIAL2     Changing     Type     /SYM/SC_TAB_PROC_ALLERG_RESULT
    Source code:
    From the /SYM/SC_CL_PROCESS_ALLERG_GEN class
    Old version (but it is working)
    METHOD prepare_ptool_data.
      DATA: ls_data_material1   TYPE /sym/sc_s_proc_allerg_result,
            ls_data_material2   TYPE /sym/sc_s_proc_allerg_result,
            lf_index_material1  TYPE sy-tabix,
            lf_index_material2  TYPE sy-tabix,
            ls_result_cp        TYPE /sym/sc_pt_result_cp,
            ls_result_ca        TYPE /sym/sc_pt_result_ca.
    Prepare data for Data Comparison step
      IF pt_data_compa IS REQUESTED.
        LOOP AT pt_data_material1 INTO ls_data_material1.
          lf_index_material1 = sy-tabix.
          CLEAR ls_result_cp.
          MOVE pf_analysis   TO ls_result_cp-analysis.
          MOVE pf_anal_desc  TO ls_result_cp-desc_analysis.
          MOVE ls_data_material1-algbe TO ls_result_cp-desc_property.
    If Logic 'A', move the text from ls_data_material1 to original
    material status
          IF pf_logic EQ c_logic_a.
            MOVE ls_data_material1-agsbe TO ls_result_cp-val_orig_matnr.
    If Logic 'B', move the text from ls_data_material1 to "toy"
    material status
          ELSEIF pf_logic EQ c_logic_b.
            MOVE ls_data_material1-agsbe TO ls_result_cp-val_toy_matnr.
          ENDIF.  " IF pf_logic EQ c_logic_a.
    Read the lt_data_toy by the Allergen ID (ALGEN)
          CLEAR ls_data_material2.
          READ TABLE pt_data_material2 INTO ls_data_material2
                WITH KEY algen = ls_data_material1-algen BINARY SEARCH.
          IF sy-subrc EQ 0.
            lf_index_material2 = sy-tabix.
    If Logic 'A', move the text from ls_data_material2 to "toy°
    material status
            IF pf_logic EQ c_logic_a.
              MOVE ls_data_material2-agsbe TO ls_result_cp-val_toy_matnr.
    If Logic 'B', move the text from ls_data_material2 to original
    material status
            ELSEIF pf_logic EQ c_logic_b.
              MOVE ls_data_material2-agsbe TO ls_result_cp-val_orig_matnr.
            ENDIF.  " IF pf_logic EQ c_a.
    Delete record from lt_data_toy, index lf_index_toy
            DELETE pt_data_material2 INDEX lf_index_material2.
          ENDIF.  " IF sy-subrc EQ 0.
          APPEND ls_result_cp TO pt_data_compa.
    Delete record from lt_data_orig, index lf_index_orig
          DELETE pt_data_material1 INDEX lf_index_material1.
        ENDLOOP.  " LOOP AT lt_data_material1 INTO ls_data_material1.
      ENDIF.  " IF pt_data_compa IS REQUESTED.
    Prepare data for Calculation Analysis step
      IF pt_calc_analy IS REQUESTED.
        LOOP AT pt_data_material1 INTO ls_data_material1.
          lf_index_material1 = sy-tabix.
          CLEAR ls_result_ca.
          MOVE pf_material   TO ls_result_ca-matnr.
          MOVE pf_maktx      TO ls_result_ca-maktx.
          MOVE pf_analysis   TO ls_result_ca-analysis.
          MOVE pf_anal_desc  TO ls_result_ca-desc_analysis.
          MOVE ls_data_material1-algbe TO ls_result_ca-desc_property.
    If Logic 'A', move the text from ls_data_material1 to original
    material status
          IF pf_logic EQ c_logic_a.
            MOVE ls_data_material1-agsbe TO ls_result_ca-val_curr_stat.
    If Logic 'B', move the text from ls_data_material1 to "toy"
    material status
          ELSEIF pf_logic EQ c_logic_b.
            MOVE ls_data_material1-agsbe TO ls_result_ca-val_simul_stat.
          ENDIF.  " IF pf_logic EQ c_logic_a.
    Read the lt_data_toy by the Allergen ID (ALGEN)
          CLEAR ls_data_material2.
          READ TABLE pt_data_material2 INTO ls_data_material2
                WITH KEY algen = ls_data_material1-algen BINARY SEARCH.
          IF sy-subrc EQ 0.
            lf_index_material2 = sy-tabix.
    If Logic 'A', move the text from ls_data_material2 to "toy°
    material status
            IF pf_logic EQ c_logic_a.
              MOVE ls_data_material2-agsbe TO ls_result_ca-val_simul_stat.
    If Logic 'B', move the text from ls_data_material2 to original
    material status
            ELSEIF pf_logic EQ c_logic_b.
              MOVE ls_data_material2-agsbe TO ls_result_ca-val_curr_stat.
            ENDIF.  " IF pf_logic EQ c_a.
    Delete record from lt_data_toy, index lf_index_toy
            DELETE pt_data_material2 INDEX lf_index_material2.
          ENDIF.  " IF sy-subrc EQ 0.
          APPEND ls_result_ca TO pt_calc_analy.
    Delete record from lt_data_orig, index lf_index_orig
          DELETE pt_data_material1 INDEX lf_index_material1.
        ENDLOOP.  " LOOP AT lt_data_material1 INTO ls_data_material1.
      ENDIF.  " IF pt_calc_analy IS REQUESTED.
    ENDMETHOD.
    As you can see, I am repeating almost the same code, just changing some items. I am not sure if I can use new parameters (ANY or ANY TABLE) but, my first idea to improve it was to use the field-symbols (and it works ok). The issue is that I have to repeat the assignment lines every same named method of the classes I am changing (I would like to do the assignment into a new method of the superclass). Do you think it is possible or should I give up and proceed with the assignments locally, for each same named method of each class?
    Thanks,
    Daniel.

  • Access to class-attribute by Interface-reference

    Hi OO-Gurus,
    I use an implementation of BADI ME_PROCESS_REQ_CUST to fill and handle user-defined fields in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~OPEN.
    There I  use a reference variable which refers to an interface (type ref to IF_PURCHASE_REQUISITION_ITEM) to access the item-object. My problem is that I need to have access to the class-attribute my_state. The corresponding class lcl_req_item is defined locally (LMEREQF01). So I can’t use  a reference variable with reference to this class (so widening cast using the interface-reference is not possible) .. Does anyone know a trick how to access the class-attribute anyway?
    Coding:
      data:  l_item_list       TYPE MMPUR_REQUISITION_ITEMS,
               l_item             TYPE MMPUR_REQUISITION_ITEM,
               l_item_akt       TYPE mereq_item,
               l_item_ref        TYPE ref to IF_PURCHASE_REQUISITION_ITEM. 
      l_item_list = im_header->get_items().
      loop at l_item_list into l_item.
        l_item_akt = l_item-item->get_data( ).
        l_item_ref = l_item-item.
      endloop.
    (Debugging the code, I manage by doubleclicking the fieldcontent of l_item_ref (e.g ) to show the content of the class-attribute my_state. This works only if the field “Interface” in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with “IF_PURCHASE_REQUISITION_ITEM”, there aren’t any attributes shown.)
    Thanks in advance for your kind help!!
    Nicole

    Hello Nicole
    The following sample coding shows you how to solve your problem. Please do not ask me how I came across this solution.
    However, if you are studying it carefully you may stumble across a most beautiful property of field-symbols as I did.
    METHOD if_ex_me_process_req_cust~open.
      DATA: l_item_list TYPE mmpur_requisition_items,
      l_item TYPE mmpur_requisition_item,
      l_item_akt TYPE mereq_item,
      l_item_ref TYPE REF TO if_purchase_requisition_item.
      DATA:
        ld_attr         TYPE string,
        lo_obj          TYPE REF TO object.
      FIELD-SYMBOLS:
        <lo_lcl>        TYPE ANY,
        <ls_item>       TYPE mereq_item,
        <ls_itemx>      TYPE mereq_itemx.
      l_item_list = im_header->get_items( ).
      LOOP AT l_item_list INTO l_item.
        l_item_akt = l_item-item->get_data( ).
        l_item_ref = l_item-item.
        lo_obj     ?= l_item-item.  " casting to root object !!!!!
        ld_attr = 'MY_STATE'.
        ASSIGN lo_obj->(ld_attr) TO <lo_lcl>.
        ld_attr = 'MY_STATE->ITEM'.
        ASSIGN lo_obj->(ld_attr) TO <ls_item>.
    "    ASSIGN l_item_ref->(ld_attr) TO <ls_item>.  " does not work...
        ld_attr = 'MY_STATE->ITEMX'.
        ASSIGN lo_obj->(ld_attr) TO <ls_itemx>.
      ENDLOOP.
      " NOTE: data definition of local class lcl_req_item_state (fg MEREQ)
    **    DATA:  item           TYPE mereq_item,
    **           itemx          TYPE mereq_itemx,
    **           header         TYPE REF TO lcl_req_header,
    **           ref_item       TYPE REF TO lcl_req_item,
    **           acct_container TYPE REF TO lcl_acct_container,
    **           source         TYPE REF TO cl_source_of_supply_mm,
    **           release_state  TYPE REF TO cl_release_state_mm,
    **           text_manager   TYPE REF TO lcl_text_manager,
    **           bom            TYPE REF TO lcl_bom,
    **           funds_mgt_active TYPE mmpur_bool VALUE mmpur_no,
    **           aktyp          TYPE aktyp,
    **           no_auth        TYPE mmpur_bool VALUE mmpur_no,
    **           release_op     type mmpur_bool value mmpur_no,
    **           persistent     TYPE mmpur_bool VALUE mmpur_no,
    **           checked        TYPE mmpur_bool VALUE mmpur_no,
    **           manual_configuration TYPE mmpur_bool,
    **           input_buffer_changed TYPE mmpur_bool VALUE mmpur_no,
    **           changed        TYPE mmpur_bool,
    **           broken_rules   TYPE lty_mask,
    **           referenced_rules TYPE lty_mask,
    **           chp_changes    TYPE mmchp_chp_list,
    **           dcm_manager    TYPE REF TO if_revision_manager_dcm,
    **           "DCM Retrofit
    **           rel_state_after_release TYPE REF TO cl_release_state_mm,
    **           "DCM Retrofit
    **           chdoc_container TYPE REF TO lcl_chdoc_container,
    **           "DCM Retrofit
    **           service_changed TYPE mmpur_bool,
    **           "DCM Retrofit
    **           determinants   TYPE lty_item_determinants.
    ENDMETHOD.
    Regards
      Uwe

  • Detecting changes

    hi folks,
    I have a swing application that has a functionality to save the input. I want to know what is the common way to detect modification of input. If there's modification, i want to prompt the user to save if he/she is closing down the app. I'm thinking about using a listener on all input components(JTextField, JList, JComboBox,JTable,JButton). But the listener would be different for each type of component, ActionListener for JButton, CaretListener for JTextField, ListSelectionListener for JList, ect. So I want to write a class that implements all these Listeners, and if any of those events is triggered, then I know there's modification been made.
    My question is: is there a better/more efficient/more elegant way of detecting changes in my app?
    If not, any comments on my approach?
    thanks!!

    You can write an unique class implementing DocumentListener, ActionListener, ItemListener, etc..
    But you still have to add the listener to all the components.
    I'm thinking you can write a method void register(JComponent pane) Depending on the class JTextField,JCheckBox, etc... you add the class as a DocumentListener,
    as an ActionListener, etc. If the component is a container, you can recursively invoke the method
    for all the children

  • Changeing Valuation class-what happens to deleted open docs.

    Hello,
    we are planning to change the valuation class for material. In order to change the class we would have to delete all open items that trace back to the material (PO, GR, IR). I run me2m to identify the open documents for that material.
    My issue is when I reverse or delete the IR, GR, and PO what happens to the those documents.? We have documents that go back to 2007.
    Do we have to recreate the PO, GR, IR after we change the class.?What are the long term effects when doing this change (Audit)?
    Please advise.
    Thanks.

    You don't need to worry about old documents as long as they are not open.
    You just need to invoice out all the open GRs or cancel all those GRs. In case of POs, you have to ensure the GR qty is equal to IR qty for each PO line, then you can mark the line as deleted so that the system will allow you to change the val. class. You also need to make the stock to zero.
    Once val. Class is changed, you can undo all the above.

  • Error while changing the Display Attribute into Navigational Attribute

    Hi all.. Gud Mrng.
    I was changed the attribute (product) from display attribute into navigational attribute and while save and activating the info object it is not getting activated and it is throwing the below error message.
    Error Message: u201CThe Info object is being used in several data targetsu201D
    My Questions:
    i)     Do I need to delete the data from all the data targets (where this info object is using)??
    ii)     Do I need to delete data only from the main info object (Zmaterial)? Is this single action enough?
    Please suggest me which action I need to follow & What are the precautions need to take while changing the Display Attribute (product) into Navigational attribute of info object (Zmaterial).
    Thanks in advance.
    Thanks & Regards,
    B Venugopal

    Hi Garima
    Only in case of key figures we cannot change it from display to navigational.
    If the info object is a characteristics then in the General tab of the info object if you select 'attribute only' then the iobj would be a display attribute only. If you leave it unmarked then you can use the iobj as a navigational atribute.
    I am sure you know that these settings only mean if a IOBJ can be used as display or navigational.  To  use it as a navigational within another object you will have to change the settings from 'DIS' to 'NAV' for the said info object in the 'Attributes' tab of its parent info object.
    Further if you use the parent info object in any data target / infio provider you will have to further mark the info object as 'navigational' while defining the attrbute of the said data target / info provider. The info object gets displayed in the data target / info provider attribute properties as 'parent IOBJ_info object'
    Cheers
    Umesh

  • How to change Valuation class in material master(have stock)

    HI,
    I would like to change the valuation class in material master, How to change VC? is there any process before changing VC?
    I heared when Material have nil stock then only it's possible to change VC, Is it correct? which TC can I use for change VC?
    Regards,
    venki

    Dear venki,
    To change Valuation class you must have zero stock in the current period, and zero stock at the end of the last period, plus no open PO lines .  flag for deletion all open PO lines,
    Regards
    shankar

Maybe you are looking for

  • Restore database failed on Oracle 10g 10.2.0.1 linux 32 bit

    Hi, I am working on test database for testing database disaster recovery. 1) i made full database backup by RMAN and ui also have archive log 2) i noted DBID and all folders of database 3)Turn on the Controlfile auto backup 4) then i drop database 5)

  • Itunes doesnt work after upgrade from 6 to 7

    i've recently upgraded to itunes 7...and it wont open now..i've installed both quicktime and itunes..and i've checked that quicktime IS 7.1.3 which is compatible...and after i double click the itunes icon..i get a licence agreement..then i click agre

  • Business Connector reading from an X400 box

    Hello All, Does anybody have any experience to read the messages from an X400 box into the BC and process them then. I would like to communicate with the BC to the X400 box and process the message(s). Some people have some middleware in between (like

  • Mass Re-Read of PP master data

    Hi Is there is any transaction or Way to have MASS  reread PP master data in Production orders?

  • Inbound delivery and shipping notification

    Hi, what is the difference between shipping notification and inbound delivery in confirmations tab of POs? Regards