How to copy existing record

Hi All,
     i have one form which displays values from differnt tables. It show only 2 values from table "identification", depending on the value shown to user user will click button "Copy". Now i want to copy the current record from identification table and using these values new record will be created in identification table but i want to change the value of one column 'ident_c' to 'N' this value is static, "Identification" table has Composite Primary Key on two column includes ident_c.
     How can achieve this.
Regards
Rupesh.

hi,
Dont know whether this will help you..
You need to do this manually.
Create plsql process for the copy button pn submit computation.
source
declare
V_column2 type%table.columnname;
V_columnN number;
begin
select column2,column3,...column N into V_column2,V_Column3...V_columnN from identification where primarykeycolumnname=:P1_PKcolumnname; -- you need to pass correctly
insert into identification(primarykeycolumn,ident_c,column2,...column N)values(seqname.NEXTVAL,'N',V_column2,..V_columnN);
end;
when the user click copy button the passed primary key row will get insert with new seq value and static 'ident_c' ='N'.
is this your are focusing to get?
thanks
Mark Wyat

Similar Messages

  • How to copy  existing  row  value into new row  with a trigger. Same table

    Oracle guru,
    I am looking for a before or after trigger statement that will copy existing values inserted in the previous row into columns A & B. Then insert those values in a new row into column A & B if null? Same table. Hopefully my question is clear enough.
    -Oracle 10g express
    -I have an existing " before insert trigger" that insert id and timestamps when a new row is created.
    -Table is composed of column like id,timestamps,A,B and more.
    Thanks in advance
    Pierre

    957911 wrote:
    Oracle guru,
    I am looking for a before or after trigger statement that will copy existing values inserted in the previous row into columns A & B. Then insert those values in a new row into column A & B if null? Same table. Hopefully my question is clear enough.
    -Oracle 10g express
    -I have an existing " before insert trigger" that insert id and timestamps when a new row is created.
    -Table is composed of column like id,timestamps,A,B and more.
    Thanks in advance
    PierreI will call it a very Wrong design.
    It is a wrong Table Design. You are duplicating the data in table and not complying with the Database Normalization rules.
    How about Verifying if Column A & B are NULL before inserting and inserting another row and avoiding it in Triggers?
    If you are bent to achieve this, below code might be helpful. However, I would never go with this approach. If you would care about explaining the reason for going ahead with such a data model, people could suggest better alternative that might conform with Normalization rules.
    create or replace trigger trg_test_table
    after insert on test_table
    for each row
    declare
      pragma autonomous_transaction;
    begin
      if :new.col_a is null and :new.col_b is null then
        insert into test_table
        select 2, systimestamp, col_a, col_b
          from test_table
         where pk_col = (select max(pk_col) from test_table b where b.pk_col < :new.pk_col);
      end if;
      commit;
    end trg_test_table;Read SQL and PL/SQL FAQ and post the mentioned details.
    Do not forget to mention output from
    select * from v$version;

  • How to copy existing catelog,code group and code...

    Hi All,
    My requirement is how to copy all the existing catalog, code group and its codes from existing SAP system to excel? Because I need to upload all these from R/3 4.7 to ECC 6.0 or what is the best way to do that?
    Regards,
    Anish Ahya

    Hi Kapil,
    Thanks for your help. But I don't know how to use T code OIDW (Download catalog profile). It would be very helpful if you throw some light on this.
    Hi Ashish,
    Thanks.I guess this is the last option. Lets check whether any other standard solution is available or not.
    [Useful Info|Catalogs & selected sets;
    Regards,
    Anish Ahya

  • How to copy last record to a new record ?

    Hello,
    i have a question pls.
    i want to copy last record to every new record
    say,
    multirecord forms has : Tank_no Last_measured Lab_Denisty
    record1 : 1009aw 1532.94 .5796
    what i want to do next record is copying last record (record1 ) as
    record2 : 1009aw 1532.94 .5796
    so the user may change the Last_measured only and not to have to rewrite the Tank_no and the Lab_Denisty cause it doesn't change.
    May i do this ? if yessss, but How..?
    Regards,
    Abdetu..

    Hello poelger
    i check it then found the following code :
    DUPLICATE_RECORD Examples /*
    ** Built-in: DUPLICATE_RECORD;
    ** Example: Make a copy of the current record and increment
    ** the "line_sequence" item by one.
    DECLARE
    n NUMBER;
    BEGIN
    ** Remember the value of the 'line_sequence' from the
    ** current record
    n := :my_block.line_sequence;
    ** Create a new record, and copy all the values from the
    ** previous record into it.
    Create_Record;
    Duplicate_Record;
    ** Set the new record's 'line_sequence' to one more than
    ** the last record's.
    :my_block.line_sequence := n + 1;
    END; but then which trigger best fit the procedure should i use
    w-c-r or w-n-r-i Triggers
    and what is meant by line_sequence pls. ?
    Regards,
    Abdetu..

  • How to copy existing webdynpro component

    How to copy an existing webdynpro component

    Hi Venkatesh,
    Go to SE80 & open the source webdynpro component. Then right click on the component name & choose "Copy" option.
    Regards,
    Uday

  • How to Copy LSO records of an employee to another employee

    Hi LSO Experts,
    I have a requirement to copy existing employee's LSO records andassign the same to another employee. This scenario comes in when same guy is rehired with a Wrong iring action (having a new Pernr). Thus we need to allocate all his previous training details to this new pernr.
    I think FM LSO_GET_BOOK_PARTICIPANT will provide all training records details of a guy. However, what should be the appoach to copy these records to a brand new Pernr ?
    While digging up deep, I found, linking with LSO records with PERNR lies in the table HRP1001 and hrpad614. However linking field between these two tables are auto generated by SAP.
    I want to transfer all existing records of one employee to another employee. Please let me know the right aproach.

    Hi LSO Experts,
    I have a requirement to copy existing employee's LSO records andassign the same to another employee. This scenario comes in when same guy is rehired with a Wrong iring action (having a new Pernr). Thus we need to allocate all his previous training details to this new pernr.
    I think FM LSO_GET_BOOK_PARTICIPANT will provide all training records details of a guy. However, what should be the appoach to copy these records to a brand new Pernr ?
    While digging up deep, I found, linking with LSO records with PERNR lies in the table HRP1001 and hrpad614. However linking field between these two tables are auto generated by SAP.
    I want to transfer all existing records of one employee to another employee. Please let me know the right aproach.

  • How to copy a record into a new one

    I would like to copy a whole record into a new one. Duplicate_Record doesn't help, because I do not necessarily want to copy the last record, but any record.
    The user should be able to open a record and then call "copy" and the current record is beeing copied into a new one. The user can also choose "new record" and nothing will be copied into the new record.
    So, if I want to copy the record, it's always the last one that has been opened.
    Should I save the values from the last record in globals and pack them into the new record?

    Sorry, the data is very complex, so I can't give an example. But to say it in a simpler way: I would like to copy any record, opened by the user. But not the last record in the database -> therefore I can't use duplicate_record.
    Hope it is clearer this time?still you have not given the data and output which you want.
    But not the last record in the database
    what did you mean here...
    oracle doesnt have a track of the records which were inserted to the db.

  • How to copy a record with an Automatic Row Processing (DML) ?

    Hi,
    I want to duplicate (to copy) a record.
    I have a form, with an Automatic Row Processing (DML), looking for the PK stored into an item named P26_ID and populating the values into the corresponding items of the form.
    I have an Automatic Row Processing (DML) which permit to update, delete and modify the row.
    So far so good.
    I thought it would be good if I calculate a new value for the PK and stored it into the P26_ID.
    Then I thought the Automatic Row Processing (DML) would see that it is a new value for the PK and would "decide" insert a new record.
    But it does not work like that. I thought it was because the item P26_ID is database column type; so I switched to another item named P26_ID_NEW and put this new pk into this item. I then created another Automatic Row Processing (DML), triggered by this button, and which will look into this new item. It does not work either.
    Where do i go wrong ?
    Thank you for your kind help !
    Christian

    Christian:
    Assuming that the 'Duplicate' function is available only when the page is in 'Edit' mode, ie. a record has already been loaded into the form you can do the following to duplicate this record
    1) Define a button named 'Duplicate'
    2) Set the target of this button to be 'URL'
    3) Set the URL for this button to be
    javascript:duplicate();
    4) Add this bit of JS into the page HTML header<script>
    function duplicate() {
    $s('<name_of_PK_page_item>','');
    doSubmit('CREATE');
    </script>Varad

  • How to copy existing query report into new query report in SQ00

    Hi Experts,
    Hi Experts,
    I want to add fields "company code" "'region" to existing  query report AQZZ/SAPQUERY/FKF1============
    (list of vendor address) for this i done as following:
    1.In SQ01  go to "EDIT->other user group" and i selected user group as /SAPQUERY/FK
    2.I typed F1 in query field and click change button
    3.I clicked next screen button and entered into "change query f1: select fields screen".here i clicked "basic list" button and searched company code checkbox and saved it as result company code is appearing in the standard report"AQZZ/SAPQUERY/FKF1============"
    but unfortunately there is no region field(LFA1-REGIO) for this i think i should copy the existing  query report  into new query report(Ex:Z_LIST_OF_VEND) which should be 14 characters.please tell me briefly how to do this because this is first time i am using SQ00.
    one more issue is when i selected "edit-otheruser group" and choosing /SAPQUERY/FK  i  am getting only infoset "/SAPQUERY/FIKD" but i should need Info set: "/SAPQUERY/FIDD" please tell me how to add the previous one into user group.i think if i got /SAPQUERY/FIDD into usergroup  /SAPQUERY/FK i can add region also into Query report as i mentioned above by going SQ01 ...............................
    please help regarding this which should be very beneficiary to my carrier.
    Regards,
    naresh

    Hi Experts ,
    I solved issue by changing infoset in SQ02 by means of assigning field to field group and changed the query in SQ00.
    Regards,
    naresh.

  • How to copy LSMW Recording to SHDB

    Hi
    I created some complex Recording in LSMW , now i need to use this recording in SHDB (to make an ABAP program for use BDC) ; but this LSMW recording does not appears in SHDB.
    Does somebody knows how can i copy to SHDB some recording created in LSMW ?
    Any help will be appretiated.
    Regards
    Frank

    Hi Frank,
    The only solution I see is to download LSMW project, only the recording, open it and work out the file in Excel to format the columns as to the upload file format in SHDB.
    Regards,
    Edgar

  • How to Copy Existing values & make new entries in ISU Database tables TE609

    Hi friends,
    In SAP-ISU for a database table TE609(MR Reasons (Values))
    how can I maintain the new MR Reasons, when I press  F4 help, in the EL28 standard Transaction those new MR reasons must reflect in the Selection-screen.
    There is one Maintenance view TE609T, I maintained the entries in it, but those entries are not reflecting in EL28 Tcode when I pressed F4 Help.
    Please guide me in this...
    Thanks in Advance
    Ganesh

    Hello Ganesh,
    You are not dealing with the same Data Element (Meaning of the field).
    In EL28, it's ABLESGRE - Meter reading reasons for single entry
    On table TE609, it's ABLESGR - Meter reading reason
    If you take a look at the domain of ABLESGRE, ABLESGRE , you will see that there are FIXED VALUES, that's where come your values.
    For single entry (EL28), you can only use those values( Fixed Values from Domain of the Data Element).
    Maybe what you need is to find another transaction to enter Meter Readings and not SINGLE ENTRY.
    Don't forget to give me points if it's helping you.
    Kind Regards,
    Artur Moreira

  • How to copy existing apps into iTunes lib.??

    Hi
    I have recently added a 256GB SSD disc to my aging mac (MBP mid 2010) to increase its lifespan. And I have taken the preinstalled 500GB HDD and transferred to the optical bay. My Itunes library, was also transferred to an external HD to safe disc space. So far so good.
    Here's my problem:
    My wife's iPhone 5 has a terrible battery life. After trying all tips/tricks from various posts we decided to back up her phone, and via Itunes to erease all contend and start over. I can read that this has helped other Iphone user with bad battery life. Mind you, the her battery issue just started some months ago - before that there was no issue....
    So, after doing the safety copy via itunes and ereaseing everything and doing the reset of the device, we loaded the safety copy from Itunes again - but now she is missing 132 apps!!
    I found must of the apps on the old 500GB HDD, and have copied them to the itunes lib on the external HD. But Itunes is not recognising any of these, and will not install them on the iPhone...
    The copied apps shows up in itunes - but the icon is showed in grey only. The icon graphics is not showing. The name of the app is showed correctly.
    Oh, and her battery life, still *****....
    Any ideas??

    I use an excellent free application called Sharepod, http://www.getsharepod.com/about/ which will transfer all your music from your iPod to your PC, then you import this into iTunes. Just use the Backup iPod mode in Sharepod, and make sure it is pointing to the right destination folder. Test one track or album before you transfer everything.
    After this is complete add all the transferred music to iTunes. If you use Automatic be careful because syncing this will then erase everything on your iPod and transfer it back again from your PC! If you manually sync no problem.
    Be careful as an automatic sync to your new iPod will wipe it clean! BEFORE you connect your new iPod to iTunes go to iTunes and change this option to prevent this:
    +Edit-Preferences-Devices-Uncheck "Disable automatic syncing..."+
    Your other music that is on cd's, just copy them into your My Music folder and then add them to iTunes.
    Good luck!
    Greg

  • How to copy recorded live stream to new drive

    I was wondering if anyone out there knows how to copy a recorded live stream to a new drive on the server?  I can copy the file within the virtual app directory but not to another drive.
    The only solution i found was to edit the application.xml:
    <StreamManager>
            <StorageDir>e:\Sync\</StorageDir>
        </StreamManager>
    But unfortunately i need to rename the file once its recorded, and i'm having a hard time accessing that drive/directory where the file is located.
    Any help is greatly appreciated.
    thanks

    Hi,
    What I understood from your query I am providing you a solution:
    1. You can use the below to copy recorded live stream to new drive/directory in Application.xml
    <StreamManager>
            <StorageDir>e:\Sync\</StorageDir>
    </StreamManager>
    2. By default, a script can access files and directories only within the application directory of the hosting application. A server administrator can grant access to additional directories by specifying virtual directory mappings for File object paths. This is done in the FileObject tag in the Application.xml file, as shown in the following example:
    <FileObject>
          <VirtualDirectory>/_definst_;e:\Sync\_definst_\</VirtualDirectory>
    </FileObject>
    3. Create one application folder suppose test and then create main.asc file inside that which will have the below code
    application.onConnect = function(client) {
    application.acceptConnection(client);
    var fileObj = new File("_definst_");
    var fl = new Array();
    trace("File name : " + fileObj.toString());
    if (fileObj != null)
      if (fileObj.isDirectory)
       fl = fileObj.list();
       for (i in fl)
        trace("Directory : " + fl[i].name);
        if (fl[i].isFile)
         trace("File : " + fl[i].name);
         trace(fl[i].renameTo("dvrstream"+i));
        }//if closes
       }// for closes
      }//if closes
    }//if closes
    }// application closes
    This server side application rename files but since the folder which we had to access was outside application directory of the hosting application we had to map it using step 2.
    If this solution does not answer your query please be more ellaborative on what exactly are you trying to achieve. That will help me to answer your query correctly.
    Regards,
    Amit

  • I am trying to find out how to copy the image on my existing hard drive to my new hard drive before I install it so it will be like I didn't do anything.

    I am trying to find out how to copy the image on my existing hard drive to my new hard drive before I install it so it will be like I didn't do anything. Thanks for the info. on changing it.

    Format is found in the Erase Tab:
    The Disk Image is found on the Restore Tab:

  • How do I copy existing songs from Computer Hard Drive to IPOD 30GB

    How do I copy existing songs from Computer Hard Drive to IPOD 30GB? I am slightly learning disabled and have been unable to figure out how to add and or update. Thnaks

    If the songs are in iTunes and the iPod is set to sync automatically, the songs should already be on the iPod; if they aren't, follow the instructions in this article and post back with any error messages.
    If the iPod is set to sync manually, drag the songs onto the iPod in the iTunes source list.
    (21058)

Maybe you are looking for

  • How many apps can you have for sale with a CC Complete membership? (Not Pro or Enterprise)

    I have the CC complete membership (£46 p/m) I was under the impression I could only have 1 app for sale on the Apple store with this. But I've re-read the guidelines and it says I can have unlimited apps. I've been working on an ipad app, which has e

  • New in Adobe forms

    Hi all, i want to configure Adobe Document Service for using digital signature on all print programs. If anyone has implemented it, please provide docs/steps to configure ADS. Please guide me on this matter regards Asish

  • Reverse Telecine Question (Cinema Tools)

    Dear board members, I have footage that was shot with Panasonic AG-HVX200 in 1080i60 (29.97fps), but with 24p function with a 2:3 pulldown. When I ingest it in FCP through Log and Transfer this footage (for some peculiar reason) shows up as 1080p30.

  • Switch data block - Do you want to save changes ?

    As soon as I choose a record from my love "ORDERS_LOV", I simply want to display a new canvas and switch data blocks. but why does the system keep asking me to save changes when I choose a record ??? Here's my code: IF SHOW_LOV('ORDERS_LOV') THEN    

  • Rounding a float to an integer in this program

    Hello, I would like to be able to use floats in this program. If i input say 50.5 at the moment i get an error (the program compiles ok). What I want to happen is that i enter say 50.5, the program rounds this to 51 and then uses 51 thus not getting