How to delete entries in an internal table except for one entry

Hi all,
I have 4 records in my internal table and I need to delete all the  records in the internal table except the last one.How do i do this?Any sample code?
Thanks.
Moderator message - Please do not ask or answer basic questions - thread locked
Edited by: Rob Burbank on Dec 16, 2009 3:23 PM

Hi,
  use following logic:
DATA: lt_itab type standard table.
DATA: l_lines type i.
DESCRIBE TABLE lt_itab lines l_lines.
l_lines = l_lines - 1.
delete lt_itab from 1 to l_lines.
Regards,
  Karol

Similar Messages

  • How to Delete a Column in Internal Table

    Hi All,
    Does any one know ,How to Delete a Column in Internal Table?

    Hi,
       For deleting the column in the internal table, you have to eliminate the field which you want to delete.
    loop at itab into wa.
      move corresponding wa to wa1.
    append wa1 to itab1.
    clear wa1.
    clear wa.
    endloop.
    wa1 is the workarea without the field which you want to delete.
    itab1 is the internal table which consists of the deleted column.

  • How to delete records from dynamic internal table.

    Hi Experts,
    Need urgent help!!!
    Issue is with Dynamic internal tables.
    Below is code written by me :
    FORM select_query USING Lw_tabnam
                      TYPE  t682i-kotabnr.
      DATA :  lw_line  TYPE REF TO data,
              lw_line1 TYPE REF TO data.
        CREATE DATA Lw_line    TYPE (lw_TABNAM).
        ASSIGN      Lw_line->* TO   <WA_tbl>.
        CREATE DATA LW_LINE    TYPE STANDARD TABLE OF (Lw_tabnam)
                               WITH NON-UNIQUE DEFAULT KEY.
        ASSIGN      Lw_line->* TO <TBL>.
        SELECT * FROM  (Lw_tabnam)
                 INTO CORRESPONDING FIELDS OF TABLE <TBL>
                 WHERE (t_keys).
    Endform.
    code is working fine.
    here even the table name and where condition are dynamic,everything is fine upto this point.
    Now i have to delete some record from <TBL> based on some conditons.
         for ex : ( here lc_fieldname is KUNNR)
          loop at t_kunnr.
              lw_tabix = sy-tabix.
            Read table <tbl>
                    with key (lc_fieldname) = t_kunnr-kunnr ASSIGNING <wa_tbl>.
            If sy-subrc = 0.
            *Delete
            delete <tbl> from <wa_tbl>
    delete <tbl> index  lw_tabix.
            Endif.
         Endloop.
    The above delete statement doesn't work ,even we can't use index as it gives a syntax error " something related to "index is not allowed in standard table or hash table.
    Can you help me ab't how to delete records in Dynamic internal table?
    Other option that i am thinking of is to create a static table of type dynamic table.
    means, data itab type standard table of <tbl> .I know the syntax is wrong ,however is there any way to do this?
    Thanks in advance ,
    If you have any suggestion ab't this then do let me know.
    bye,
    Gaurav.

    Hi
    I wrote this code and it works fine:
    DATA LW_TABNAM(10) VALUE 'LFA1'.
    DATA : LW_LINES TYPE REF TO DATA,
           LW_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <TABLE> TYPE TABLE,
                   <WA>    TYPE ANY.
    CREATE DATA LW_LINES TYPE TABLE OF (LW_TABNAM)
    WITH NON-UNIQUE DEFAULT KEY.
    ASSIGN LW_LINES->* TO <TABLE>.
    CREATE DATA LW_LINE TYPE (LW_TABNAM).
    ASSIGN LW_LINE->* TO <WA>.
    DO 10 TIMES.
      APPEND INITIAL LINE TO <TABLE>.
    ENDDO.
    SY-TABIX = 4.
    DELETE <TABLE> INDEX SY-TABIX.
    WRITE SY-SUBRC.
    I hope it help you
    Max

  • Regarding how to delete the record in internal table

    Hi experts ,
    how to delete the record in intarnal table after validating the data,
    if record contains invalid fields?
    i am giving my code see this and give me the answer?
    loop at it_data into wa_data .
    Validate  Cost Center
        READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-004.
        ENDIF.
    Validate source file material ( material number )
    loop at it_mara into wa_mara .
      read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
               if sy-subrc NE 0 .
       PERFORM update_error_log USING wa_data
                                           text-002.
    delete it_data-objek .
         else.
      read table it_mara into wa_mara with key  matnr = wa_ausp-objek .
           if sy-subrc EQ 0 .
           wa_data-objek = wa_mara-matnr.
           wa_data-matkl = wa_mara-matkl.
         ENDIF.
         Modify it_data from wa_data  .
      endif.
    *endloop.
    Validate unit of measure (unit)
        READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-003.
        endif.
    Validate delivery location ( storage location )
        READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
        IF sy-subrc NE 0.
          PERFORM update_error_log USING wa_data
                                         text-001.
             if wa_data-flag ='x' .
          delete it_data from  wa_data .
        endif.
        ENDIF.
    endloop.

    Hi Naren,
    First get the index number of the IT_data table and store it in one variable whose declaration like this.
    data: tabix type sy-tabix.
    while reading the internal table it_data set the tabix variable.
    tabix = sy-tabix.
    Instead of  the above use below one.
    Delete it_data-objek
    Use the Below statement it will delete  the row from the internal table.
    Delete it_data-objek index tabix
    Thanks,
    Chidanand

  • How to delete data from dynamic internal table

    Hi,
    I have dynamic internal table and I have some slection screen fields , using these selection screen fields
    (select -options), I have to filter the data? assigning will work with READ , but I have select options not the parametre,
    and also delete will not work for dynamic table..
    as we cannot use assigning with delete..
    So how to do this?
    and one more thing is , I cannot filter the data while selection( in select, I cannot filter the data-> as it's not coming directly from table, it's coming from buffer),
    so now after selection of data, I need to filter the data from dynamic table.
    Is there any way to do this?
    Regards,
    Mrunal

    Hi matt,
    I tried with below code as  you said. But I am getting dump. can you help?
    here is my piece of code.
    FIELD-SYMBOLS: <LS_DATA> type any,
                               <LT_DATA> TYPE table,
                                <L_FIELD> type any.
        ASSIGN <l_buffer_entry>-dataptr->* TO <LS_DATA>.
        ASSIGN <l_buffer_entry>-dataptr->* TO <LT_DATA>.
    LOOP AT <LT_DATA> ASSIGNING <LS_DATA>.
    ASSIGN COMPONENT 'BUKRS' OF STRUCTURE <LS_DATA> TO <L_FIELD>.
    IF <L_FIELD> NOT IN SO_BUKRS.
    DELETE <LT_DATA>.
    ENDIF.
    UNASSIGN <L_FIELD>.
    ASSIGN COMPONENT 'BELNR' OF STRUCTURE <LS_DATA> TO <L_FIELD>.
    IF <L_FIELD> NOT IN SO_BELNR.
    DELETE <LT_DATA>.
    ENDIF.
    UNASSIGN <L_FIELD>.
    ENDLOOP.
    and here is the description of my dump:->>>
    You attempted to access an unassigned field symbol
    (data segment 32772).
    This error may occur for any of the following reasons:
    - You address a typed field symbol before it is set using ASSIGN
    - You address a field symbol that points to a line in an internal table
      that has been deleted
    - You address a field symbol that had previously been reset using
      UNASSIGN, or that pointed to a local field that no longer exists
    - You address a global function interface parameter, even
      though the relevant function module is not active,
      that is it is not in the list of active calls. You can get the list
      of active calls from the this short dump.

  • How to delete space in an internal table

    Hi All,
    In internal table I want to compress the leading space
    After searching I found Condense and SHIFT LEFT DELETE leading space commands work it is written...
    but when I write code A single space is appreaing in between the two fields...can any body help me where I am going wrong??
    Ex:
    data: begin of itab occurs 1 ,
    PSAtext TYPE CHAR15,
    psa type btrtl,
    end of itab.
    now o/p BEFORE CHANGE IS :
    SBI-CT    |1023
    After condense is SBI-CT |1023
    bETWEEN SBI-CT AND | there is a additional space. How can we avoid that?
    Sas
    Edited by: saslove sap on Sep 29, 2010 7:43 AM

    Well this is what I am going to solve this
    data:begin of STRING OCCURS 1 ,
    S1 TYPE STRING,
    END OF STRING.
    loop at itab.
    concatenate itab-f1 itab-f2 into string-s1 seperated by '|'.
    append string.
    end of itab.
    then I can transfer this string to Application server.
    Thanks for all the contributions.
    Regards
    sas

  • How to delete blank records in internal table

    Hi.
    please tell me how can i delete blank records in an internal table.
    thnx

    In that case
    Suppose you have 10 fields in internal table and if any of them is blank, you need to delete record.
    Try this command
    delete itab where field1 is initial or
                      field2 is initial or
                      field10 is initial.

  • Delete records in an internal table

    I uploaded the data incorrectly into a ztable .how can i delete all entries in a that table now. I am afraid the table gets deleted.

    Hi,
      you can delete the entries in the table by using DELETE command.
    1. DELETE FROM dbtab WHERE cond.
    DELETE FROM (dbtabname) WHERE cond.
    2. DELETE dbtab.
    DELETE *dbtab.
    DELETE (dbtabname) ...
    3. DELETE dbtab FROM TABLE itab.
    DELETE (dbtabname) FROM TABLE itab.
    4. DELETE dbtab VERSION vers.
    DELETE *dbtab VERSION vers.
    Effect
    Deletes lines from a database table(see Relational Databases ). You can specify thename of the database table either in the program itself with DELETEFROM dbtab ... or at runtime as the contents of the fielddbtabname with DELETE FROM (dbtabname) .... In bothcases, the database table must be known to the ABAP Dictionary.Only data from the current client is usually deleted. You can deletedata using a view only if the view refers to a singletable and was created in the ABAP Dictionary with themaintenance status "No restriction".
    DELETE belongs to the Open SQLcommand set.
    Notes
    The DELETE statement does not performauthorization checks. You must programthese yourself.
    The final (irrevocable) deletion of lines with the DELETEstatement is not performed until after a database commit (seeLogical Unit of Work (LUW)). Prior to this,you can reverse any database update with a database rollback (seeProgramming Transactions).
    You cannot rely exclusively on the locking mechanism of the database system to synchronize several users trying toaccess the same dataset at the same time. You should therefore use theSAP locking mechanism.
    <b>Variant 1</b>
    DELETE FROM dbtab WHERE cond.
    DELETE FROM (dbtabname) WHERE cond.
    Addition:
    ... CLIENT SPECIFIED
    Effect
    Deletes lines in a database table that satisfy the WHERE clause cond. With thisvariant, specification of a WHERE condition is obligatory .
    When the statement has been executed, the system field SY-DBCNTcontains the number of deleted lines.
    The return code is set as follows:
    SY-SUBRC = 0:
    At least one line was deleted.
    SY-SUBRC = 4:
    No lines were deleted, since no line was selected.
    Example
    Delete all bookings for the Lufthansa flight 0400 on02.28.1995 (in the current client):
    TABLES SBOOK.
    DELETE FROM SBOOK WHERE CARRID = 'LH'       AND
                            CONNID = '0400'     AND
                            FLDATE = '19950228'.
    Note
    To delete all the lines in a table, you must specify aWHERE condition that is true for all lines. You can achieve thiswith
    ... WHERE f IN itab
    If the internal table itab is empty, such a condition wouldselect all lines.
    Addition
    ... CLIENT SPECIFIED
    Effect
    Switches off automatic client handling. This allows youto delete data across all clients in the case of client-specifictables. The client field is then treated like a normal table field, forwhich you can formulate suitable conditions in the WHERE clause.
    You must specify the addition CLIENT SPECIFIED immediately afterthe name of the database table.
    <b>Variant 2</b>
    DELETE dbtab.
    DELETE *dbtab.
    DELETE (dbtabname) ...
    Additions:
    1. ... FROM wa
    2. ... CLIENT SPECIFIED
    See Short forms not allowed and* work areas not allowed.
    Effect
    These are SAP-specific short forms used to deleteone line of a database table. If the name of the database tableis specified in the program, the primary key ofthe line to be deleted is taken from the specified work area -dbtab or *dbtab. If the name of the database table is notdetermined until runtime ( DELETE (dbtabname) ...), the addition... FROM wa is obligatory .
    When the statement has been executed, the system field SY-DBCNTcontains the number of deleted lines (0 or 1).
    The return code is set as follows:
    SY-SUBRC = 0:
    The line was deleted.
    SY-SUBRC = 4:
    No lines could be deleted, since no line exists withthe primary key specified.
    Example
    Delete the booking with the booking number 3 for theLufthansa flight 0400 on 28.02.1995 (in the current client):
    TABLES SBOOK.
    SBOOK-CARRID = 'LH'.
    SBOOK-CONNID = '0400'.
    SBOOK-FLDATE = '19950228'.
    SBOOK-BOOKID = '00000003'.
    DELETE  SBOOK.
    Addition 1
    ... FROM wa
    Effect
    Takes the primary key for the line to be deleted notfrom the table work area dbtab, but from the explicitlyspecified work area wa. Here, the key values from left to rightare taken from wa according to the structure of the primarykey in the table work area dbtab (see TABLES). The structure of wa is not taken intoaccount. Therefore, the work area wa must be at least as wide(see DATA) as the primary key in thetable work area dbtab and the alignment ofthe work area wa must correspond to the alignment of the primarykey in the table work area. Otherwise, you get a runtime error.
    Note
    If a work area is not explicitly specified, the values forthe line to be deleted are taken from the table work area dbtab,even if the statement appears in a subroutine (see FORM) or function module (see FUNCTION) where the table work area is stored in a formalparameter or a local variable of the same name.
    Addition 2
    ... CLIENT SPECIFIED
    Effect
    As with variant 1.
    <b>Variant 3</b>
    DELETE dbtab FROM TABLE itab.
    DELETE (dbtabname) FROM TABLE itab.
    Addition:
    ... CLIENT SPECIFIED
    Effect
    Mass deletion: Deletes all database table lines forwhich the internal table itab contains values for theprimary key fields. The lines of the internaltable itab must satisfy the same condition as the work areawa in addition 1 to variant 2.
    The system field SY-DBCNT contains the number of deleted lines,i.e. the number of lines of the internal table itab for whosekey values there were lines in the database table dbtab.
    The return code is set as follows:
    SY-SUBRC = 0:
    All lines from itab could be used to deletelines from dbtab.
    SY-SUBRC = 4:
    For at least one line of the internal table in thedatabase table, there was no line with the same primary key. All foundlines are deleted.
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0.
    Addition
    ... CLIENT SPECIFIED
    <b>
    Effect</b>
    As with variant 1.
    <b>Variant 4</b>
    DELETE dbtab VERSION vers.
    DELETE *dbtab VERSION vers.
    This variant is not allowed in an ABAP Objectscontext. See VERSION addition not allowed.
    <b>Note</b>
    This variant is now obsolete, since variants 1 - 3 allowyou to specify the database table name dynamically.
    <b>Effect</b>
    Deletes a line in a database table, the name of which istaken from the field vers at runtime. The database table must beknown to the ABAP Dictionary and its name must conform to thefollowing naming convention: It must begin with 'T' and canconsist of four additional characters. The field vers mustcontain the table name without a leading 'T'. Only lines in thecurrent client are deleted. The line to be deleted is taken from thestatically specified table work area dbtab or *dbtab.
    The return code is set as follows: SY-SUBRC = 0:
    The line was deleted.
    SY-SUBRC = 4:
    No lines could be deleted because no line existedwith the specified primary key.
    Regards,
    Vara

  • How to append data from an internal table to an external table.

    HI everyone,
    I am trying to update an DB table type 'c'from the data captured in my internal table. can any one tell me as to how to do this.the contents of the DB table needs to be erased completly before i send in new data.
    Regards,
    Vj

    Assuming that you table has 1 character field(?) besides the MANDT field
    MANDT
    FIELD
    you need to update this db table with values from ITAB which I assume has one field of type c.
    To first delete all of the data from DB table.
    * Yes there are other ways of doing this.
    tables: ztable.
    select * from ztable.
    delete ztable.
    endselect.
    Then simply LOOP your internal table and update the table.
    loop at itab.
      ztable-field = itab-field.
      insert ztable.
    endloop.
    Regards,
    Rich Heilman

  • How to Download XML File to internal table

    Hi Friends,
    This is my urgent requirement. How to download XML File to Internal table.
    regards
    pauldharma

    Hai,
    Please check this Link
    http://www.sap-img.com/abap/upload-direct-excel.htm
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/excel-file-download-to-an-internal-table-in-sap-crm-1719453#
    tables: zinv_release,
    zpo_release.
    ** decleration of data
    DATA: BEGIN OF my_tab OCCURS 0.
    INCLUDE STRUCTURE zinv_release.
    DATA: END OF my_tab.
    *DATA: hex_tab TYPE x VALUE '09'.
    DATA: rec(200)."'/usr/test.dat'.
    DATA:
    zhours(20) TYPE c,
    MINS(20) type c. "decimals.
    data: coma.
    coma = ','.
    SELECTION-SCREEN BEGIN OF BLOCK txt
    WITH FRAME TITLE text-001.
    PARAMETERS: dsn(60) DEFAULT '\\sapdev01\prod\'.
    SELECTION-SCREEN END
    OF BLOCK txt.
    *using a dataset to get text
    OPEN DATASET dsn FOR INPUT IN TEXT MODE.
    IF sy-subrc = 0.
    DO.
    READ DATASET dsn INTO rec.
    IF sy-subrc <> 0.
    EXIT.
    ENDIF.
    split rec at coma into
    zpo_release-REL_GRP
    zpo_release-REL_CODE
    zpo_release-RESPREL
    zpo_release-ALTREL
    zpo_release-MANAGER
    ZHOURS
    MINS
    zpo_release-FROMTIME
    zpo_release-TOTIME
    zpo_release-EXCLWKENDS.
    move zpo_release-REL_GRP to my_tab-REL_GRP.
    move zpo_release-REL_CODE to my_tab-REL_CODE.
    move zpo_release-RESPREL to my_tab-RESPREL.
    move zpo_release-ALTREL to my_tab-ALTREL.
    move zpo_release-MANAGER to my_tab-MANAGER.
    move ZHOURS to my_tab-ZHOURS.
    move MINS to my_tab-mins.
    move zpo_release-FROMTIME to my_tab-fromtime.
    move zpo_release-TOTIME to my_tab-totime.
    move zpo_release-EXCLWKENDS to my_tab-exclwkends.
    APPEND my_tab.
    ENDDO.
    INSERT zpo_release FROM TABLE my_tab ACCEPTING DUPLICATE KEYS.
    ** DELETE zmm_ppa_cc FROM TABLE tab.
    ** INSERT zzzak_emp FROM TABLE my_tab ACCEPTING DUPLICATE KEYS.
    IF sy-subrc = 0.
    MESSAGE i000(zv) WITH 'File Successful stored in DB.' '' '' ''.
    ** ELSE.
    MESSAGE i000(zv) WITH 'File already stored in DB.' '' '' ''.
    endif.
    ENDIF.
    reward if helpful
    raam

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • How to delete null values in a table

    hi all,
    tell me please any one how to delete null values in a table
    example:
    in emp table is there
    empno ename job mgr sal deptno
    7900 scott 7902 2000 10
    7499 clerk 7900 20
    7834 james manager 3000 30
    like this in the above emp table there are some null values are there
    so how to delete the null values in emp table
    thanks,
    regards.
    Edited by: user9195968 on Feb 25, 2010 6:30 AM

    not too sure what you mean, perhaps you could supply a table description and some sample data
    but, consider
    delete from table_1 where column_1 is null
    commit
    /

  • 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 an item in the table

    hi all ,
    Is anyone there to give me an idea , how to delete the item in the table , by selecting the row. , for the what i have to do , is there any documentation to follow , guide me itys really urgent.

    Hai Madhu,
    It is pretty simple.
    First u define a button. and in onAction  Event of the button write the following code.
    process is as follows:
    1)get the node
    2)get the element
    3)using the method remove_element() ,remove the element.
    <u><b>The Sample Code is as follows</b></u>
    DATA:
          node_flighttab                      TYPE REF TO if_wd_context_node,
          elem_flighttab                      TYPE REF TO if_wd_context_element.
        node_flighttab = wd_context->get_child_node( 'FLIGHTTAB' ).
      get element via lead selection
        elem_flighttab = node_flighttab->get_element(  ).
        node_flighttab->remove_element( element = elem_flighttab ).
    Follow the above code ,it will definately help you.

  • How to delete a column from the table control in module pool?

    Hi,
      can any one please tell How to delete a column from the table control in module pool?
    thanks in advance
    warm regards
    HareeshKumar N

    hi hareesh,
    I think it is better to hide it.
    How to hide: You can check this link
    Dynamic Hide column in table control

Maybe you are looking for

  • Mounting FAT32 in Solaris 10 step by step

    Hi! I had problem with do that and I finally solve. I saw that many peoples have problems with mounting FAT32 so I decided to write how I do that. 1. FAT32 must be a primary partition! 2. # smc 3. In This Computer-> Storage-> Disks check device name.

  • Have to provide my Wireless Network password EVERYTIME to sync AppleTV

    Is this right? Everytime I want my AppleTV to sync to my iTunes I have to go onto AppleTV and put in my password for my Wirless Network (Airport Express with AirTunes). Is this normal? Also my AppleTV always drops away from "Devices" in iTunes after

  • Warp Tool Brush: preview vs. results

    Hello again, Since my previous Illustrator question was answered so quickly today, I thought I wold post another problem that I have come across using AI. When I use the Warp Tool, I get a nice smooth preview (outline) of how I want my shape to warp.

  • APD Data Issue

    Hi Gurus, I am using a APD to load data from Query to a T-ODS. I am getting the " No storage space available for extending an internal table" error though I Unchecked the " Process In Memory" Performace setting. Please let me know if there is a solut

  • Premiere Pro CC Closed Captions format issues on render

    I have added closed captions to my Premiere Pro project - took bloody ages - and all looks and runs great within the project. Simple white captions over the video. Although, when I render the video out with the closed captions embedded within the vid