Is there an easy way to copy one attribute value to another in same VO?

Hi All,
I have two attributes Total and Sum in my masterVO (based on masterEO). Sum is transient attribute which calculates the sum of costs from detailVO. Now I want to pass the value from Sum to Total so that Total can have the right value to insert into DB. In VORowImpl file I tried to set the value in the getter method of Total (code below) but it ends in dead loop. Wonder what's the right way for me to do then?
Thanks,
Sophy
public BigDecimal getTotal() {  
setTotal(getSum());
return (BigDecimal) getAttributeInternal(TOTAL);
Edited by: user10366631 on Mar 2, 2012 11:58 AM

Thanks for asking, Timo. In my case we already have this totalCost attribute in the DB table which will be used by others. Whenever user changes a cost in the detailVO from UI, I need to recalculate the totalCost in masterVO and insert it into DB. Hence values in the DB will always match.
I found the way of passing the value of attribute though, whic is code below. Hope it'll help someone else looking for similar problem solution...
public BigDecimal getSumCost() {
if ((BigDecimal)getAttributeInternal(SUMCOST) != this.getTotalCost())
this.setTotalCost((BigDecimal)getAttributeInternal(SUMCOST));
return (BigDecimal)getAttributeInternal(SUMCOST);
}

Similar Messages

  • Is there an easy way to transfer contacts from iphone to another phone?

    My company will no longer support/pay for my iphone and I need to transfer my contacts out of my iphone and into a new phone, is there any easy way to do this or am I stuck with writing my contacts down and re0entering them into a new phone?

    You should be syncing your contact to your computer.
    You can probably find a way to get the contacts from your computer to your new phone.

  • Is there an easy way to copy a clip and stack it on top of the clip I copied it from?

    I know I can copy it at the end of the sequence and then move it on top of the clip I want, but am thinking there MUST be an easier way.
    Thanks

    Yes.
    Double click the clip in the Timeline and it opens in the Viewer.
    Drag the Viewer clip to the Supeimpose area of the Canvas.
    Make sure the Playhead is on the clip you require before starting.
    Al

  • How to get the one attribute value in another attribute getter method

    Hi,
    I have a requirement to get one attribute's value in the another attribute getter or setter method.
    Help needed ASAP.
    Thanks,
    sreenivas.

    Check if both the attributes are under the same context node.
    If so directly call the getter method of the other attribute here like this:
    lv_customer_type = me->get_customer_type( attribute_path = 'STRUCT.CUSTOMER_TYPE' ).
    If it is under a different context node,check if it is available from some relation, if so
        lr_agr_rel = current->get_related_entity( iv_relation_name = 'TpmAgrre'l ).
         CALL METHOD lr_agr_rel->if_bol_bo_property_access~get_property_as_value
            EXPORTING
              iv_attr_name = 'EXTERNAL_ID'
            IMPORTING
              ev_result    = lv_cust_plan_id.
    Regards,
    Masood Imrani S.

  • Is there an easy way to copy a cd or a dvd? Spent 2 hours with Apple Support and they have no idea. I have the apple ext drive. I am unfamiliar with the iMac (first time owning a mac) and it was so simple on a pc.

    On a PC I would just open Roxio and copy disc....so simple.

    Since you're a newcomer to the Mac, see these:
    Switching from Windows to Mac OS X,
    Mac Basics—Tutorials on using a Mac,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Mountain Lion Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • Issue with customer exit for copying one variable value to another

    Hello Gurus,
    I need to copy the value of a single value variable into another single customer exit variable.
    I coded as below.
      WHEN 'customer_exit_var'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'user_input_Variable'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
            L_S_RANGE-HIGH = ''.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
    I used the condition <= for the customer exit variable in the report. But, it is considering only single value, but not all the values <= to the give value.
    Please help me in this regard,
    Thanks,
    Aarthi.

    Thanks for your immediate response Govind.
    My report is restricted based on two dates. Date1 and Date2. Need to consider all records whose dates are <= Date1 and <= Date2.
    Date1 and Date2 should have same values. But user inputs only Date1.
    So, I created Date1 as Single, User Input Variable restricted the query with <=Date1.
    Next I created Date2 as Single, Customer Exit Variable and restrcited the Query with <=Date2.
    In CMOD I used the above code to assigne Date1 Value to Date2.
    When I execute the report, say I give todays date in the report (Dec, 12, 2007). Date2  has to consider all the values <= Dec 12, 2007. But, in my case it is considering only Dec 12, 2007, but not the before dates.
    So, Please help me in solving this problem.
    Thanks,
    Aarthi.

  • HT1473 Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Generally adding a common album artist will fix things.
    tt2

  • Is there a way to copy an attribute from one clip to another?

    In one of my clips, I changed the color of someones shirt, and I want to copy that to every single clip so he has that same color shirt in every clip. Is there an easy way to do this, so I don't have to manually color his shirt in every clip by hand?

    highlight the clip that you have adjusted. Right click and choose copy. Then highlight all the other clips you want to add the filter to. Right click and choose Paste attributes. A window will open asking which attributes to paste. Choose filters.
    Good Luck!

  • HT204406 after this new itunes and ios7 update all my music is off my ipod touch unless i download them one artist at a time, i have over 3500 songs in there.  really?  is there no easier way to get my music back into my ipod?  like a download all button?

         after this new itunes and ios7 update all my music is off my ipod touch unless i download them one artist at a time, i have over 3500 songs in there.  really?  is there no easier way to get my music back into my ipod?  like a download all button?  thanks.

    thanks for the reply.  guess i'll have to do that.  apple, not really happy with what you've done with this latest update.  have not been able to enjoy my music in my car since the update.  most of us dont mind changes that progress timely, but this was much more than just a progression.  this was a complete change.  and not a good one, at all.  thanks to the two people that replied.  appreciate it.

  • Is there an easier way to transfer your iTunes library on windows to a mac than copying the library to a usb and plugging the usb into the mac and put the library in the iTunes file

    is there an easier way to transfer your iTunes library on windows to a mac than copying the library to a usb and plugging the usb into the mac and put the library in the iTunes file? I recently swapped to Mac and this is how i moved the library from windows to mac and library is in tact but is there an easier way? My cousin just imported her cd's again, but it was harder for me as i have an ipod with over 150 apps and i needed to move them. i think it would be helpful if i knew of an easier way so i can help a friend move his. Thanks

    The general method of use is to download a script (double-click or right-click and use Download or Save As...) to a folder of your choice, e.g. your Desktop, Downloads folder or create a folder at ...\iTunes\Scripts. Select a playlist or highlight some tracks in iTunes and then double-click on the script to execute it. If no specific tracks are selected the script will try to work with all tracks in the current playlist or sometimes the entire library.
    tt2

  • HT1766 On an iPhone 5, Is there an easy way to move app icons as a group? instead of one by one?

    On an iPhone 5, Is there an easy way to move app icons as a group? instead of one by one?

    If you have a bunch of apps on one screen yunwantnto move to another as a group, create a folder by holding your finger on ne app until all the icons start shaking and show and "x" in the top left corner of the icon. Press again and don't lift your finger; move that icon with your finger over one of the other icons you want to add to the folder, which will create a folder. Then you can move the other apps you want to move into that folder. When you have all the apps you want to move into that folder, close the folder by tapping on the screen outside the folder. The icons should still be shaking. Then press on the folder you want to move and slide it to the edge of the screen, left or right, until the folder moves to the next screen. Once you get it to the screen of choice, you can leave the apps in that folder or move them out by the same process. When you are done moving things around, press the Home button and the icons will stop shaking. Now they will stay put.
    Alternatively,my can sync your device with iTunes and move the icons around in the Apps windows in iTunes, then re-sync your device after you're finished. That will rearrange your icons on the device.
    Good luck!

  • HT1345 I have a new iPodtouch 5th generation.  I currently have a 4th generation.  Is there an easy way to transfer from one to the other or should I start a new setup?

    I have a new iPodtouch 5th generation.  I currently have a 4th generation.  Is there an easy way to transfer from one to the other or should I start a new setup?

    Click here and follow the instructions.
    (95861)

  • Is there an easy way to replace individual elements in one string array from another striing array?

    I have a string array with elements as follows:
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 5E 00 00 00
       00 00 50 00 30 00 33 00
       34 00 39 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
    The array I want to use to replace values with is:
    43 4E 31 30 30 33 30 30 31 41
    Where 43 goes in the 3rd row fifth position
    Where 4E goes in the 3rd row seventh position
    Where 31 goes in the 4th row  first position
    Where 30 goes in the 4th row third position
    Where 30 goes in the 4th row fifth position
    Where 33 goes in the 4th row seventh position
    Where 30 goes in the 5th row  first position
    Where 30 goes in the 5th row third position
    Where 31 goes in the 5th row fifth position
    Where 41 goes in the 5th row seventh position
    So the final array looks as follows:
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
       00 00 00 00 43 00 4E 00
       31 00 30 00 30 00 33 00
       30 00 30 00 31 00 41 00
       00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00
    Is there an easy way to replace an element of a string within an array with another element of a string within a different array?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    CMM_Add_SCAN_SN_2_PAT_DATA (temp).vi ‏13 KB

    Try this
    Omar
    Message Edited by Omar II on 03-24-2010 03:25 PM
    Omar
    Attachments:
    CMM_Add_SCAN_SN_2_PAT_DATA%20(temp)[1].vi ‏17 KB

  • Is there any easy way to compare LIKE Addresses from one table, which contains 3rd party data, to another table, our database source

    We have a 3rd party that is supplying us data and we need to compare the addressing between the 3rd party data to our source database addressing. I'd like to make it somewhat flexible meaning I'd like to somehow use the LIKE comparison rather than comparing
    the exact address values. (I have noticed that the 3rd party addressing sometime has a leading <space> at the beginning of the address...why I'd prefer to use LIKE)
    Is there any easy way to do this? Or does this dictate using a CURSOR and processing through the CURSOR of 3rd party data and plugging in the address LIKE as dynamic SQL?
    Please let me know your thoughts on this and I appreciate your review and am hopeful for a reply.

    Yes, it's possible and there are a variety of options but it's may not be for the faint of heart.
    The last time I did it, I ended up taking several passes at the data.
    1st pass was a straight up comparison with no modifications or functions.
    2nd pass was the same but with all special characters removed.
    3rd pass involved splitting the numeric portion of address and comparing just the street numbers and used a double meta-phone function (kind of like a soundex on steroids) to compare the street names.
    Jason Long

  • In Pages 5.0.1. is there any way to link one pages document to another pages document.  If so, How?

    Is Pages 5.0.1 is there any way to link one Pages document to another Pages document?  If so, Please, How?

    Well, you could trade it in for a white one! 
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."

Maybe you are looking for

  • How can i login to facetime?

    it displays a message that says "the server encountered an error processing registration"

  • Bug: unable to rename entity attribute (jdev903)

    Hi, I have an entity and a view on it. One of the entity attributes has the wrong name, so I tried to rename it, but jdev gave me a warning that it couldn't rename the attribute because the view is dependent on it. Sounds fair (although I wish it wou

  • When changing redo-logs on Primary, do I need to change my standby also?

    Hi, I need to resize my redo logs on a primary db which has a physical standby attached. Do I need to modify this standby or will the change propagate. It seems unlikely to me. thanx

  • Dynamic scrolling slideshow

    Hi there I am creating a shop website I am using DWCS3 and PHPMYSQL I can already create all the product pages that can be dynamically populated from a form...... I can add, edit and delete products from my admin section of my site .... using a form

  • DTP in Pages

    Just interested: can Pages act a bit as a DTP program. I.e. make simple magazines, print A3, make spreads, use pictures that are wider than one page? I make a simple magazine for our club, way too simple for InDesign or QuarkXpress. Thanks for your h