How to make a duplicate record in oracle fomr

Hi,
I have a custom master-detail form in ebs. User wants to query a record and store a duplicate record in the database with modification of some column values.
I am using custom tables in data blocks.
Please guide me how can I do it.
Regards
Farooq

create a button and then insert a record based on the records queried:
when button-pressed:
insert into t_x() values();
commit;

Similar Messages

  • How to retrieve the duplicates records.

    Hi friends,
         My next issue, how to retrieve the duplicate records in web intelligence.I checked the option Retrieve duplicate records in web intelligence as well.But it is not helping me.
    Hope you guys are help to solve this issue.
    Thanks lot,
    Regards,
    -B-

    hi Blaji,,
    ive tried this here and it worked perfectly with me
    even so, you dont need to make the QTY as a dimension, you can leave it as a measure also, and it will work good with you.
    click the block on the WebI, the Block itself.
    and find its properties, under "Display", you will find
    "Avoid Duplicate row Aggregations"
    in the query it self you should flag "Retrieve Duplicated Rows"
    i think this will work fine with you
    good luck
    Amr

  • How to write jsp select record from Oracle  divide per page , about 50 reco

    Dear Expert,
    How to write jsp select record from Oracle divide per page , about 50 record per page.
    Thank you very much.

    I wish I could, but there is no single sign on module available for Fusion, also, so called Fusion is yet another Word With Big Letters, behind it there is yet another OC4J ( now Oracle switched to Weblogic though) container with bunsh of Oracle apps residing in it.
    Generally speaking, neither Fusion nor Oracle Apps user database does not have any single authentication module available out of the box to integrate user database.
    It's a long sad story running straight from Oracle Apps 11.0.5.
    That's why I've created JAAS single sign on login module and used it ever since at OC4J 10.2 and onwards at OC4J 10.3
    Back to the topic: to develop Apps and test them externally using the session bean I've isted above, one need to copy certain libraries from Oracle Apps server, then add them as libraries for JDeveloper project.
    Here is the complete list:
    oracle.apps.fnd.cache
    oracle.apps.fnd.cache
    oracle.apps.fnd.common
    oracle.apps.fnd.functionSecurity
    oracle.apps.fnd.metadata
    oracle.apps.fnd.security
    oracle.apps.fnd.util
    oracle.apps.jtf.cache
    oracle.apps.jtf.security
    Edited by: Faceless on Nov 26, 2009 3:04 AM

  • How to avoid retrieve duplicate records from SalesLogix

    I wanted to know if you could assist me.  I am now responsible for reporting our inside sales activities which includes (each month), outbound calls made, opportunities created, opportunities won $, etc.  We use SalesLogix as our tool.  I have been working with Business Objects exporting this information from SalesLogix and have pretty much created the report I need.  The only problem I have is it will pull in duplicate records with the same opportunity ID number because my query is based on u201Ccampaign codesu201D attached to SLX opportunities.  When an opportunity is created in SLX, it automatically assigns an opportunity ID (ex: OQF8AA008YQB) which is distinctive.  However, when we attach more than one u201Ccampaign codeu201D to this opportunity it pulls in opportunity ID that many more times.
    Is there a way to filter or only retrieve one ID record number regardless of how many campaign codes are attached?  All the information attached to the opportunity are the same with the exception that the "campaign code" is different which makes it two records since I pull by "campaign code"
    My greatest appreciation!

    Hi,
    If you are having CAMPAIGN CODE in your query and if you are displaying it in your report, then it would definitely display multiple rows for OPPORTUNITY ID for each CAMPAIGN CODE it has. 
    If you would like to have just one row for OPPORTUNITY ID, then you will need to remove CAMPAIGN CODE from your report.

  • How to find out duplicate record contained in a flat file

    Hi Experts,
    For my project I have written a program for flat file upload.
    Requirement 1
    In the flat file there may be some duplicate record like:
    Field1   Field2
    11        test1
    11        test2
    12        test3
    13        test4
    Field1 is primary key.
    Can you please let me know how I can find out the duplicate record.
    Requirement 2
    The flat file contains the header row as shown above
    Field1   Field2
    How our program can skip this record and start reading / inserting records from row no 2 ie
    11        test1
    onwards.
    Thanks
    S
    FORM upload1.
    DATA : wf_title TYPE string,
    lt_filetab TYPE filetable,
    l_separator TYPE char01,
    l_action TYPE i,
    l_count TYPE i,
    ls_filetab TYPE file_table,
    wf_delemt TYPE rollname,
    wa_fieldcat TYPE lvc_s_fcat,
    tb_fieldcat TYPE lvc_t_fcat,
    rows_read TYPE i,
    p_error TYPE char01,
    l_file TYPE string.
    DATA: wf_object(30) TYPE c,
    wf_tablnm TYPE rsdchkview.
    wf_object = 'myprogram'.
    DATA i TYPE i.
    DATA:
    lr_mdmt TYPE REF TO cl_rsdmd_mdmt,
    lr_mdmtr TYPE REF TO cl_rsdmd_mdmtr,
    lt_idocstate TYPE rsarr_t_idocstate,
    lv_subrc TYPE sysubrc.
    TYPES : BEGIN OF test_struc,
    /bic/myprogram TYPE /bic/oimyprogram,
    txtmd TYPE rstxtmd,
    END OF test_struc.
    DATA : tb_assum TYPE TABLE OF /bic/pmyprogram.
    DATA: wa_ztext TYPE /bic/tmyprogram,
    myprogram_temp TYPE ziott_assum,
    wa_myprogram TYPE /bic/pmyprogram.
    DATA : test_upload TYPE STANDARD TABLE OF test_struc,
    wa2 TYPE test_struc.
    DATA : wa_test_upload TYPE test_struc,
    ztable_data TYPE TABLE OF /bic/pmyprogram,
    ztable_text TYPE TABLE OF /bic/tmyprogram,
    wa_upld_text TYPE /bic/tmyprogram,
    wa_upld_data TYPE /bic/pmyprogram,
    t_assum TYPE ziott_assum.
    DATA : wa1 LIKE test_upload.
    wf_title = text-026.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
    window_title = wf_title
    default_extension = 'txt'
    file_filter = 'Tab delimited Text Files (*.txt)'
    CHANGING
    file_table = lt_filetab
    rc = l_count
    user_action = l_action
    EXCEPTIONS
    file_open_dialog_failed = 1
    cntl_error = 2
    OTHERS = 3. "#EC NOTEXT
    IF sy-subrc 0.
    EXIT.
    ENDIF.
    LOOP AT lt_filetab INTO ls_filetab.
    l_file = ls_filetab.
    ENDLOOP.
    CHECK l_action = 0.
    IF l_file IS INITIAL.
    EXIT.
    ENDIF.
    l_separator = 'X'.
    wa_fieldcat-fieldname = 'test'.
    wa_fieldcat-dd_roll = wf_delemt.
    APPEND wa_fieldcat TO tb_fieldcat.
    CALL FUNCTION 'MESSAGES_INITIALIZE'.
    CLEAR wa_test_upload.
    Upload file from front-end (PC)
    File format is tab-delimited ASCII
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = l_file
    has_field_separator = l_separator
    TABLES
    data_tab = i_mara
    data_tab = test_upload
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    IF sy-subrc 0.
    EXIT.
    ELSE.
    CALL FUNCTION 'MESSAGES_INITIALIZE'.
    IF test_upload IS NOT INITIAL.
    DESCRIBE TABLE test_upload LINES rows_read.
    CLEAR : wa_test_upload,wa_upld_data.
    LOOP AT test_upload INTO wa_test_upload.
    CLEAR : p_error.
    rows_read = sy-tabix.
    IF wa_test_upload-/bic/myprogram IS INITIAL.
    p_error = 'X'.
    MESSAGE s153 WITH wa_test_upload-/bic/myprogram sy-tabix.
    CONTINUE.
    ELSE.
    TRANSLATE wa_test_upload-/bic/myprogram TO UPPER CASE.
    wa_upld_text-txtmd = wa_test_upload-txtmd.
    wa_upld_text-txtsh = wa_test_upload-txtmd.
    wa_upld_text-langu = sy-langu.
    wa_upld_data-chrt_accts = 'xyz1'.
    wa_upld_data-co_area = '12'.
    wa_upld_data-/bic/zxyzbcsg = 'Iy'.
    wa_upld_data-objvers = 'A'.
    wa_upld_data-changed = 'I'.
    wa_upld_data-/bic/zass_mdl = 'rrr'.
    wa_upld_data-/bic/zass_typ = 'I'.
    wa_upld_data-/bic/zdriver = 'yyy'.
    wa_upld_text-langu = sy-langu.
    MOVE-CORRESPONDING wa_test_upload TO wa_upld_data.
    MOVE-CORRESPONDING wa_test_upload TO wa_upld_text.
    APPEND wa_upld_data TO ztable_data.
    APPEND wa_upld_text TO ztable_text.
    ENDIF.
    ENDLOOP.
    DELETE ADJACENT DUPLICATES FROM ztable_data.
    DELETE ADJACENT DUPLICATES FROM ztable_text.
    IF ztable_data IS NOT INITIAL.
    CALL METHOD cl_rsdmd_mdmt=>factory
    EXPORTING
    i_chabasnm = 'myprogram'
    IMPORTING
    e_r_mdmt = lr_mdmt
    EXCEPTIONS
    invalid_iobjnm = 1
    OTHERS = 2.
    CALL FUNCTION 'MESSAGES_INITIALIZE'.
    **Lock the Infoobject to update
    CALL FUNCTION 'RSDG_IOBJ_ENQUEUE'
    EXPORTING
    i_objnm = wf_object
    i_scope = '1'
    i_msgty = rs_c_error
    EXCEPTIONS
    foreign_lock = 1
    sys_failure = 2.
    IF sy-subrc = 1.
    MESSAGE i107(zddd_rr) WITH wf_object sy-msgv2.
    EXIT.
    ELSEIF sy-subrc = 2.
    MESSAGE i108(zddd_rr) WITH wf_object.
    EXIT.
    ENDIF.
    *****Update Master Table
    IF ztable_data IS NOT INITIAL.
    CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
    EXPORTING
    i_iobjnm = 'myprogram'
    i_tabclass = 'M'
    I_T_ATTR = lt_attr
    TABLES
    i_t_table = ztable_data
    EXCEPTIONS
    attribute_name_error = 1
    iobj_not_found = 2
    generate_program_error = 3
    OTHERS = 4.
    IF sy-subrc 0.
    CALL FUNCTION 'MESSAGE_STORE'
    EXPORTING
    arbgb = 'zddd_rr'
    msgty = 'E'
    txtnr = '054'
    msgv1 = text-033
    EXCEPTIONS
    OTHERS = 3.
    MESSAGE e054(zddd_rr) WITH 'myprogram'.
    ELSE.
    CALL FUNCTION 'MESSAGE_STORE'
    EXPORTING
    arbgb = 'zddd_rr'
    msgty = 'S'
    txtnr = '053'
    msgv1 = text-033
    EXCEPTIONS
    OTHERS = 3.
    ENDIF.
    *endif.
    *****update Text Table
    IF ztable_text IS NOT INITIAL.
    CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
    EXPORTING
    i_iobjnm = 'myprogram'
    i_tabclass = 'T'
    TABLES
    i_t_table = ztable_text
    EXCEPTIONS
    attribute_name_error = 1
    iobj_not_found = 2
    generate_program_error = 3
    OTHERS = 4.
    IF sy-subrc 0.
    CALL FUNCTION 'MESSAGE_STORE'
    EXPORTING
    arbgb = 'zddd_rr'
    msgty = 'E'
    txtnr = '055'
    msgv1 = text-033
    EXCEPTIONS
    OTHERS = 3.
    ENDIF.
    ENDIF.
    ELSE.
    MESSAGE s178(zddd_rr).
    ENDIF.
    ENDIF.
    COMMIT WORK.
    CALL FUNCTION 'RSD_CHKTAB_GET_FOR_CHA_BAS'
    EXPORTING
    i_chabasnm = 'myprogram'
    IMPORTING
    e_chktab = wf_tablnm
    EXCEPTIONS
    name_error = 1.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ****Release locks on Infoobject
    CALL FUNCTION 'RSDG_IOBJ_DEQUEUE'
    EXPORTING
    i_objnm = 'myprogram'
    i_scope = '1'.
    ENDIF.
    ENDIF.
    PERFORM data_selection .
    PERFORM update_alv_grid_display.
    CALL FUNCTION 'MESSAGES_SHOW'.
    ENDFORM.

    Can you please let me know how I can find out the duplicate record.
    you need to split the records from flat file structure into your internal table ans use a delete ADJACENT duplicates comparing fields
    split flat_str into wa_f1 wa_f2 wa_f2 at tab_space.

  • How to Prevent the Duplicate record insertion by JDBC Receiver?

    HI Experts,
    I have File Sender to JDBC Receiver scenario.I am using SAP PI 7.1 system.
    Purpose of this Scenario is to read the data from specified file and INSERT or  UPDATE the same records in Oracle Database.
    Before inserting the data I want to check in the same table for prventing runtime error(Key fields Duplicatin).
    So if records with the same key fields are available in table then I want to UPDATE the same record instead of INSERT.
    Please Suggest me the poosbile way.
    Thanks & Regards
    Jagesh

    Hi Jagdesh,
    The JDBC receiver format has the following structure
    <root>
    <StatementName1>
    <dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
    <table>Table1</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key>
    This structure creates a query in this way :
    UPDATE( OR UPDATE_INSERT) into Table1 set col1=val1 and col2 = val2new WHERE col2=val2old and col4=val4.
    The key field works like a Where clause. So for the receiver format when you specify the key, it checks the DB with that field as the where criteria. Hence for a UPDATE_INSERT query, when you specify the key field, it checks whether that value specified within the key field exists in the DB or not. Then it proceeds to execute the statement for only those values.
    Hence it makes sense to provide a primary key attribute in the key field of the JDBC receiver format.
    Regards,
    Kshitij

  • How to make connection between ASP and Oracle 8i

    Dear Helper,
    I have a problem about how to make the connection between ASP and
    Oracle 8i. If you have this idea, please help me to solve this
    problem. Thank You!!!
    null

    You must install Oracle Objects for OLE.
    After this in asp-script you may use following instructions
    1)initialization
    <%
    Set Session("OraSession") =server.CreateObject
    ("OracleInProcServer.XOraSession")
    set Session("OraData") = Session("OraSession").OpenDatabase
    ("service", "scott/tiger",0)
    %>
    2)open Dynaset
    <%
    Set EmpDynaset = Session("OraData").CreateDynaset("select 1 as
    f1, 2 as f2 from dual", 0)
    %>
    3)navigation
    <%EmpDynaset.MoveFirst%>
    <%EmpDynaset.MoveNext%>
    <%EmpDynaset.EOF%>
    4) Field access
    <%=EmpDynaset.Fields(1).value%>
    5) Sql execute
    Session("OraData").ExecuteSQL("delete xxx")
    Best regards.
    null

  • What to audit and how to manage the audit records in oracle 11gr2

    can anyone help me how to audit and manage the audit records in oracle 11gr2

    867726 wrote:
    can anyone help me how to audit and manage the audit records in oracle 11gr2
    Hi,
    I would recommend have a read this link for details http://download.oracle.com/docs/cd/E11882_01/server.112/e10575/tdpsg_auditing.htm#TDPSG50000
    Cheers

  • How to make a duplicate of a photo

    How do I make a duplicate of a photo that is on my mini

    Is it in iPhoto? Photos Menu -> Duplicate

  • How to make a single record datablock?

    Hi all,
    I got a data-entry form (9i) that will input a record one at a time and commit before entering another record.
    I try to set the block as single-record to yes but it gives error, and after checking with help, I understand that it can not work with database data block.
    Is there any idea on how to make the data block to show only one record? The problem is that after entering some data on the record, sometime the data-entry clerk may push the arrow-key that make form shows the next record items, which will be empty, and this will confuse the clerk!
    Thank you for your help.

    Add Triggers KEY-UP(DOWN, NXTREC, PRVREC...) to the following effect:
    NULL;
    or
    NEXT (PREVIOUS) _ITEM;                                                                                                                                                                                                                            

  • How to make a single recording into multiple songs garageband

    I recorded my band's gig the other night using my Zoom H2 recorder.  I want to take the single 1.5 hour recording (12songs) and make it into a CD with 12 individual tracks.  I would like to use garageband so i can edit out the deadtime between songs but I don't know how to make a CD.

    johndmalone wrote:
    I want to take the single 1.5 hour recording (12songs) and make it into a CD with 12 individual tracks
    http://www.bulletsandbones.com/GB/GBFAQ.html#chaptertocdtracks
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How can I view duplicate records in a table?

    Hello everyone,
    My question is very straight forward. How can I view all duplicate records?
    Thanks in advance,
    Sonya

    Easy enough,
    select t1.n1,t1.c1,count(*) as "TOTAL_DUPS" from tableA t1 having count(*) > 1 group by t1.n1,t1.c1 order by count(*) desc
    Tyler

  • How to make new database connection using Oracle BI Interactive Dashboards

    Hi,
    I install Oracle BI Intelligence on my system.
    I am using Oracle BI Interactive Dashboard. Here we have default database connection.
    but now i want to use it for my own database. Can any body give me guideline how to
    make a new data base connection using this s/w or how to connect to my database so
    that i can make my own reports.
    I am using
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html
    this link.
    i make odbc connection which is fine.
    but
    Restoring the Business Intelligence Presentation Catalog and Updating Metadata
    The third point blow above heading is not clear.
    Thanks

    Umesh - in order to build Answers and Dashboard content you must first setup a Physical model, then a Business model, followed by a Presentation Catalog/Subject Area.
    All these tasks are carried out using the Repository Administration Utility.
    1) Import your physical tables using OCI/ODBC into the physical layer.
    2) Build your model
    3) Deploy
    Then you're ready to start building answers/dashboards.
    Good Luck.

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

    Please see this link:
    Remove duplicate records ...
    sqldevelop.wordpress.com

  • How to make data base link from oracle 11g r2 to microsoft sql 2008 express

    I need to make data base link from oracle 11g r2 to microsoft sql 2008 express to make replication between then
    please help me !
    I didn't know what is the user and password in the command which create database link

    To replicate data you can ude Database Gateway for ODBC or Database Gatewy for MS SQl Server. Please use the search engine of this forum if you ant to get more details about each product.
    Some SQl Servers are set up to use Windows authentication only. In this case you won't be able to connect to the SQL Server as Windows authentication isn't supported with the gateways. You have to make sure your SQL server is supporting username and password authentication - a common user is the "sa" user. Regarding the username/password, please get in touch with your SQL Server Admin.

Maybe you are looking for

  • Error in po creation

    while creating a po using BAPI i am getting the error "enter G/L account number "......... can anybody let me know hw to rectify this error>...

  • Korean Language Printing

    Hi SDN, Im trying to print few details in the Korean Language from an SAP Script. I have made the changes to the existing script and the Print Preview comes perfectly fine. When I take the Print Out from the Spool Request, blank boxes get printed ins

  • Date Data difference from table

    DB : 11.1.0.7 I have one table and it has date column without time information. I would like to retrive data for missing consecutive dates more than 2 days. For Eg. Select * from xyz location date 1 05/10/2011 1 04/10/2011 1 01/10/2011 1 30/09/2011 1

  • Employee Photo in Who's Who iView

    Dear all, I need to display the employee photo in the ESS (Webdynpro) Who's who iView. Please let me know whether I can use KM for storing the employee photos and displaying it in Who's Who iView. If possible please let me know the config steps / gui

  • Srvctl config service should be updated using srvctl modify command

    Hai all, I have created a service recently on oracle RAC srvctl config service -d dbname -s servicename Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Failover type: NONE Failove