How to delete the Table Contents before inserting records into SQL table ?

Hello Experts,
        I have a scenario where in I have to Pick up some records from SAP RFC & insert into SQL table.
        i know how to do this scenario but the proble with this is before inserting we first have to ZAP the SQL table & insert a new records. One more twist is The Triggering is happening from SAP side with Sender RFC. If this would have been from SQL Side i could have written a Stored Procedure/ Trigger & could have called this before the SENDER JDBC communciation channel picks up the Triggering event from SQL side.
So how to do this scenarioin XI, First deleting all the Records of SQL table & then inserting the new reocrds. without using the BPM.
Regards,
Umesh

hi umesh,
you can achieve this by writing SQL query in message mapping level..
refer this link:
http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
regards.

Similar Messages

  • How to delete the complete contents of database table ? should be empty !!

    Hi Guys,
    I have requirement where i have delete the contents of database table..i have make it empty (no records at all) and then i have to fill it with the records from the excel sheet.
    I can upload data from the excel sheet.
    Please tell me how to delete the complete contents of the database table ??
    Regards
    Rahul

    hi ,
    just write like this,
    delete from <database table>.
    commit work.
    sample code, here edpar is database table.
    delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    that's all it works.
    reward points if helpful.
    regards,
    seshu.

  • ADF Desktop Integration : How to delete the table in Excel?

    Hi,
    I am using Jdev 11.1.1.3.0 and Excel 2007 for Oracle ADF DI, I had created an ADF table using pageDef file in the excel. Now I wanted to delete that table and use a different pageDef file.
    I could not find a way to delete that table.
    I deleted full row of tables and then I used different pageDef file and created a new adf table. But when I am running this version of excel, I am getting runtime exception and excel is getting corrupted.
    My question how to delete the table not corrupting the Excel.
    Thanks
    Pavan

    Pavan,,
    Welcome to OTN.
    You can delete the table by selecting the top left column (of the table) and then select delete from the ADFdi tab.
    Refer the documentation for more info.
    http://docs.oracle.com/cd/E17904_01/web.1111/e10139/get_start_dev_tools.htm#ADFDI608
    -Arun

  • Error with date field when inserting records into sql server from webdynpro

    Dear SDN's,
    I am trying to insert the records into sql server through my webDynpro program.
    I have created a date field in a dictionary with the datatype date.
    In my webdynpro program to insert the date i am following the below format.
    String dateString = "2006/12/10";
          java.util.Date d=new java.util.Date(dateString);
          java.sql.Date <b>date</b> = new java.sql.Date(d.getTime());
    int i=stmt.executeUpdate("INSERT INTO TRAVEL_HEADER(TRQID,PROJECTID,<b>REQDT</b>,ADVCE,ETADV,PURTR) values(21, '555-1212', '" + <b>date</b> + "', 5000, '20060501','hi')");
    when i try to execute it, it gives the following error.
    <b>com.sap.sql.log.OpenSQLException: The SQL statement "INSERT INTO "TRAVEL_HEADER" ("TRQID","PROJECTID","REQDT","ADVCE","ETADV","PURTR") VALUES (21,'555-1212','2006-12-10',5000,'20060501','hi')" contains the semantics error[s]: - type check error: new value (element number 3 (CHAR)) is not assignable to column  >>REQDT<< (DATE)</b>
    Please correct me.
    Your help will be appreciated.
    Regards,
    Sireesha.B

    Hi,
    int i=stmt.executeUpdate("INSERT INTO TRAVEL_HEADER(TRQID,PROJECTID,REQDT,ADVCE,ETADV,PURTR) values(21, '555-1212', 'date', 5000, '20060501','hi')");
    try like this.
    I Think in SQL the general format to take date as input like this.
    INSERT INTO X VALUES ('10/30/56')
    thaks,
    Lohi.

  • How to delete the table entries (created data )

    in which table the created data will be get stored i need to delete it programitically can any one help me out in this, plz tell me the table name where the created data will be get stored.

    Hi
    Rocky
    use the delete statement
    the information regarding delete is
    DELETE dbtab
    Syntax
    DELETE { {FROM target [WHERE sql_cond]}
           | {target FROM source} }.
    Effect
    The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.
    System Fields
    The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Meaning
    0 A least one row was deleted.
    4 At least one row could not be deleted, since it was not found in the database table.
    The statement MODIFY sets sy-dbcnt to the number of deleted rows.
    Note
    The rows are deleted permanently from the database table in the next database commit. Until then, you can cancel the deletion in a database rollback.
    plzz reward if helpfull dont forget to reward if helpfull..
    for any further quiries my mail id is
    [email protected]

  • How to make the Tabular Form for Inserting records only?

    Hello Experts
    I need to create a Tabular form page to use it to insert records only. I do not want to update or delete records. I want the user to fill some fields and then validate it and submit. Also, I need to add a field that shows the sum of a specific field of the added records.
    Thanks a lot for all your help.

    UPDATE_LTD
    For Maintain subset of data (Update selected data)
    SHOW_LTD
    Display subset (Display Selected Data)
    TVIMV-VARIANT
    Variant name. Use variant (only with UPDATE_LTD, SHOW_LTD and TRANSP_LTD)
    For more information refer the below link
    [Maintain parameter transaction code|http://help.sap.com/saphelp_webas630/helpdata/en/a7/5134f9407a11d1893b0000e8323c4f/content.htm]
    Hope this helps.
    Thanks.,
    Balaji

  • How to delete the photo that had been sync into iphone from windows

    I have sync my picture from
    Computer into the iphone, the it automatically sync 2 same folder into the photo album. Im trying to delete it but cant, cant even find the file using the computer. Pls help

    Are you talking about photo Library?
    This is how Apple handles photos.  ALL synced photos are in teh Photo Library.  you can also access those exact same pics ( not duplicates) from the album which you selected to sync; just as your music is in your library and ca also be accessed via playlists.

  • Hi. How can I delete the table without deleting the content? My pages is 5.2.2.

    Hi. How can I delete the table without deleting the content? My pages version is 5.2.2. Thank you for your help.

    There is no convert Table to text capability in Pages v5.2.2, as there was in Pages ’09 v4.3.
    You can keep the table while making the table grid vanish, leaving the existing tabular text structure. Select the table, and under the Format panel > Table tab, the following settings will produce this output. If selected, you can refine its document placement in the Arrange tab.

  • Is it possible to delete the table of contents in a pdf but keep the bookmarks?

    Is it possible to delete the table of contents in a pdf but keep the bookmarks?

    If the TOC is located on certain pages, you can simply delete those (from the Pages panel).
    Make sure it doesn't screw up with how your bookmarks work, though...

  • How to delete a table of contents?

    It sounds like a stupid question, but I cannot delete my table of contents again? I only used the TOC in the draft, but don't need it in the final version of my document anymore. But - it sounds stupid - I cannot delete it. I marked it and hit the delete key, the back key. No more idea of how to delete the TOC. I even found no hint in the manual.
    Any tips? Thanks.

    Double-click the TOC so that it is surrounded by a dark border, then hit the 'delete' key.
    Good luck,
    Terry

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to create the Table of Content (TOC) in WEB

    Dear Sir
    Please help me
    How to create the Table of content (TOC) in Web Intelligence Report,
    Thanks
    Gnanasekarn.K
    Edited by: Gnanasekaran Kandasamy on Nov 20, 2008 11:12 AM

    Hi Gnanasekarn,
    You can create TOC in webi using Open Document, You can create link on the TOC and you can connect that link to open new report .
    With the help of open document you can open the specific portion of report.
    So you can achive your requirement using URL reporting or Open Document.
    Regards,
    Chaitanya Deshpande

  • How to delete the records from database table without using work area

    Hi all,
    The purpose of the down program is to delete the entire contents from all the tables. The deletion of the table should be in sorted manner. Is there any other way to write the code more efficiently,
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    IF SY-SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_AR.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_JV.
    IF SY-SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    IF SY-SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    IF SY-SUBRC = 0.
    DELETE ZFFMMASTER.
    IF SY-SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    IF SY-SUBRC = 0.
    DELETE ZFFMCTL.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    Waiting for response,
    Thanks in advance
    John

    Write this way....
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMHDR_AP.
    CHECK SY_SUBRC = 0.
    DELETE ZFFM_CHANGE_LOG.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_AR.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_JV.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMDTL_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMHDR_SKF.
    CHECK SY_SUBRC = 0.
    DELETE ZFINVOICE_DETAIL.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMMASTER.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMLOGREAD_CLUS.
    CHECK SY_SUBRC = 0.
    DELETE ZFFMCTL.

  • How to delete the data from partition table

    Hi all,
    Am very new to partition concepts in oracle..
    here my question is how to delete the data from partition table.
    is the below query will work ?
    delete from table1 partition (P_2008_1212)
    we have define range partition ...
    or help me how to delete the data from partition table.
    Thanks
    Sree

    874823 wrote:
    delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
    Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
    How the table implements its structure is a physical design consideration.
    Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
    When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
    And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
    Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
    This is a crucial concept to understand and get right.

  • How to delete the trailng zeros in my table

    Hai
    I had a serious problem
    My table name called nrgp_main
    Here nrgpno declared as char(8) i had changed as 10 by mistake and i have update two times
    the number is like this 003800001 i need to cut the first '0' and update it
    Thanks & regards
    Srikkanth

    Duplicate post
    how to delete the trailng zeros in my table

Maybe you are looking for