Checking the entries in internal table with Ztable

Hi ,
  Please go through the below requirement and please give me the code.
I am having an internal table ITAB with 5 entries and also having a Ztable with 10 entries. I should check weather any of the entry in the internal table ITAB  is present in the Ztable or not?
Please give me the code
Thanks in advance,
Ajay

Select f1 f2 f3 from ztable into itab1 "say ur ztab entries
*now say ur itab contents are in itab2.
sort itab2 by f1 " set the primary key in both .
delete adjacent duplicates from itab2 comparing f1.
Loop at itab2.
read table itab1 with key f1 =  itab2-f1.
if sy-subrc eq 0 .
write:/ 'Entry exists '.
endif.
endloop.
On every sy-subrc hit i.e eq 0 write statement tells u a hit and no of times = number of the entries.
Vijay.

Similar Messages

  • How to check duplicate entries in internal table??

    Dear Friends,
    How to check duplicate entries in internal table??
    Exp: In my internal table if I am having the same records more then ones then I need to print the error message, here I am using steploop for selecting the values from screen, and the values are coming into my internal table if user enter the same value more then ones I need to print the error message.
    Thanks,
    Sridhar

    Hi,
    After storing the data into internal table say ITAb, move the data into another internal table.
    t_dup[] = itab[].
    LOOP AT itab.
        count1 = count1 + 1.
        itab-count1 = count1.
        MODIFY itab.
    ENDLOOP.
    LOOP AT t_dup.
        count2 = count2 + 1.
        t_dup-count2 = count2.
        MODIFY t_dup.
    ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab.
      LOOP AT t_dup.
        record_dup = 'N'.
        READ TABLE itab WITH KEY count1 = t_dup-count2.
        IF sy-subrc = 0.
          record_dup = 'Y'.
        ENDIF.
        IF record_dup NE 'Y'.
          t_dup-message = 'DUPLICATE ENTRY'.
          t_dup-flag = 1.
          MODIFY t_dup.
        ENDIF.
      ENDLOOP.
    Use this sample code.
    Reward pts if it is helpfull.
    Regards
    Srimanta

  • How to delete the entries in internal table

    Hi Experts,
    I have 2 internal tables ,
    if i find any same entries of 2 internal tables,  i have to delete that entries in first internal table.
    Regards,
    Srinivasu

    hi check this..
    report .
    data:begin of itab occurs 0,
         f1 type c ,
         f2 type i,
         end of itab .
    data:begin of itab1 occurs 0,
         f1 type c ,
         end of itab1 .
         itab-f1 = 'A'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'b'.
         itab-f2 = 12.
         append itab .
         itab-f1 = 'c'.
         itab-f2 = 12.
         append itab .
         itab1-f1 = 'A'.
         append itab1 .
    loop at itab1 .
    read table itab with key f1 = itab1-f1 .
    if sy-subrc  = 0.
    delete itab where  f1 = itab1-f1 .
    endif .
    endloop.
    loop at itab.
    write:/ itab-f1,itab-f2.
    endloop.

  • Checking every entry into internal table

    hii i have taken material from lips in first internal table and material from vepo in second internal table
    now i want only those entries in second table which r present in first table.
    one delivery can have multiple materials in it.
    please provide logic.. <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 12, 2008 2:45 PM

    LOOP AT itab2.
    lv_index = sy-index.
        READ TABLE itab1 WITH KEY matnr = itab2-matnr.
        IF sy-subrc NE 0.
          DELETE itab2 AT INDEX lv_index.
         ENDI.
    ENDLOOP.
    At the end of loop itab2 will have only entries available in itab1.
    Regards
    Sudhir Atluru

  • Use of internal table with hearerline in ABAP OO

    Hi,
    I have a very basic question regarding the use of Internal table with headerline in ABAP OO.
    I consider the concept of Internal table with header as one of the most features of ABAP, which is not there in any of the other porgramming languages.
    I accept that OO's concept is one of the most powerful and a very good concept. We should also implement OO's concept in ABAP.
    But my concern is why in the process of moving to OO's the concept of Internal table with headerline is no more used.
    Can any one tell me the main reason for this. Is there any technical reason for this. By this i mean anything to do with memory or effeciency.
    Thanx,
    Srinivas

    Hi Srinivas,
       here is something more which i found about the same
    follow this link
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5ac31178-0701-0010-469a-b4d7fa2721ca
    and search for header line.
    it says:
    Tables with header lines not allowed
    Only tables without header lines can be declared in ABAP Objects.
    Error message in ABAP Objects if the following syntax is used:
    DATA itab TYPE LIKE TABLE OF ... WITH HEADER LINE.
    Correct syntax:
    DATA: itab TYPE LIKE TABLE OF ... ,
    wa LIKE LINE OF itab.
    Reason:
    It depends on the statement whether the body or header line of a table is accessed. The table name should identify the table uniquely. Programs are easier to read. Tables with header lines do not improve performance.
    i hope this will help you.
    regards,
    Kinshuk
    PS mark helpful answers

  • [Function] Declare a internal table with structure name (entry parameter)

    Hi all,
    I'm explaining my problem :
    I want to create a function with two parameters in entry :
    (IMPORT)  - structure_name with type DD02L-TABNAME
    (TABLES) - t_outtab with empty type
    t_outtab will be in structure_name type.
    Now, in my source function, I want to retrieve all contain of t_outtab in another internal table or field-symbol. I don't know in advance the used structures in my function entries.
    I don't manage to get this contain, cause I can't do :
    DATA : internal_table TYPE structure_name*
    OR
    DATA : internal_table TYPE (structure_name)
    OR used field-symbol
    DATA : internal_table TYPE <fs>*  where <fs> had structure name value.
    To do more later :
    *DATA : line LIKE LINE OF internal_table. *
    *internal_table][ = t_outtab][. *
    And work with this table.
    _ I tried different solutions like : _
    Get the structure of the table.
      ref_table_des ?= cl_abap_typedescr=>describe_by_name( I_STRUCTURE_NAME ).
      idetails[] = ref_table_des->components[].
    Get the first structure table of result table
    LOOP AT idetails INTO xdetails.
        CLEAR: xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype = xdetails-type_kind.
        xfc-inttype = xdetails-type_kind.
        xfc-intlen = xdetails-length.
        xfc-decimals = xdetails-decimals.
        APPEND xfc TO ifc.
    ENDLOOP.
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    and retrieve to <dyn_table>[] = t_outtab[].
    the but I don't try the solution. If someone have an idea.
    Thanks and regards.
    Romain
    Edited by: Romain L on May 14, 2009 11:35 AM

    Hi,
    We can acheive this using dynamic internal tables.
    Please find sample below.
    *Creating Dynamic internal table 
      PARAMETERS : p_table(10) TYPE C.
      DATA: w_tabname TYPE w_tabname,            
            w_dref TYPE REF TO data,             
            w_grid TYPE REF TO cl_gui_alv_grid. 
      FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE. 
      w_tabname = p_table. 
      CREATE DATA w_dref TYPE TABLE OF (w_tabname).
      ASSIGN w_dref->* TO <t_itab>.
    * Populating Dynamic internal table 
      SELECT *
        FROM (w_tabname) UP TO 20 ROWS
        INTO TABLE <t_itab>.
    * Displaying dynamic internal table using Grid. 
      CREATE OBJECT w_grid
        EXPORTING i_parent = cl_gui_container=>screen0. 
      CALL METHOD w_grid->set_table_for_first_display
        EXPORTING
          i_structure_name = w_tabname
        CHANGING
          it_outtab        = <t_itab>. 
      CALL SCREEN 100.
    * Scenario 2: 
    *Create a dynamic internal table with the specified number of columns. 
    * Creating Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,  u201C Dynamic internal table name
                   <fs_dyntable>,                     u201C Field symbol to create work area
                   <fs_fldval> type any.              u201C Field symbol to assign values 
    PARAMETERS: p_cols(5) TYPE c.                     u201C Input number of columns
    DATA:   t_newtable TYPE REF TO data,
            t_newline  TYPE REF TO data,
            t_fldcat   TYPE slis_t_fldcat_alv,
            t_fldcat   TYPE lvc_t_fcat,
            wa_it_fldcat TYPE lvc_s_fcat,
            wa_colno(2) TYPE n,
            wa_flname(5) TYPE c. 
    * Create fields .
      DO p_cols TIMES.
        CLEAR wa_it_fldcat.
        move sy-index to wa_colno.
        concatenate 'COL'
                    wa_colno
               into wa_flname.
        wa_it_fldcat-fieldname = wa_flname.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 10.
        APPEND wa_it_fldcat TO t_fldcat.
      ENDDO. 
    * Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = t_fldcat
        IMPORTING
          ep_table        = t_newtable. 
      ASSIGN t_newtable->* TO <t_dyntable>. 
    * Create dynamic work area and assign to FS
      CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
      ASSIGN t_newline->* TO <fs_dyntable>.
    *Populating Dynamic internal table 
      DATA: fieldname(20) TYPE c.
      DATA: fieldvalue(10) TYPE c.
      DATA: index(3) TYPE c. 
      DO p_cols TIMES. 
        index = sy-index.
        MOVE sy-index TO wa_colno.
        CONCATENATE 'COL'
                    wa_colno
               INTO wa_flname. 
    * Set up fieldvalue
        CONCATENATE 'VALUE' index INTO
                    fieldvalue.
        CONDENSE    fieldvalue NO-GAPS. 
        ASSIGN COMPONENT  wa_flname
            OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
        <fs_fldval> =  fieldvalue. 
      ENDDO. 
    * Append to the dynamic internal table
      APPEND <fs_dyntable> TO <t_dyntable>.
    * Displaying dynamic internal table using Grid. 
    DATA: wa_cat LIKE LINE OF fs_fldcat. 
      DO p_cols TIMES.
        CLEAR wa_cat.
        MOVE sy-index TO wa_colno.
        CONCATENATE 'COL'
                    wa_colno
               INTO wa_flname. 
        wa_cat-fieldname = wa_flname.
        wa_cat-seltext_s = wa_flname.
        wa_cat-outputlen = '10'.
        APPEND wa_cat TO fs_fldcat.
      ENDDO. 
    * Call ABAP List Viewer (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat = fs_fldcat
        TABLES
          t_outtab    = <t_dyntable>.
    Thanks,
    Jyothi
    Edited by: Jyothi on May 14, 2009 11:42 AM
    Edited by: Jyothi on May 14, 2009 11:43 AM

  • Unable to modify the final internal table with month field

    hi everybody
    I am having one material which has a qty  in different months lets say that jan feb mar apr may june..... now i have caluculated the total of the material monthly wise and i have to display in the output. if the material of the first month displayed and then again the same material comes in the loop and that matrial is going to be checked by the month wise and has to diaplyed in the corresponding month fied in the output. so i am using the index in the loop using  the AT new command for the matnr and appending the final output structure and now if the same matrial comes again with different month the final output internal table should modify. but the statement is executing but the value is not coming in the final output structure.
    the syntax which i am using  is
          MODIFY GT_OUTPUT FROM WA_OUTPUT INDEX lv_index TRANSPORTING MATNR.
    OUTPUT FORMAT IS
    MATERIAL NO :      JANQTY   :    FEBQTY    :   MARQTY : ...... :DECQTY.
    THANKS IN ADVANCE

    my issue is....
    lets say that i am having three materials now
    381, 391, 401. and the material 381 has used in jan month 5 times and feb month 6 times like that. each material is used in different months. now i have calculated all the matrerials qty monthly wise and i have to display the material one time only the qty's in jan feb mar and so on....
    material no  383     
    jan     31064
    feb     67312
    mar     65107
    apr     31222
    material no 391
    jan     74677
    feb     8952
    mar     75501
    so my output should be like this
    OUTPUT FORMAT IS
    MATERIAL NO : JANQTY : FEBQTY : MARQTY
    381                   31064         67312     65107      
    391                   74677        8952        75501
    now i have written the code like this
      LOOP AT GT_OUTPUT1 INTO WA_OUTPUT1.
        WA_OUTPUT-MATNR = WA_OUTPUT1-MATNR.
        WA_OUTPUT-MJAHR = WA_OUTPUT1-MJAHR.
        at NEW matnr.
          l_matnr = 'X'.
          lv_index = sy-tabix.
        endat.
        IF L_MATNR = 'X'.
          PERFORM CASE_STATEMENT.
          append wa_OUTPUT to gt_OUTPUT.
          clear :  wa_OUTPUT, l_matnr, WA_OUTPUT1, WA_ZQCALWT.
        ELSE.
          PERFORM CASE_STATEMENT.
          MODIFY GT_OUTPUT FROM WA_OUTPUT. " INDEX lv_index TRANSPORTING MAR. " EQ WA_OUTPUT1-MATNR.
          clear :  wa_OUTPUT, l_matnr, WA_OUTPUT1, WA_ZQCALWT.
        ENDIF.
    endloop.

  • How can I check if there is a table with the given name ?

    I'm using 8i and 9i.
    Could anybody teach me how to check if there is a table with a certain name in SQLPLUS without using SELECT
    statement ?
    I want to use the following logical procedure.
    if exists "table_to_be_deleted" then drop table "table_to_be_deleted"
    Or, is there any system table that I can check the names of tables like
    count = select "table_to_be_deleted" from "an_oracle_system_table"
    if ( count != 0 ) then drop table "table_to_be_deleted"
    Thanks,
    John

    Just create it, but be aware that DDLs can't be executed directly from Pl/Sql, so you'll have to use dynamic Sql, e.g. :
    SQL> create table test(a number);
    Table created.
    SQL> begin
      2  drop table test;
      3  exception
      4  when others then
      5  null;
      6  end;
    SQL> /
    drop table test;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2  execute immediate 'drop table test';
      3  exception
      4  when others then
      5  null;
      6* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>Now the table does not exist anymore, but further executions will not generate errors, due to the exception handler :
    SQL> desc test
    ERROR:
    ORA-04043: object test does not exist
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>

  • How to create an dynamic internal table with the structure of a ddic table

    Hi all,
    I want to fill ddic-tables (which I already created) in my abap dictionary with data out of CSV-files (which are located on the CRM-Server).  The ddic tables have different amount of fields.
    I started with creating a table which contains the name of the tables and the path to the matching CSV-file.
    At the beginning I'm filling an internal table with part of this data (the name of the ddic-tables) - after that I am looping at this internal table.
    LOOP AT lt_struc ASSIGNING <lfs_struc>.
         LOOP AT lv_itab1 INTO lv_wa1 WHERE ztab_name = <lfs_struc>.
         lv_feld = lv_wa1-zdat_name.
        ENDLOOP.
        CONCATENATE 'C:\-tmp\Exportierte Tabellen\' lv_feld INTO lv_pfad.
        Do.
        OPEN DATASET lv_pfad FOR INPUT IN TEXT MODE ENCODING NON-UNICODE IGNORING CONVERSION ERRORS.
        READ DATASET lv_pfad INTO lv_rec.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        enddo.
        REPLACE ALL OCCURRENCES OF '"' IN lv_rec WITH ''.
        SPLIT lv_rec AT ';' INTO TABLE lt_str_values.
        INSERT into (<lfs_struc>) values lr_str_value.
        CLOSE DATASET lv_pfad.
    endloop.
    This is not the whole code, but it's working until
    SPLIT lv_rec AT ';' INTO TABLE lt_str_values.
    I want to split all the data of lv_rec into an internal table which has the structure of the current ddic-table, but I didn't find out how to do give the internal table the structure of the ddic-table. In the code I used an internal tyble type string but I should be the structure of the matching tabel.
    If I try to create an internal table by using a fiel symbol, I am told, that the data types are not matching.
    Has anyone an idea?

    Hi Mayari,
    though you were successfull with
    METHOD cl_alv_table_create=>create_dynamic_table
    I must warn you not to use it. The reason is that the number of tables created is limited, the method uses GENERATE SUBROUTINE statement and this triggers an unwanted database commit.
    If you know the DDIC structure, it is (starting with ECC6.0) much easier:
    field-symbols:
      <table> type standard table.
    data:
      lr_data type ref to data.
    Create data lr_data type table of (<DDIC structure>).
    assign lr_data->* to <table>.
    The split code can be simplified gaining speed loosing complexity not loosing functionality.
    field-symbols:<fs_s> type any.
    field-symbols:<fs_t> type any.
    SPLIT lv_rec AT ';' INTO table it_string.
    loop at it_string assigning <fs_s>.
      assign component sy-tabix of wa_string to <fs_t>.
    if sy-subrc = 0.
      <fs_t> = <fs_s>.
    endif.
    at last.
      append <fs_itwa3> to <ft_itab3>.
    endat.
    endloop.
    Though it may work as Keshav.T suggested, there is no need to do that way.     
    Regards,
    Clemens

  • Downloading the internal table with header to FTP folder

    Hi All,
    I have one requirement in downloading the internal table details with the fixed header line to FTP folder. The header line having the fixed text of 425 characters length.
    Note: We are not suppose to use WS_DOWNLOAD and GUI_DOWNLOAD function modules.
    Thanks in advance for your reply.
    Regards
    Kamini.

    Hi,
    I can download the internal table details successfully to FTP folder using the FTP function modules like(FTP_CONNECT, FTP_COMMAND , FTP_R/3_TO_SERVER and FTP_DISCONNECT). Here my problem is I am unable to download the internation table with some header text.
    You can see the format (example) of file to be download.
    Here I can successfully download the below details without the header. But I am unable to download with header line. Could you please suggest me.
    seq_no|record_action|trans_date|sku|description|
    1|N|2008-01-03 07:52:31|TTASA5025CBO     
    2|N|2008-01-03 10:28:33|411014        
    3|N|2008-01-03 10:01:03|TTASA6030CBO  
    4|N|2008-01-03 10:01:15|TTASA6630CBO
    5|N|2008-01-03 10:01:25|TTASA7035CBO 
    6|N|2008-01-08 16:57:39|TT6G       
    Regards
    Kamini.

  • Create an internal table with the rows of another internal table.

    Hi I want to know if posible to create an internal table structure with the  rows of another internal table?
    ex.
    If in i_tab column A has this values: row 1 = first, row 2 = second, row 3 = third.
    Now I want that the structure of my internal table be: first, second, third

    Hi,
    If you do this way then what will be the difference between the two table anyway?? First internal table has the same structure irrespective of which row you select. and you are going to store the data from each row to the rows of the second internal table. In that case, the structure of the internal table is the same as first table. and it would have same rows.
    Am I missing something here? or you want to declare the internal table with each field being the structure of the first table? In this case you'd have to do a dynamic declaration of data as the first table can have any no of rows then the second table would have any no of fields in the structure.
    Now if you know that your first internal table is going to have a fixed no of rows eg 3 rows then it becomes simple. Do the following then
    Data: begin of second_table occurs 0,
    first type <first_table type>,
    second type <first_table type>,
    third type <first_table type>,
    end of second_table.
    Regards
    Prasenjit

  • Get the Common from Two Internal Tables with same structure

    Hi ,
    I need to get the Common data from Two Internal Tables with same structure with using the looping method.
    For e.g.
    I have two internal table say ITAB1 and ITAB2.
    ITAB1 has values A,B,C,D,E,F
    ITAB2 has values A,H,B,Y,O
    Output at runtime should be : A,B

    Hi mohit,
    1. If u want to compare all fields,
       for matching purpose,
       then we can do like this.
    2.
    report abc.
    data : a like t001 occurs 0 with header line.
    data : b like t001 occurs 0 with header line.
    loop at a.
      LOOP AT B.
        IF A = B.
          WRITE :/ 'SAME'.
        ENDIF.
      endloop.
    ENDLOOP.
    regards,
    amit m.

  • Fill internal table with mutliple entries for nested structure

    Dear ABAP Experts,
    I have a question related to fill internal tables with nested structures.
    I have a structure like this:
    BEGIN OF proto,
              sicht TYPE ysicht,
              version TYPE FAGLFLEXA-RVERS,
              BEGIN OF kons,
    kon TYPE YKONSEINHEIT,
              END OF kons,
              jahr TYPE CHAR04,
    END OF proto.
    Now I need to fill this structure with values (over an internal table), but how can I achieve that I save multiple datas für element "kon" für one single entry of structure "proto"?
    An example could be:
    sicht = '01'
    version = '100'
    kon = 1001 (first entry)
    kon = 1002 (second entry)
    usw... (n entry)
    jahr = '2008'
    Thanks in advance for every helpful answer.
    Regards
    Thomas

    BEGIN OF proto,
               sicht TYPE ysicht,
               version TYPE FAGLFLEXA-RVERS,
               kons TYPE STANDARD TABLE OF YKONSEINHEIT WITH NON-UNIQUE KEY TABLE_LINE,
               jahr TYPE CHAR04,
    END OF proto.
    DATA: ls_proto TYPE proto,
          lt_proto TYPE STANDARD TABLE OF proto,
          ls_kon
    ls_proto-sicht = '01'.
    ls_proto-version = '100'
    INSERT '1001' INTO TABLE ls_proto-kons.
    INSERT '1002' INTO TABLE ls_proto-kons.
    ls_proto-jahr = '2008'.
    INSERT ls_proto INTO TABLE lt_proto
    If you're going to use a more complicated inner table with several components, then you need to define a type for those components. 
    matt

  • What are the advantages of using an internal table with workarea

    Hi,
    can anyone tell me
    What are the advantages of using an internal table with workarea
    over an internal table with header line?
    thnks in adv
    regards
    nagi

    HI,
    Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    <b>Difference between Work Area and Header Line</b>
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table
    1) The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line
    2)work area / field string and internal table
    which one is prefarable for good performance any why ?
    -The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.
    In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.
    Example code:
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    Regards,
    Padmam.

  • Upload data to an internal table with Services of the Table Tool

    Hi,
    I'm trying to upload data to an internal table with the table with the new abap debugger but I can see the option in Services of the Table Tool. I see the information in this sap link and also I saw some screen shot in other pages.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/49/2db60934e414d0e10000000a42189b/content.htm
    Is this option depends the SAP version or the patch version or I need to configure the debugger?

    Hi,
    I used the statement
    SPLIT i_file AT '|' INTO TABLE It_file.
    But it is overwriting each row but not appending to the internal table while passing do and enddo.
    Actually my requirement is download the pipe delimited text file and sent an XLS attachment to the
    distribution mail id's.
    I know sending the mails by using the FM.
    But I need all data from the file line by line and pass to the Mail sending function module.
    Can you help me in acheiving  this.
    Regards
    Jay

Maybe you are looking for