Duplicate  a record

Hi
IF HTMLDB has a wizard that can create a button to duplicate a record
Example;
the manager need to give a same task to five different employee, and he rather to duplicate the record five times and just change the username for the five employee
do I need to create a procedure to do this
any ideas??
Thanks
MM

Yeah, I wish there was an "official" method.
My method below does not involve creating a row and displaying it afterwards.
it seems to work.
Create a form on table with report.
The following changes occur in the form page, 5.
create a hidden item, p5_is_duplicating
default value N
create a button, duplicate_record
redirect to the same form page, 5.
we want the duplicate_record button to be visible
when p5_id is not null,
and p5_is_duplicating has 'N'
tried a few conditions, but the following seems to work.
if :P5_ID is null then
return false;
end if;
if :P5_IS_DUPLICATING = 'Y' then
return false;
end if;
return true;
put the same condition on the DELETE and APPLY CHANGES button.
these button of course are part of the create form wizard.
These three buttons should be visible or invisible at the same time.
still the duplicate_record button:
URL redirect
target: 5
set these items: P5_ID,P5_HOSTNAME,P5_SERIAL_NUMBER,P5_IS_DUPLICATING
with these values: &P5_ID.,,,Y
in other words, set P5_ID to the old value, and
p5_is_duplicating to Y.
in my app, I need the new record to have different values
in the hostname and serial_number columns,
so I set these to blank values, and the user is expected to
fill in these.
(The user can of course change other columns before saving data.)
change the condition on the CREATE button
:P5_ID is null or :P5_IS_DUPLICATING = 'Y'
originally, the CREATE button appears when the P5_ID is null.
Now I also want this button to appear when
p5_is_duplicating has 'Y'.
When the user presses the CREATE button,
we are inserting a brand new row with values
the user typed from scratch,
or with values carried from the original row,
including the P5_ID, with possible changes.
my table does not allow duplicate values in the ID column,
so I add an INSERT trigger to set ID to a new value
regardless.
create or replace trigger computers_trg
before insert on computers_t for each row
begin
select myseq.nextval into :new.id from dual;
end;
when the user goes off page 5, I need p5_is_duplicating
to be cleared. One way is to add "5" to the "Clear cache" field
in the unconditional branch and the CANCEL button.
again, the branch and CANCEL are part of the create form wizard.

Similar Messages

  • DTP Error: Duplicate data record detected

    Hi experts,
    I have a problem with loading data from DataSource to standart DSO.
    In DS there are master data attr. which have a key  containing id_field.
    In End routine I make some operations which multiple lines in result package and fill new date field - defined in DSO ( and also in result_package definition )
    I.E.
    Result_package before End routine:
    __ Id_field ____ attra1 ____  attr_b  ...___   attr_x ____ date_field
       ____1________ a1______ b1_________ x1         
       ____2________ a2______ b2_________ x2       
    Result_package after End routine:
    __ Id_field ____ attra1 ____  attr_b  ..___   attr_x ____ date_field
       ____1________ a1______ b1_________ x1______d1         
       ____2________ a1______ b1_________ x1______d2    
       ____3________ a2______ b2_________ x2______d1         
       ____4________ a2______ b2_________ x2______d2   
    The  date_field (date type)  is in a key fields in DSO
    When I execute DTP I have an error in section Update to DataStore Object: "Duplicate data record detected "
    "During loading, there was a key violation. You tried to save more than one data record with the same semantic key."
    As I know the result_package key contains all fields except fields type i, p, f.
    In simulate mode (debuging) everything is correct and the status is green.
    In DSO I have uncheched checkbox "Unique Data Records"
    Any ideas?
    Thanks in advance.
    MG

    Hi,
          In the end routine, try giving
    DELETE ADJACENT DUPLICATES FROM RESULT_PACKAGE COMPARING  XXX  YYY.
    Here XXX and YYY are keys so that you can eliminate the extra duplicate record.
    Or you can even try giving
        SORT itab_XXX BY field1 field2  field3 ASCENDING.
        DELETE ADJACENT DUPLICATES FROM itab_XXX COMPARING field1 field2  field3.
    this can be given before you loop your internal table (in case you are using internal table and loops)  itab_xxx is the internal table.
    field1, field2 and field 3 may vary depending on your requirement.
    By using the above lines, you can get rid of duplicates coming through the end routine.
    Regards
    Sunil
    Edited by: Sunny84 on Aug 7, 2009 1:13 PM

  • Getting Duplicate data Records error while loading the Master data.

    Hi All,
    We are getting Duplicate data Records error while loading the Profit centre Master data. Master data contains time dependent attributes.
    the load is direct update. So i made it red and tried to reloaded from PSA even though it is throwing same error.
    I checked in PSA. Showing red which records have same Profit centre.
    Could any one give us any suggestions to resolve the issues please.
    Thanks & Regards,
    Raju

    Hi Raju,
            I assume there are no routines written in the update rules and also you ae directly loading the data from R/3 ( not from any ODS). If that is the case then it could be that, the data maintained in R/3 has overlapping time intervals (since  time dependency of attributes is involved). Check your PSA if the same profit center has time intervals which over lap. In that case, you need to get this fixed in R/3. If there are no overlapping time intervals, you can simply increase the error tolerance limit in your info-package and repeat the load.
    Hope this helps you.
    Thanks & Regards,
    Nithin Reddy.

  • How to avoid 'duplicate data record' error message when loading master data

    Dear Experts
    We have a custom extractor on table CSKS called ZCOSTCENTER_ATTR. The settings of this datasource are the same as the settings of 0COSTCENTER_ATTR. The problem is that when loading to BW it seems that validity (DATEFROM and DATETO) is not taken into account. If there is a cost center with several entries having different validity, I get this duplicate data record error. There is no error when loading 0COSTCENTER_ATTR.
    Enhancing 0COSTCENTER_ATTR to have one datasource instead of two is not an option.
    I know that you can set ignore duplicates in the infopackage, but that is not a nice solution. 0COSTCENTER_ATTR can run without this!
    Is there a trick you know to tell the system that the date fields are also part of the key??
    Thank you for your help
    Peter

    Alessandro - ZCOSTCENTER_ATTR is loading 0COSTCENTER, just like 0COSTCENTER_ATTR.
    Siggi - I don't have the error message described in the note.
    "There are duplicates of the data record 2 & with the key 'NO010000122077 &' for characteristic 0COSTCENTER &."
    In PSA the records are marked red with the same message (MSG no 191).
    As you see the key does not contain the date when the record is valid. How do I add it? How is it working for 0COSTCENTER_ATTR with the same records? Is it done on the R/3 or on the BW side?
    Thanks
    Peter

  • The ABAP/4 Open SQL array insert results in duplicate database records

    Hi,
    Iam getting following error :
    The ABAP/4 Open SQL array insert results in duplicate database records.
    Error in ABAP application program.
    The current ABAP program "SAPLV60U" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    " Information on where terminated
    The termination occurred in the ABAP program "SAPLV60U" in "VBUK_BEARBEITEN".
    The main program was "SAPMSSY4 ".
    The termination occurred in line 503 of the source code of the (Include)
    program "LV60UF0V"
    of the source code of program "LV60UF0V" (when calling the editor 5030).
    Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
    the
    procedure "VBUK_BEARBEITEN" "(FORM)" but was not handled locally, not declared
    in the
    RAISING clause of the procedure.
    The procedure is in the program "SAPLV60U ". Its source code starts in line 469
    of the (Include) program "LV60UF0V "."
    Please assist how to proceed further ..
    Many thanks
    Mujeeb.

    Sorry, THe correct note is 402221.
    Description from the note
    << Please do not post SAP notes - they are copyrighed material >>
    Edited by: Rob Burbank on Feb 22, 2009 3:46 PM

  • How to rectify the error message " duplicate data records found"

    Hi,
    How to  rectify the error "duplicate data records found" , PSA is not there.
    and give me brief description about RSRV
    Thanks in advance,
    Ravi Alakunlta

    Hi Ravi,
    In the Info Package screen...Processing tab...check the option Do not allow Duplicate records.
    RSRV is used for Repair and Analysis purpose.
    If you found Duplicate records in the F fact table...Compress it then Duplicate records will be summarized in the Cube.
    Hope this helps.

  • Duplicate Data records occured while loading

    Hai Experts
    While loading Duplicate Data records occured earlier there was less no of records i used to delete the duplicate records in background in PSA. Now  i am having more records which i am confusing which to delete and which not to delete.  Since it is a flatfile loading with delta update mode. and when i went to infopackage it is showing   update subsequently in data target in hide position and i went through process chainipdisplay variant---- and made status red--- selected updated subsequently in data target
    ignore duplicate data records. and i want to trigger the subsequent process. if we go through process monitor i can rspc_process_finish. I i go display variant then what is the process.......................... is there any function module.

    Select the check box " Handle duplicate records key" in DTP on update tab.
    Thanks....
    Shambhu

  • Duplicate database records.

    Hi Gurus,
    I am trying to insert into a db table from an internal tbl. And the result return error as shown below:
    The ABAP/4 Open SQL array insert results in duplicate database records.
    How do  I solve this?
    Thank you in advanced.

    Hi,
    The following code can be used as a template to produce an ABAP which updates a particular database
    table field.
    *& Report  ZUPDATE_PRPS                                                *
    *&  Quick report to Update PRPS-FAKKZ database field                   *
    Report  ZUPDATE_PRPS.
    tables: prps.
    parameter: p_wbs like prps-pspnr,
               p_value like prps-fakkz default 'X'.
    data: wa_fakkz type prps-fakkz.
    *START-OF_SELECTION
    start-of-selection.
    call function 'CONVERSION_EXIT_ABPSP_INPUT'
         exporting
             input     = p_wbs
        importing
             output    = p_wbs
        exceptions
             not_found = 1
             others    = 2.
    select single fakkz
      into wa_fakkz
      from prps
    where pspnr eq p_wbs.
    if sy-subrc eq 0.
       update prps set fakkz = p_value where PSPNR eq p_wbs.
       if p_value is initial.
         message i999(za) with 'Billing element field has been unchecked'.
       else.
         message i999(za) with 'Billing element field has been checked'.
       endif.
    else.
      message i999(za) with 'WBS element not found'.
    endif.

  • User Exit to Search for Duplicate BP Records

    Hai Guys,
    I want to use a "User Exit" that gives me a warning message when I am creating a BP with the same name and zipcode which is already presnet in the system.
    Right now we are not getting any warning messgae and hence we are having duplicate BP records.
    SO I want the warning message pop up with the already created BP number presnet in the system.
    Your Help is Appreciated

    Hi Gregor,
    We are on CRM 5.0 and face a similar requirement of duplicate check for BPs. Can you please tell me if it can be achieved without using third party tools? If yes, could you please give an approach (BADIs that will have to be implemented). I'm on CRM 5.0 and could not find the views/tables CRMV_BP_* in TCode SM30. Please help.
    Thanks in advance,
    Vishal

  • He ABAP/4 Open SQL array insert results in duplicate database records

    Dear Gurus,
    II am getting a dump when I run MD02/ MD03. (t- code to run MRP)
    Below is the message system is showing:
    Please help
    Thanks in Advance
    Best Regards
    Adhish
    Short text
    The ABAP/4 Open SQL array insert results in duplicate database records.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLM61U" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "INSERT_MDSBI_IN_MDSB" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    1 *----
    2 * ARRAY-INSERT auf MDSB
    3 *----
    4 FORM INSERT_MDSBI_IN_MDSB.
    INSERT MDSB6 FROM TABLE MDSBI.
    7 ADD SY-DBCNT TO STATS-RESBI. "statistics
    8 ENDFORM.

    Hi,
    There must be inconsistency in the number range. This happens when the current number in the number range for dependent requirements is lower than the highest number in the database table of the dependent requirements RESB.
    Please check the current number in transaction OMI2. Here in the interval you can see the current number. Then please check the highest number in table RESB. If the current number in OMI2 is lower than the highest number in table RESB then this should be the reason for the dump.
    Check and revert. If that's not the case we'll look into other possibilities.
    In mean time check for SAP Note 138108.

  • ABAP/4 Open SQL array insert results in duplicate database records in SM58

    Hi Everyone,
    I am testing a file to idoc scenario in my Quality system. When I passed the input file, the mapping executed successfully and there are no entries in SMQ2 but still the idoc wasn't created in the ECC system. When I have checked in TRFC, I am getting the error  ABAP/4 Open SQL array insert results in duplicate database records for IDOC_INBOUND_AYNCHRONOUS function module. I thought this is a data issue and I have tested with a fresh data which was never used for testing in Quality but even then I am getting the same error.Kindly advise.
    Thanks,
    Laawanya

    use FM idoc_status_write_to_database to change the IDoc status from 03 to 30 and then  run WE14 or  RSEOUT00 to change the status back to 03
    resending idoc from status 03 ...is a data duplicatino issue on receiving side...why do u need to do that ?
    Use WE19 tcode to debug
    In we19
    1)U can choose your Idoc number in existing Idoc textbox
    2)Press execute
    3)u will display ur Idoc struct
    4)Dbl click on any field then u can modify its content
    5)PressStd Outbound Processing Btn to process modified Idoc
    Thats it

  • Duplicate data record

    hi can anbody help me out,can u tell me,in what senario we will get the duplicate data record  issue and what will be the solution?
    recently i joined the company and iam new to support work.
    please provide me step by step guidance.any help can be appriciateable.

    Hi sk ss 
    It depends try to search in our forum u will find n no of postings on this particular
    issue.
    Any ways
    In general it comes in the Master data loads .To avoid this we flag an option which
    is avilable in our info pak level.like Ignore double data records.
    Some times it comes under data level part as well at that time we will just rerun
    the Attribute change run and then restart the infopackage.
    <u><b>My suggestion Please do a search in our portal to get very clear about this issue .
    there huge no of postings on this..</b></u>
    Hope itz clear a little atleast...!
    Thanks & Regards
    R M K
    ***Assigning pointz is the only way of saying thanx in SDN ***
    **Winners dont do different things,they do things differently**
    > hi can anbody help me out,can u tell me,in what
    > senario we will get the duplicate data record  issue
    > and what will be the solution?
    > recently i joined the company and iam new to support
    > work.
    > please provide me step by step guidance.any help can
    > be appriciateable.

  • Duplicate data records error

    Hello
    IO is updated from ODS. System generates an error : duplicate data records.
    This is because keys of ods dont match keys of infoobject.
    I can build an other ods to aggregate data before loading to infobjects.
    Are there any ways to do it in start/end routine?
    Thanks

    there is Handle duplicate recors option in DTP
    Indicator: Handling Duplicate Data Records
    Use
    If this indicator is set, duplicate data records (that is, records with the same key) are handled during an update in the order in which they occur in a data package.
    For time-independent attributes of a characteristic, the last data record with the corresponding key within a data package defines the valid attribute value for the update for a given data record key.
    Issue solved
    Thanks a lot !

  • Duplicate Data Records indicator / the handle duplicate records

    Hi All,
    I am getting double data in two request. How can I delete extra data using "Duplicate Data Records indicator ".
    I am not able to see this option in PSA as well as DTP for "the handle duplicate records".
    can u help me to find the option in PSA/DTP.
    Regards
    Amit Srivastava

    What Arvind said is correct.
    But if you can try this out in an End Routine, this may work, Not sure though.
    Because then you will be dealing with the entire result_package.
    Also, say if the target that you are talking about is a DSO, then you can Delete Adjacant Duplicates in Start Routine while updating it into your next target. That can be a cube, for ex.

  • Duplicate data records through DTP

    Hi Guys,
    I am loading duplicate data records to customer master data.
    data upto PSA level is correct,
    now when  i am it from psa to customer master through dtp ,
    when in DTP in update tab i select the check box for duplicate data records then at bottom it shows the
    message that *ENTER VALID VALUE*
    After this message i am unable to click any function and repeat the same message again & again.
    So please give me solution that the above mentioned message shouldnt appear and then
    i will be able to Execute the data ?
    Thanks .
      Saurabh jain.

    Hi,
    if you get duplicate data for your customer there might be something wrong with your data source or the data in psa. But anyway, leave the dtp by restarting rsa1. Edit or create the dtp again and press save immediately after entering edit mode. Leave the dtp again and start editing it. That should do the trick.
    regards
    Siggi

  • Duplicate data records through DTP for attribute

    Hi Guys,
    I am loading data to customer master data, But it contains duplicate data in large volume.
    I have to load both attribute and text data .
    Data upto PSA level is correct, and text data also is loaded successfully.
    When i am loading attribute data to customer master ,it fails due to duplicate data records.
    Then in dtp with update tab, I select the check box for duplicate data records .
    As i select this check box ,at bottom it shows the
    message that *ENTER VALID VALUE* .
    After this message i am unable to click any function and repeat the same message again & again.
    So i am unable to execute the DTP.
    helpful answer will get full points.
    So please give me solution that the above mentioned message should not appear and then
    i will be able to Execute the data ?
    Thanks .
    Saurabh jain.

    Hi,
    if you get duplicate data for your customer there might be something wrong with your data source or the data in psa. But anyway, leave the dtp by restarting rsa1. Edit or create the dtp again and press save immediately after entering edit mode. Leave the dtp again and start editing it. That should do the trick.
    regards
    Siggi

Maybe you are looking for

  • Songs purchased showing in ITUNES and not in windows

    Thank you in advance for any help. I can not locate the files for the songs that I purchased, therefore when I click on the song in my "purchased" file, I get the exclamation point to the left and an error comes up telling me it can not play it becau

  • "Internal error occured", mac 10.9.5

    Hi, I've been at it the whole afternoon and still cannot find a way to get Adobe Reader to work on my macbook. (iOS 10.9.5) I followed Mike M's instruction on this thread: Adobe Reader 11 - An internal error occurred - Mac OS X 10.9.1 And tried to go

  • Runtime error Raise Exception Initial Product Catalog Replication

    Dear All, We are on CRM ISA MSA 5.0 SP8 & Trex 7 SP 30. Ours is a 3 system landscape. CRM Dev, Q, & P. Recently we added a new system in the landscape for Intergration Testing purpose. and its called as CRI which is a copy of the production Crm box.

  • Forms formatting limitation

    Hello! This is my first post. I am considering purchasing the 'pro' version of forms but I need to know if I can do what I need with that before I buy it. The free version so far has limited my formatting abilities, and for reference I am not a progr

  • Unable to Desktop Innerpage

    Hi, I am unable to see Desktop Innerpage while loading Portal Framework page and getting following error. Portal Runtime Error An exception occurred while processing a request for : iView : N/A Component Name : N/A com/sapportals/htmlb/AbstractCompos