How to create new record with old values

Dear all
i have creation page with 45 fields are there
user will enter all the fields and save it will call to non editable mode
if user will click on change button it will call to editable mode
in that my requirement is user wont change among those ites(45 items)clcik on save again it will call to view mode
in that user will change any one of the value among 45 items and click on save button i need to create one more record in database
if user wont edit any one of the field out of 45 items i dont want to create new record in database
how can we achieve thsi functionality
Regards
Sreekanth

Hi Srikant,
When user may edit the record, the same row may get updated in vo. Thus over writing existing row instead of creating new row.
Approach1..
On the page where user may edit records, instead of presenting records of existing row, present copy of existing row. So
In AM... (Later on you can put vo logic to its proper place, i.e. vo java file)
public void viewPageCallSetup()
Row originalRow=vo.createRow();
Row dummyRowForEdit=vo.createRow();
//COPY THE ORIGINAL ROW TO DUMMY ROW. IF THERE IS DIRECT METHOD TO CREATE COPY OF EXISTING ROW, THAT MAY BE MUCH BETTER.
for(int i=0;i<vo.getAttributeCount()-1; i++)
dummyRowForEdit.setAttribute(i, originalRow.getAttribute(i));
vo.insertRow(dummyRowForEdit);
vo.setNewRowState(Row.STATUS_INITIALIZED);
vo.setCurrentRow(dummyRowForEdit);
call this method in contoller's processRequest..
string oid=pagecontext.getparameter("oid");
if(pageContext.getparameter("Purpose").equals("Edit")) //Means user clickED the edit button so we need to replicate the row
am. viewPageCallSetup(oid); //calling this method in am
else
In PFR...
if(pageContext.getparameter("Purpose").equals("Edit"))
am.xxcostedit(oid); //calling this method in am
in case user selects "Cancel" on edit form,we need to remove the duplicate row. So in AM write a method to remove the duplicate rowd on click of "Cancel" button on edit form.
Rest of the logic is same for "Save" button. Just say commit.
Abdul Wahid

Similar Messages

  • How to create a matrix with constant values and multiply it with the output of adc

    How to create a matrix with constant values and multiply it with the output of adc 

    nitinkajay wrote:
    How to create a matrix with constant values and multiply it with the output of adc 
    Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Creating new database with old database datafile

    is it possible to create new database with old datafile
    i lost my database ,i have no back up, just i have datafiles,
    i want to create new database and want to create tablespaces with old datafiles
    pls suggest me right one
    tahnk you

    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 339559282 generated at 03/09/2008 12:23:01 needed for thread 1
    ORA-00289: suggestion : F:\ORA9IAS\RDBMS\ARC01901.001
    ORA-00280: change 339559282 for thread 1 is in sequence #1901
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log 'F:\ORA9IAS\RDBMS\ARC01901.001'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'F:\ORA9IAS\ORADATA\IASDB\SYSTEM01.DBF'

  • How to create new docs with custom swatch palette?

    Looking to create new documents with a corporate color palette already available instead of having to load the .ase files. Fat chance?

    Thanks Bob - I was trying that on a test MAC and it just was not sticking. A shutdown instead or a restart seemed to put things back in order and now all is good.

  • How to create new user with more than one default folder

    hi
    A new user created in OCS has only one default folder(Inbox).
    I want to create new user with customized default folder.
    for example:
    a new user has more than one default folder(Inbox,Outbox,Draft,Dustbin...)
    And also I want to automaticly enable the functions:
    When sending messages, place a copy in Outbox
    Keep message drafts in Draft
    Move deleted messages to Dustbin
    who know that?
    thanks

    The same reason that Apple and 3rd Party vendors put multi-size templates in one file I expect. I am trying to construct an in-house standard template for use in our company, and it is easier to manage if there is only one file to send to people rather than many - both initially and for subsequent edits / updates to the template.
    Of course it would be possible to create several templates (one for each size). But since it is clear that templates can be combined, it appears sensible to do this - unless the doing of it is horridly complicated

  • IP: How to create new records in an empty (but planable) Cube

    Hi specialists,
    I'm looking for a way to add new records to a (so far) empty but planning-enabled cube.
    As soon as I inserted some records via the data-loading-process (from a datasource), I can change the planable key-figures and I can add new lines/records to the cube.
    But if I delete all data from the cube (or start from scratch with an empty cube), the Web/BEx Analyzer only tells me that there're no (filter-fitting) Data in the cube. It does not present the new-line input-fields.
    What might be the problem here ?
    Or is the creation of new records in an empty cube not allowed by concept/design ? (What is about a cube which should only be used for planning, which hasn't any actual or pre-planned values already stored ?).
    Thanks for your hints in advance !

    Sorry - found the problem on my own.
    By mistake the Real-Time Cube was still in "data-loading-enabled" (instead of "planning-enabled") mode.
    So the problem isn't one - Thanks for your attention.
    Edited by: Marco Simon on Jan 24, 2008 11:23 AM

  • How to create new database with rman backup

    hi,
    i took a rman backup with nocatelog. can i make a new database with that rman backup.
    if yes then how ? i m using oracle 9i.
    thxs

    'NEW' doesn't seem to be the right word here, but you can DUPLICATE (clone) an existing database or restore it to a new host:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm
    Werner

  • How to create new Database With existing Backup

    hi all
    my Scenario is
    i have full backup of my database(11g r2 64)
    i formatted my system and reinstall
    h3. Windows 7 ultimate 64
    how to create the same Database as it was earliar?
    i have
    h3. Oracle 11g r2 same as backedUp 64
    h3. Full Backup Through eterprise manager
    Thanks to all
    Edited by: Rajneesh on Sep 27, 2011 10:53 PM

    You can create a clone database using DUPLICATE DATABASE command as it's shown in the following video tutorial:
    http://kamranagayev.com/2010/06/25/rman-video-tutorial-series-creating-duplicate-and-standby-database-using-rman/
    Or perform disaster recovery using backup files using the following video tutorial:
    http://kamranagayev.com/2010/03/29/rman-video-tutorial-series-performing-disaster-recovery-with-rman/

  • Unable to create new records with FOX formula (IP)

    Dear Guys,
    We created a FOX formula that could not create any records within an empty infocube (got 0 records read, 0 created, 0 changed, 0deleted). how to change this formula to make sure record are created?
    DATA K_0FISCPER3 TYPE 0FISCPER3.
    FOREACH K_0FISCPER3 IN SELECTION.
         { 0AMOUNT, K_0FISCPER3 } = 100.
    ENDFOR.
    Many thanks!
    Kind Regards
    Olivier DESFOUR

    Hello,
    this behaviour is explained in the docu.
    Internal Data Objects and Address
    The internal data objects that are edited are subsets of the transaction data contained in the planning package. The user executes a planning function by selecting a package and a parameter group. This package is divided into smaller data objects made up of transaction data. If a formula requires reference data, these data objects are also created from this reference data. Note: If it is not possible to create data objects, a formula is not executed.
    You will find this detailed docu, if you press F1 in the formula editor in transaction BPS0.
    For BI-IP this detailed docu will be part of one of the next docu shipments.
    The docu belongs to the data element UPC_Y_FLINE. Therefore you can access the docu from the transaction SE11. Choose data type = UPC_Y_FLINE. Press the button DISPLAY.
    Best regards
    Hans-Juergen Schwab

  • HT3622 how to create new playlists with second ipod device

    I have just bought a ipod touch when I also have used an older ipod, my question is when I try to create a new playlist for my new ipod I can not make it happen the new playlist keeps being created under my old playlists and when I try to drag the playlist to my new device I can not move it. thanks all

    Hi,
    Welcome to MSDN.
    I am afraid that this is not the proper forum for this issue, since each  Magnetic Card Reader writer has its API for developers.
    You could consider getting supports by connecting with the publisher of that Magnetic Card Reader writer which should have the sample about using its API.
    In addition, I did a research, you could refer to
    Build a .NET Class for Serial Device Communications with P/Invoke to get how to communicate with that serial device.
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create new user, with same personal files, for troubleshooting?

    I cannot find this answer in "Finder Help", nor in the Community discussions thus far. What I must do to troubleshoot the spinnign beach ball: My next step: I must troubleshoot my friend's iMac running Mac O.S 10.6.8 by setting up a new user, called "Test". This I can do easily. However, what I am unsure of is this: as this "new user", actually just me as a tester, I must be able to access the same email, Word files, Desktop, photos, etc. that I used to access. How, then? Copy all into a shared folder or what? There must be a less cumbersome way. I do NOT wish to delete anything. Of course, I have justmade a perfect backup of everything on my hard drive. Please advise re my next step: sharing the "User" little house files, with myself, as the new, possilbly temporary, user. Thank you so much, anyone and everyone!

    You shouldn't do any of that for troubleshooting. The test user account should be pristine. If you copy stuff from the old account, then you also copy whatever is causing a problem.
    Just use the Accounts/Users & Groups preferences to create a second user called, "test." Make this user an admin user. Then log out of the old account and log into the new one. That's it. You can still access and use applications in the Applications folder if you need to test third-party applications.
    We could be more helpful if you explain just what you need to troubleshoot. If just the spinning beachball is your issue, then visit The XLab FAQs and read the FAQ on resolving the SBOD problem.
    If the computer is simply running slowly then read the following:
    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    Repair the Hard Drive - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • How to create a table with distinct values ?

    I want to create a new table based on an existing table distinct values only, how can I avoid to create the duplicate values ?
    e.g.
    table1
    field1 field2
    0001 ABD
    0001 ABD
    0002 DCF
    0002 DCF
    new table
    field1 field2
    0001 ABD
    0002 DCF
    thanks

    create table table2
    as
    select distinct field1,field2
    from table1

  • How to set new extreme with old extreme

    how do I set up a gen 3 airport extreme using ethernet wire to newest extreme just bought it yesterday, not set up yet)  to extend  wireless network to far side of house

    I am using my IMac osx 10.8 to make any changes to network and will use it to set up new AEBS,
    Got it, the new AEBS will be the "main" router on the network.
    where I want to put my 3 gen AEBS  as a wired extender of network
    Got it, the older 3rd Gen AEBS will connect to the new AEBS using a wired Ethernet connection and extend the nework.
    Anyway. is this how I should set up my network to extend it with using my gen 3 APBS  and with my new APBS 6h gen?
    Once you have the new AEBS set up and working as your "main" router, other than making the physical Ethernet connection and typing in a device name that you want to use on the 3rd Gen AEBS, AirPort Utility will take care of all the settings for you automatically. You do not need to worry about any of this.
    2nd question, if I get a new AXAC will I get better speeds or will I just get N speeds?
    Not sure what you are asking. Only the new AEBS (and Time Capsule) will deliver 802.11"ac" speeds. Your 3rd Gen AEBS will deliver "n" speeds as will an AirPort Express.
    3rd. can i after I set up a roaming network then use my old AX (A1264) to stream music to speakers/stereo?
    Yes
    will it be able to be wireless, or will the dreded Apple rule of not using 3rd repeater come into play?
    Wireless
    Also do you have any fixes for Roku 3 not playing well with the new APBS
    Sorry, I have no "hands on" experience with any Roku products, so cannot help on that.
    Suggested plan:
    First, get the new AEBS set up as your new "main" router and check it out for proper operation. AirPort Utility will guide you through the setup.
    Post back when you have done this and then I will provide tips on how to set up the 3rd Gen AEBS to extend the network using Ethernet. Setup is very easy if you follow the steps.
    Once the 3rd Gen AEBS is setup and working, then the A1264 AirPort Express will get attention. Setup will very easy using AirPort Utility.

  • How to create New IDOC with refrence to existing IDOC.

    Hello All,
    In the MATMAS  Material master data IDOC the special procurement type should consider the special procurement flag = VI also. At present the  functional module IDOC_INPUT_MATMAS01 only take the special procurement flag = KA into account.
    IDOC is in 05 status.
    I want to Create a test IDOC copying the existing IDOC and change the SOBSL to VI to check if that is successful.
    Please suggest,.
    Thanks in advance.
    Forum Shah

    Hello,
    I have made the changes with the partner profile.. WE20... and got the processing IDOC staus "03" ie "Translation ok".
    how do i create a new IDOC to check if its working well?
    Is there any need to add anything in the function module?

  • How to create a prompt with default value as current_date?

    Hello
    I'd like to create a prompt on the dashboard that has current_date as the default value. Is it possible to achieve so?
    Please provide any pointers..
    Thank you

    Unfortunately, no. Presentation variables are declared in a dashboard prompt (see page 44 of this link http://download.oracle.com/docs/cd/B40078_02/doc/bi.1013/b31767.pdf)
    Any other type of workaround would not be worth the trouble of asking the developers to create the variable for you. One note, the current date may very well already be defined and just not known to you. Can you ask your developer if he/she has a variable that contains the current date or how long it would take to create one for you?
    As a whole, it would be nice to have a set of "date" repository variables if you run Requests based on common date ranges (e.g., first day of current month, last day of current month, first day of quarter, last day of quarter, most recent end-of-year date, etc.) These can be very useful in automating reports so they don't require prompts. Of course, it depends on your organization and what you use OBIEE for...
    We have built many such variables and it has been very valuable to the users and report builders. Just a thought...

Maybe you are looking for