Settings for update/insert new records

Hi everybody,
I'm at the beggining of learning the OWB in order to create a Data Warehouse environment.
I have successfully created a table in the target schema , which is a match of columns found in 4 tables in the source schema.
Which settings(steps) are necessary in order to update some records according to the update done in 4 tables in source schema , which have already been inserted in the table in target schema- using the execute pop-up menu command?
Additionally , how can I insert only the new records to the target schema by using the execute command in pop-up menu ...
Thanks , a lot
Simon

Hi Simon,
If you have constraints set on your target table, and the operator properties are set to "Match by Constraints = All Constraints", then the process recognizes automatically when to update which fields and when to insert new records.
If you have no constraints on your target then the operator properties are set to"Match by Constraints = No Constraints", and in this case you should set the Loading properties for each attribute (Field) in the target table.
Greetings,
Ilona Tielke

Similar Messages

  • Inserting new records into database table at runtime

    Hi all ,
    How to insert new records into database table at runtime on click update?
    Thanks.

    Hi Sasikala,
    Just for your understanding am giving a sample code snippet which you can use to read the contents of your Table UI element & save the data on to your database. Suppose you have a button up on pressing which you want to read the data from your screens table & save on to the database then you can proceed as shown below:
    1) Obtain the reference of your context node.
    2) Fetch all the data present in your table into an internal table using methods of if_wd_context_node
    3) Use your normal ABAP logic to update the database table with the data from your internal table
    In my example I have a node by name SFLIGHT_NODE and under this I have the desired attributes from SFLIGHT. Am displaying these in an editable table & the user would press up on a push button after making the necessary changes to the tables data. I would then need to obtain the tables information & save on to the database.
    data: node_sflight           type ref to if_wd_context_node,
            elem_sflight           type ref to if_wd_context_element,
            lt_elements            type WDR_CONTEXT_ELEMENT_SET,
           stru_sflight           type if_main=>element_sflight_node,
           it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = 'SFLIGHT_NODE'  ).
       lt_elements = node_sflight->get_elements( ).
    "   Get all the rows from the table for saving on to the database
        loop at lt_elements into elem_sflight.
          elem_sflight->get_static_attributes( importing static_attributes = stru_sflight ).
          append stru_sflight to it_flights.
        endloop.
    " Finally save the entries on to the database
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
    endif.
    However a word of caution here.... SAP doesn't ever recommend directly modifying the database through an SQL query. You would preferably make use of a BAPI for the same. Try go through Thomas Jung's comments in [here|modify the data base table which is comming dynamiclly;.
    Regards,
    Uday

  • Receiver JDBC: Error while doing the Deleting and Inserting new records

    Hi All,
              I am doing Idoc to JDBC scenario. In this I am collecting & bundling different type of Idocs and then sending to the JDBC receiver. My requirement is to delete the existing records in the database and insert the new records. I have configures as mentioned in the link
    Re: Combining DELETE and INSERT statements in JDBC receiver
    In the above link its shows for single mapping. In my scenario I am using multi mapping for collecting idocs in BPM. If I configured for normal mapping then it is working fine(Deleting existing records and Inserting new record). Whenever I am using multi mapping then I am getting following error in the receiver JDBC communication channel u201CError while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)u201D . Can you please tell me what might be the problem.
    Thanks & Regards,
    T.Purushotham

    Hi !
    check this out:
    JDBC - No 'action' attribute found in XML document - error
    JDBC receiver adapter: No 'action' attribute found in XML document
    It appears that the inbound payload (the one that is going from XI to the JDBC adapter) does not have the requiered tag to specify which SQL action to execute in the receiver system. Maybe the multimapping is not creating the desired output message format.
    Regards,
    Matias.

  • Problem with inserting new records in Oracle Forms

    Hi Friends,
    I am a new user to Oracle Forms and I need a help from you people. The problem is as follows:
    I have a data block in which I can display a number of records. In this data block the user will be able to edit the fields if no child records are found in another table. I have used when-new-record-instance to attain this scenario. All are text items. One item licensee_id which is made invisible by setting the property in property palette and required=no ( as this is the primary key of the table). Also the audit columns are made invisible.
    The code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
         v_cnt                          NUMBER;
    BEGIN
         SELECT COUNT (*)
    INTO v_cnt
    FROM id_rev_contracts
    WHERE licensee_id = :ID_REV_LICENSEES.licensee_id;
    IF v_cnt > 0 THEN
    set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_FALSE);
    ELSE
         set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_TRUE);
         -- set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', INSERT_ALLOWED, PROPERTY_TRUE);
    END IF;
    END;
    Now in this data block I should also be able to insert new records and for the same I have used PRE-INSERT trigger and the code for it is as follows:
    DECLARE
         v_alert_button NUMBER;
    CURSOR v_licensee_id IS SELECT id_rev_licensees_s.NEXTVAL FROM dual;
    BEGIN
    OPEN v_licensee_id;
    FETCH v_licensee_id INTO :id_rev_licensees.licensee_id;
    CLOSE v_licensee_id;
    IF :id_rev_licensees.licensee_id IS NULL THEN
    Message('Error Generating Next v_licensee_id');
    RAISE Form_Trigger_Failure;
    END IF;
    :ID_REV_LICENSEES.created_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.last_updated_by := :GLOBAL.g_login_name;
    :ID_REV_LICENSEES.create_date := SYSDATE;
    :ID_REV_LICENSEES.last_update_date := SYSDATE;
    EXCEPTION
    WHEN form_trigger_failure
    THEN
    RAISE form_trigger_failure;
    WHEN OTHERS
    THEN
    v_alert_button :=
    msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
    RAISE form_trigger_failure;
    END;
    Every thing is compiling fine but at the run time when I am trying to insert a new record I am receiving the following error:
    FRM-40508:ORACLE error:unable to insert record
    I also think the pre-insert record is not firing at the time of inserting a new record and saving it. So I request you to please delve into this problem and suggest me how to overcome this problem. Code snippets would do more help for me. If you need any other things from me please let me know. I will see if I could be of any help in that concern because I may not be able to send the entire form as it is.
    Thanks and regards,
    Vamsi K Gummadi.

    first of all
    pre-insert fires after the implicit/explicit commit/commit_form is issued and before the real insert is submitted to the db.
    i would suggest to remove the error handling part for the moment
    because i believe you might be getting "ora-xxxx cannot insert null"
    and also make visible the primary column to check if the pre-insert is executed.
    it would be better to make visible for a while the not null columns of the table/block
    i suppose that the block is insert allowed and you are using table as the source of the block and not any procedures or something...

  • Urgent help : how when insert new record navigation off

    hi master
    Sir
    when i insert new record by mistake press down key and curser move to next record and my need is
    When I insert new record or change any record that time my form navigation musht be off and no move to next record how I restrict to navigation please give me idea which event and what code I use
    Thanking you
    aamir

    If u want the cursor not to move ahead from a particular field when the records are inserted or updated on that field then u can just write null to the
    key-next-item trigger of that particular item.
    ie IN key-next-item
    null;
    Hope this is what you wanted.

  • How to insert  new records in Master and detail Forms.

    Hi,
    I am having trouble inserting values in both master and detail view at the same time. The scenarios is I have a Dept Table (View Object-VO1) and Employee Table(View Object -VO2) both linked with a foreign key, as per Default HR schema in Oracle DB XE.
    Now I want to insert new record in both Dept(VO1) and EMP(VO2) table via a New page say ( Page2 ). There is a button on Page1 with button INSERT .I can only drag-drop "CreateInsert" operation on that button for VO1 or VO2. So only text box for Dept records are enable to insert data but not Emp records. Is there a way I can insert data in both the tables at the sametime??
    Thanks,
    MB

    Hi MuradRabbani,
    You can programmatically call both createInsert Operations,
    Add to your pageDef both CreateInsert Operations.
    Create a button tha will call insert method from Master (VO1) and then call insert method for Detail (VO2)
    Here is an Example code of calling the operations:
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer(); //you need ADFUtils.java and JSFUtils.java classes. You can find them in the sample applications in your JDeveloper.
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO1");
    oper.execute();
    -----------------NOTE: at this point you should have set values that compine the ViewLink on the master in order the detail will know where to link the new record there are many ways to do it.
    As an approach try to overrdi the create Method on the in the ViewRowImpl of your Master vo (VO1)
    e.g.
    @Override
    protected void create(AttributeList attributeList) {
    //before
    attributeList.setAttribute("NameOfAttribute", valueHere);
    super.create(attributeList);
    After that you should call the operation for your detail VO2
    e.g.
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer();
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO2");
    oper.execute();
    The detail record will now have the values from your master automatically.
    Regards,
    Dimitris.

  • How to insert new record into altered table

    I am using JDBC with MySQL. I altered existing table and want to insert new record using java class. But it is not possible.How to do?

    How is it "not possible"?
    Either modify the Class for the new fields, or give the new fields default values (if applicable). If the type of an existing column has changed, then only the first option is available.
    Where's the problem?

  • Wanted to update the software now available, but it is asking for a pass code. As far as I remember in didn't put in any pass code , how do I settle this issue . Earlier updates were asking Apple ID but pass code for updating the new soft ware not known.

    Wanted to update the software now available, but it is asking for a pass code. As far as I remember in didn't put in any pass code , how do I settle this issue . Earlier updates were asking Apple ID but pass code for updating the new soft ware not known.

    Hello Kewal,
    Thank you for the details of the issue you are experiencing when trying to perform an update.  I recommend trying to update using iTunes, and as always, it is a good idea to make a backup first. 
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/ht1766
    Update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/ht4623
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How do I insert new record and get results on a landing page

    how do I insert new record and get results on a landing page

    It's not clear from your post what you are asking. In a SQL database, you use the INSERT statement to insert a row into a table. You use the SELECT statement to retrieve rows. Here's some basic info on how to do that within PHP
    PHP MySQL Insert Into
    PHP MySQL Select

  • Best practice for update/insert on existing/non existing rows

    Hello,
    In an application I want to check if a row exists and if yes I want to update the row and if not I want to insert the row.
    Currently I have something like this:
    begin
    select *
    into v_ps_abcana
    from ps_abcana
    where typ = p_typ
    and bsw_nr = p_bsw_nr
    and datum = v_akt_date
    for update;
    exception
    when no_data_found then
    v_update := false;
    when others then
    raise e_error_return;
    end;
    if v_update = false
    then
    /* insert new row */
    else
    /* update locked row */
    end if;
    The problem is that the FOR UPDATE lock has no effect for inserts. So if another session executes this part exactly the same time then there will be two rows inserted.
    What is the best way to avoid this?

    for me the 1st solution is the most efficient one.
    in your 2nd solution it seems to me that you're gonna create a dummy table that will serve as a traffic cop. well that possible but not the proper and clean approach for your requirement. you're absolutely complicating your life where in fact Oracle can do it all for you.
    First thing that you have to consider is your database design. This should somehow corresponds to the business rule and don't just let the program to do it on that level leaving the database vulnerable to data integrity issue such as direct data access. In your particular example, there's no way you can assure that there'll be no duplicate records in the table.
    this is just an advice when designing solution: Don't use a "Mickey Mouse" approach on your design!

  • How do you insert new records into multiple tables using the same unique primary key?

    I’ve created a PHP site and MySQL server using a free app called XAMPP.  I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database.  Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables?  In the SQL database, I defined the first field as ID and set it as the primary key with auto update.  So, when you insert a new record, it creates a unique primary key for that record.  In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?

    No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
    http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
    And the other using a PHP function:
    http://us3.php.net/mysql_insert_id

  • Auto Increment ID Field Table in the Oracle Database (insert new record)

    I have been using the MySQL. And the ID field of the database table is AUTO INCREMENT. When I insert a new record into a database table, I can have a statement like:
       public void createThread( String receiver, String sender, String title,
                                 String lastPostMemberName, String threadTopic,
                                 String threadBody, Timestamp threadCreationDate,
                                 Timestamp threadLastPostDate, int threadType,
                                 int threadOption, int threadStatus, int threadViewCount,
                                 int threadReplyCount, int threadDuration )
                                 throws MessageDAOSysExceptionand I do not have to put the ID variable in the above method. The table will give the new record an ID number that is equivalent to the ID number of the last record plus one automatically.
    Now, I am inserting a new record into an Oracle database table. I am told that I cannot do what I am used to doing with the MySQL database.
    How do I revise the createThread method while I have no idea about what the next sequence number shall be?

    I am still very confused; in particular, the Java part. Let me try again.
    // This part is for the database table creation
    -- Component primary key sequence
    CREATE SEQUENCE dhsinfo_page_content_seq
        START WITH 0;
    -- Trigger for updating the Component primary key
    CREATE OR REPLACE TRIGGER DHSInfoPageContent_INSERT_TRIGGER
        BEFORE INSERT ON DHSInfoPageContent //DHSInfoPageContent is the table name
        FOR EACH ROW WHEN (new.ID IS NULL) // ID is the column name for auto increment
        BEGIN
            SELECT dhsinfo_page_content_seq.Nextval
            INTO :ID
            FROM DUAL;
        END;/I am uncertain what to do with my Java code. (I have been working with the MySQL. Changing to the Oracle makes me very confused.
       public void updateContent( int groupID, String pageName, int componentID,
                                  String content, Timestamp contentCreationDate )
                                   throws contentDAOSysException
       // The above Java statement does not have a value to insert into the ID column
       // in the DHSInfoPageContent table
          Connection conn = null;
          PreparedStatement stmt = null;
          // what to do with the INSERT INTO below.  Note the paramether ID.
          String insertSQL = "INSERT INTO DHSInfoPageContent( ID, GroupID, Name, ComponentID, Content, CreationDate ) VALUES (?, ?, ?, ?, ?, ?)";
          try
             conn = DBConnection.getDBConnection();
             stmt = conn.prepareStatement( insertSQL );
             stmt.setInt( 1, id ); // Is this Java statement redundant?
             stmt.setInt( 2, groupID );
             stmt.setString( 3, pageName );
             stmt.setInt( 4, componentID );
             stmt.setString( 5, content );
             stmt.setTimestamp( 6, contentCreationDate );
             stmt.executeUpdate();
           catch
           finally

  • Insert New Record in Master Data by Code

    Hi guys,
    I need to insert a new value in an infoobject by code creating:
    1 new record in table P (data not time dependent)
    1 new record in table S (SID table)
    This code could be executed by many tasks in parallel and so it could create problems of concurrency in writing and in quality of the value of new SID selected.
    The first question is:
    THERE IS A STANDARD CODE THAT INSERT A NEW RECORD ALSO CREATING SIDS, managing concurrency in writing and reading?
    The second (if not answer to first)
    This is a part of my code (draft)... any suggestions:
    insert into TABLE P
    INSERT INTO /bic/pzck9idfl VALUES st_p_zck9idfl.
    IF sy-subrc = 0.
    FLAG = 1.
    WHILE FLAG = 0.
        SELECT MAX( sid )
        INTO v_sididfl
        FROM /bic/szck9idfl.
        ADD 1 TO v_sid.
    *record for SID table
        st_zck9idfl-sid = v_sid.
        st_zck9idfl-/bic/zck9idfl = v_idfl.
        st_zck9idfl-chckfl = 'X'.
        st_zck9idfl-datafl = 'X'.
        st_zck9idfl-incfl  = 'X'.
    insert record in SID Table
        INSERT INTO /bic/szck9idfl VALUES st_zck9idfl.
        COMMIT WORK AND WAIT.
    IF Sy-subrc = 0.
    SELECT SINGLE FROM /bic/szck9idfl
    WHERE SID = v_SID
    AND /bic/zck9idfl NE v_idfl.
    IF Sy-SUBRC = 0.
    FLAG = 1.
    ELSE.
    FLAG = 0.
    ENDIF.
    ELSE FLAG = 1.
    ENDIF.
    ENDWHILE.
    Thanks and points to helpful answer!
    ciao
    C@f

    Hi Claudio,
    I would not recommend to do this. Please have a look for standard fm to that job of have a look into the class library to find some methods. On the first look at your code here my comments:
    SELECT MAX( sid )
    INTO v_sididfl
    FROM /bic/szck9idfl.
    ADD 1 TO v_sid.
    Not a pretty good idea, as there is a number range object for getting a sid for each infoobject. If you get your sid like this, all later standard postings will fail with 'duplicate records'.
    *record for SID table
    st_zck9idfl-sid = v_sid.
    st_zck9idfl-/bic/zck9idfl = v_idfl.
    st_zck9idfl-chckfl = 'X'.
    st_zck9idfl-datafl = 'X'.
    st_zck9idfl-incfl = 'X'.
    if you mark all these flags with 'X' you will tell the system that this record is used somewhere in masterdata or in a datatarget and you cannot delete it with standard methods.
    regards
    Siggi

  • Best Settings for Audigy 2 ZS Recording Out to S-VHS or DVD Recor

    I?m recording some very machine intensi've video & sound to outboard devices. I'm using these outboard devices so that the recording process itself does not impact the demonstration performance.
    Concerning the sound out, I?m using the line & 2 out of the card, and running it through a pro level audio board (Mackie) for any adjustments & monitoring before taking the line out of the board into the recording device. When returning the sound for monitoring, I?m also running from the external device directly to the board and directly from there to either headphones or control room monitors. Thus, I?m using the Audigy for initial sound generation. So far, I've not really made any ajustments at the board other than level or balance. I like to keep things pretty flat in recording.
    I?ve looked around for recommendations as to the best settings for the Audigy card from its internal software for this situation, but find no ready reference. My concern is that I have the ?hottest? signal from this device, while being very concerned with audio quality. I?m looking for both ?punch? and ?clarity? of signal.
    Is there a document or source that would give me this direction? While I can move from this SB card to other more studio based cards, I?d like to keep the demo product in line with what the actual target audience would have in their machines, and be able to replicate at their workstation.
    For example, does the card function best at 00% (0db) output, or 50% (-5db) output?
    Or some setting in between...most likely...
    Or, is there some other setting I?m not aware of?
    I have what I believe are the latest card drivers and software suite, XP Pro, with every possible OS and other machine hardware update available.
    Thanks,
    Rich

    I?m recording some very machine intensi've video & sound to outboard devices. I'm using these outboard devices so that the recording process itself does not impact the demonstration performance.
    Concerning the sound out, I?m using the line & 2 out of the card, and running it through a pro level audio board (Mackie) for any adjustments & monitoring before taking the line out of the board into the recording device. When returning the sound for monitoring, I?m also running from the external device directly to the board and directly from there to either headphones or control room monitors. Thus, I?m using the Audigy for initial sound generation. So far, I've not really made any ajustments at the board other than level or balance. I like to keep things pretty flat in recording.
    I?ve looked around for recommendations as to the best settings for the Audigy card from its internal software for this situation, but find no ready reference. My concern is that I have the ?hottest? signal from this device, while being very concerned with audio quality. I?m looking for both ?punch? and ?clarity? of signal.
    Is there a document or source that would give me this direction? While I can move from this SB card to other more studio based cards, I?d like to keep the demo product in line with what the actual target audience would have in their machines, and be able to replicate at their workstation.
    For example, does the card function best at 00% (0db) output, or 50% (-5db) output?
    Or some setting in between...most likely...
    Or, is there some other setting I?m not aware of?
    I have what I believe are the latest card drivers and software suite, XP Pro, with every possible OS and other machine hardware update available.
    Thanks,
    Rich

  • How to insert new record in ALV GRID?

    Hi all,
       I am displaying ztable data into grid format using method  SET_TABLE_FOR_FIRST_DISPLAY of Class CL_GUI_ALV_GRID using OOPS concept.now i want to insert a new record into ALV grid?
    If anyone has tried then please tell me?
    Thanks and Regards,
    Arpita

    Hi Avinash,
    Thanks for replay.
    My problem is solved.i did it as follows.
    HANDLE_DATA_CHANGED
          FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
               IMPORTING ER_DATA_CHANGED
                           E_UCOMM.
    METHOD HANDLE_DATA_CHANGED.
    LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO WA_GOOD_CELLS.
    CASE WA_GOOD_CELLS-FIELDNAME.
      WHEN 'ZCARRID'.
          CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE
              EXPORTING
                I_ROW_ID = WA_GOOD_CELLS-ROW_ID
                I_FIELDNAME = WA_GOOD_CELLS-FIELDNAME
              IMPORTING
                E_VALUE = ZCARRID1.
         WA_FLI-ZCARRID = ZCARRID1.
    ENDMETHOD.
    Using method CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE,
    i am reading individual values and assinning it to WA and then insert into ZTBALE.
    Thanks,
    Arpita

Maybe you are looking for

  • How to monitor a specific transaction in Solution Manager ?

    Hi all, I have configured the Service Level Reporting and it works correctly. But i don't know how to monitor a specific transaction like SM21, DB02, FB01N etc... ? In the SL Reports configuration steps, we can configure this option : Select Business

  • TS3694 error code 3914. Does anyone know how to solve this problem? My ipod touch is stuck in recovery mode. would be grateful of any help.

    Ive been trying to restore my ipod touch and it comes up with the error code 3914. Also, the ipod is stuck in recovery mode. Can anyone help?

  • SRM Catalog

    Hi experts, I want to create a catalog in SRM without using mdm. I am new user and I have not able to find out how can i create a catalog. Please can you guide me which t-code i have to use or where it is placed in IMG? Best Regards

  • Play Sound Rule Acting Backwards

    Hi, I've created a Mail rule that my MPB should play a sound when From is my wife's email address. However, incoming mail from her does not play the sound. The odder thing is that when I email her -- which is to say when mail goes out -- the sound pl

  • Timer & Fade effect

    One more question then I'm done for the day. I'm using a timer to change the index on my combobox (I'm sure there's a better way but its working) which is pulling slide data from an XML file.  I would like to crossfade between slides.  Is see there i