Reg. object in an internal table,

data : begin of itab occurs 0,
  var1 LIKE sy-index,
  var2(20),
  obj TYPE REF TO zclass,
END OF itab.
Zclass has a public attribute, A.
what't the way for filling & reading this type of itab, I want to put just 4 records in this itab.
For any clarification please reply.!

following is the small code, it is error free, but the last loop stmt is showing 8 at every pass.
so whether we are refering to a class or attribute...i think approach will be same..i just want to fill unique data in A attribute of class.......
please help!
REPORT zrnd
       NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0, 
  var1 LIKE sy-index,
  var2(20),
  obj TYPE REF TO zclass,
  END OF itab.
START-OF-SELECTION.
  itab-var1 = 1.
  itab-var2 = 'pradeep'.
  CREATE OBJECT itab-obj.
  itab-obj->a = 6.
  APPEND itab.
  itab-var1 = 2.
  itab-var2 = 'sandeep'.
  itab-obj->a = 7.
  APPEND itab.
  itab-var1 = 3.
  itab-var2 = 'tanu'.
  itab-obj->a = 8.
  APPEND itab.
  LOOP AT itab.
    WRITE :  /  itab-var1 , itab-var2 , itab-obj->a.
  ENDLOOP.

Similar Messages

  • Appending Objects in an internal Table

    Hallo Guru,
    I'm looking for a way to append newly created objects of a class "XYZ" in an internal table.
    Best Regards,
    Kais

    Hi
    U need to append the object in the table like a normal workarea:
    CLASS LC_MY_CLASS DEFINITION.
      PUBLIC SECTION.
        METHODS: CONSTRUCTOR
                  IMPORTING P_NAME TYPE CHAR20,
                 WRITE_NAME.
      PRIVATE SECTION.
        DATA: NAME TYPE CHAR20.
    ENDCLASS.                    "LC_MY_CLASS DEFINITION
    CLASS LC_MY_CLASS IMPLEMENTATION.
      METHOD CONSTRUCTOR.
        NAME = P_NAME.
      ENDMETHOD.                    "CONSTRUCTOR
      METHOD WRITE_NAME.
        WRITE: / NAME.
      ENDMETHOD.                    "WRITE_NAME
    ENDCLASS.                    "LC_MY_CLASS IMPLEMENTATION
    TYPES: TY_OBJ TYPE REF TO LC_MY_CLASS.
    DATA: MY_OBJ TYPE REF TO LC_MY_CLASS,
          T_OBJ  TYPE TABLE OF TY_OBJ.
    START-OF-SELECTION.
      CREATE OBJECT MY_OBJ
        EXPORTING
          P_NAME = 'MAX'.
      APPEND MY_OBJ TO T_OBJ.
      CREATE OBJECT MY_OBJ
        EXPORTING
          P_NAME = 'MAX 2'.
      APPEND MY_OBJ TO T_OBJ.
      LOOP AT T_OBJ INTO MY_OBJ.
        CALL METHOD MY_OBJ->WRITE_NAME.
      ENDLOOP.
    Max

  • Reg : Joining the all internal table records into a single internal table

    Hi all
    I am having 5 internal tables and i want to put all these entries in a single intrnal table and my requirement is for each and every record it has to go through all the internal tables and if an entry is missing meand.it has to go through the other internal tables and for missing entries i should leave it as blank and rest of the contents i have to display can any please gimme some logic how to do this??
    Thanks in advance

    Don't have time or will to deliver turnkey solutions, but here is a frame:
    LOOP AT itab1...
      READ TABLE itab2 WITH TABLE KEY... (fields linking itab1 and itab2)
      READ TABLE itab3 WITH TABLE KEY... (fields linking itab1 and itab3)
      LOOP AT itab4 WHERE... (fields linking itab1 and itab4)
        READ TABLE itab5 WITH TABLE KEY... (fields linking itab4 and itab5)
        MOVE-CORRESPONDING... (all five work areas to target work area)
        APPEND itabtarget...
      ENDLOOP.
    ENDLOOP.
    so use READ when there is a 1:1 relationship (e.g. check table entry), and LOOP when there is a 1:N relationship (e.g. items for a header)
    Thomas

  • Reg: Creation of Dynamic Internal table

    Hi All,
    I got a requirement which should be handled by creating dynamic internal table.
    *Scenario: *
    1.First I will fetch data from one table into an internal table.
    Let suppose I am fetching the fieldnames of the table MAKT from DD03l. Then I will having following records in my internal table.
             MANDT
             MATNR
             SPRAS
             MAKTX
             MAKTG
    2.Now I need to download these fields into an excel file with same field names as headings as shown below
         |  MANDT  |  MATNR  |  SPRAS  |  MAKTX  |  MAKTG  |
    3.Later User will enter data for all those fields in the downloaded excel file and again upload the file. Here I need to create dynamic internal table because the table name is dynamic. Based on the table name, field names will be varying..
    Please provide me solution for the above..
    Thanks,
    Ravee

    Hi
    U can try something like this:
    TYPES: TY_LINE TYPE STRING.
    PARAMETERS: P_TABLE TYPE DDOBJNAME.
    DATA: DYN_TAB TYPE REF TO DATA.
    FIELD-SYMBOLS: <FS_TAB>   TYPE TABLE,
                   <FS_WA>    TYPE ANY,
                   <FS_FIELD> TYPE ANY.
    DATA: DFIES_TAB TYPE TABLE OF DFIES WITH HEADER LINE.
    DATA: W_LINE(10000) TYPE C.
    DATA: V_OFFSET TYPE I.
    DATA: LAST_FIELD.
    START-OF-SELECTION.
      CALL FUNCTION 'DDIF_FIELDINFO_GET'
        EXPORTING
          TABNAME        = P_TABLE
        TABLES
          DFIES_TAB      = DFIES_TAB
        EXCEPTIONS
          NOT_FOUND      = 1
          INTERNAL_ERROR = 2
          OTHERS         = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'No table'.
        STOP.
      ENDIF.
    * Create internal table
      CREATE DATA DYN_TAB TYPE TABLE OF (P_TABLE).
      ASSIGN DYN_TAB->* TO <FS_TAB>.
    * Create Header
      LOOP AT DFIES_TAB.
    * Insert field name
        MOVE DFIES_TAB-FIELDNAME TO W_LINE+V_OFFSET.
        V_OFFSET = V_OFFSET + 30.
        AT LAST.
          LAST_FIELD = 'X'.
        ENDAT.
        CHECK LAST_FIELD IS INITIAL.
    * Insert separator
        MOVE ';' TO W_LINE+V_OFFSET.
        V_OFFSET = V_OFFSET + 1.
      ENDLOOP.
      CONDENSE W_LINE NO-GAPS.
      WRITE W_LINE.
    * Get DATA
      SELECT * FROM (P_TABLE) INTO TABLE <FS_TAB>.
      LOOP AT <FS_TAB> ASSIGNING <FS_WA>.
        CLEAR LAST_FIELD.
        CLEAR V_OFFSET.
        CLEAR W_LINE.
        LOOP AT DFIES_TAB.
          AT LAST.
            LAST_FIELD = 'X'.
          ENDAT.
          ASSIGN COMPONENT DFIES_TAB-FIELDNAME
            OF STRUCTURE <FS_WA> TO <FS_FIELD>.
    * Insert value
          MOVE <FS_FIELD> TO W_LINE+V_OFFSET(DFIES_TAB-INTLEN).
          V_OFFSET = V_OFFSET + DFIES_TAB-INTLEN.
    * Insert separator
          MOVE ';' TO W_LINE+V_OFFSET.
          V_OFFSET = V_OFFSET + 1.
        ENDLOOP.
        CONDENSE W_LINE NO-GAPS.
        WRITE: / W_LINE.
      ENDLOOP.
    In your case u can append the workarea W_LINE to an internal table and then download it as CSV file.
    Max

  • How to append contents of a local object to dynamic internal table ?

    Dear ABAP-Specialists,
    i am trying to append contents of a local object to a dynamic table. The most relevant lines are the ones written in bold
    I guess the append is the problem due to the reason that a unknown format has to be assigned to a fixed format somehow.
    +METHOD wddomodifyview .+
      +DATA lo_ui_root                TYPE REF TO  if_wd_view_element.+
      +DATA lo_container              TYPE REF TO  cl_wd_uielement_container.+
      +DATA lo_table                  TYPE REF TO  cl_wd_table.+
      +DATA lo_table_column           TYPE REF TO  cl_wd_table_column.+
      +DATA lv_tabname                TYPE         tabname.+
      +DATA lt_output                 TYPE TABLE OF sychar512.+
      +DATA lo_data TYPE REF TO data.+
      +DATA:+
        +lo_node_output_data                    TYPE REF TO if_wd_context_node,+
        +lo_node_table_list                     TYPE REF TO if_wd_context_node,+
        +lo_node_differences                    TYPE REF TO if_wd_context_node,+
        +lo_node_output                         TYPE REF TO if_wd_context_node,+
        +lt_all_elem_differences                TYPE        wdr_context_element_set,+
        +lo_elem_table_list                     TYPE REF TO if_wd_context_element,+
        +lo_elem_differences                    TYPE REF TO if_wd_context_element,+
        +ls_differences                         TYPE        if_table_differences=>element_differences,+
        +lt_differences                         TYPE STANDARD TABLE OF if_table_differences=>element_differences.+
      +FIELD-SYMBOLS:+
                     +<ls_output> TYPE ANY,+
                     +<lt_output> TYPE ANY TABLE.+
    +     ....+
        +*CREATE DATA lo_data TYPE TABLE OF (lv_tabname).*+
        +*ASSIGN lo_data->* TO <lt_output>.*+
        +*LOOP AT lt_differences INTO ls_differences.*+
    +**      APPEND ls_differences-ct_line TO lo_data->*.*+
        +*ENDLOOP.*     ....+
    +ENDMETHOD.+
    Thanks a lot in advance for your Ideas.
    Best regards
    Carsten Klatt
    Please post in the correct forum and use code tags to format your code
    Edited by: Rob Burbank on Oct 1, 2010 1:27 PM

    This might help - you should not reference the data reference directly:
    DATA: lt_t001 TYPE TABLE OF t001,
          ls_t001 TYPE t001.
    DATA: lr_dref    TYPE REF TO data.
    DATA: lv_tabname TYPE tabname.
    FIELD-SYMBOLS: <lfs>      TYPE table,
                   <lfs_line> TYPE ANY.
    lv_tabname = 'T001'.
    TRY.
        CREATE DATA lr_dref TYPE TABLE OF (lv_tabname).
        ASSIGN lr_dref->* TO <lfs>.
      CATCH cx_sy_create_data_error.
    *     Do something
    ENDTRY.
    SELECT * FROM t001 INTO TABLE lt_t001.
    LOOP AT lt_t001 INTO ls_t001.
      ASSIGN ls_t001 TO <lfs_line>.
      APPEND <lfs_line> TO <lfs>.
    ENDLOOP.

  • Reg:Submit statement Return Internal Table

    Hi Team,
    I have a query to return the internal table from the called program via SUBMIT statement to the calling statement ??
    Example : Thing is that consider reports A and B , Report B is getting called from report A where in B we have one internal table full of data that i need to pull to report A and there i need to process it.
    How can i achieve this?
    Please let me know the possible ways.
    Karthik.S

    Hi karthik,
    SUBMIT .... AND RETURN EXPORTING LIST TO MEMORY.
    Then use FM LIST_FROM_MEMORY.
    Thanks,
    Anil

  • Reg: Collect statement in internal table

    Hi,
       Can any one tell me wether we can use the collect statement in an internal table which has no header line
    if it can be used can anyone please send me a sample snippet
    Thanks In ADVANCE
    Guhapriyan Subrahmanyam

    Hi Guhapriyan,
    I have used the collect statement in the way as shown..
    DATA : BEGIN of I_ALLOCATIONS OCCURS 0,
            PSPNR LIKE PRPS-PSPNR,
            PSPID LIKE PROJ-PSPID,
            PSPHI LIKE PRPS-PSPHI,
            POST1 LIKE PROJ-POST1,
            ZZLOB LIKE PROJ-ZZLOB,
            WERKS LIKE PROJ-WERKS,
            SOBID LIKE HRP1001-SOBID,
            OBJID LIKE HRP1001-OBJID,
            BEGDA LIKE HRP1001-BEGDA,
            ENDDA LIKE HRP1001-ENDDA,
            PROZT LIKE HRP1001-PROZT,
            LOB   LIKE HRP1000-STEXT,
            TEMP  TYPE P decimals 2,
            TYPE(3),
            ZROLE LIKE PA0001-ZROLE,
            HOLID TYPE P decimals 2,
            LEAVE TYPE P decimals 2,
            DAYS  TYPE P decimals 2,
           END of I_ALLOCATIONS.
    DATA:  I_ALLOCATION LIKE I_ALLOCATIONS OCCURS 0 WITH HEADER LINE.
    ************Populate I_ALLOCATIONS **************
    LOOP AT I_ALLOCATIONS.
        COLLECT I_ALLOCATIONS INTO I_ALLOCATION.
    ENDLOOP.
    Actually i had requirement like u, but this one is rather simple...
    Get the required data in an I_Table which dont require Header line..
    Later on collect this particular I_Table in other I_Table1 with the Header Line...
    Regards,
    Abhishek

  • Reg: Max length of internal table field(GUI_UPLOAD)

    Hi All,
    In my internal table there is a field for long text(free text/string), when i using GUI_UPLOAD the field max char is 255, so i couldnt get the full text, eventhough i declared that particular long text as string. Can any one tell me how to get the free text.
    And i am uploading data from presentation server, not from app server.
    Thanks in advance.
    Arun
    Edited by: arun on Mar 18, 2010 7:01 AM

    You have to cook your own logic. But what is the reason for not sorting the table?
    If you do not want to disturb the main intrenal table, you can move the contents into a temporary internal table, and sort it by descending order. The first record would have the maximum value.
    here is a logic to find the maximum value.
    loop at itab.
    if itab-value > v_max.
    v_max = itab-value.
    endif.
    endlop.
    V_max would have the maximum value at the end lo the loop.
    Regards,
    Ravi

  • Reg deleting entries from internal table

    Hi experts,
       I have two internal tables , ITAB1 and ITAB2 (same structure), i like to delete the records from ITAB1 which are in ITAB2 without looping .How it can be done?
    regards,
    Kannan

    Lozan,
    itab1 is having 1,2,3,4.
    itab2 is having 1,2,5,6,7.
    Now I move the contents in itab1 and itab2 to itab3.
    itab3 is having now 1,2,3,4,1,2,5,6,7.
    Now I will sort this itab3,thus itab3 is now having
    1,1,2,,2,3,4,5,6,7.
    <b>Now,if  I use delete adjacent duplicates from itab3,will it won't result in
    1,2,3,4,5,6,7 in itab3?</b>
    K.Kiran.
    Message was edited by:
            Kiran K
    Message was edited by:
            Kiran K

  • Reg  comparison of two  internal tables

    hi friends,
    please help me solving this.
    there are two internal tables t_zvs38 and t_value
    1.t_value like seahlpres
    2.t_zvs38 like zvs38.
    values in t_value will be like this.
    first line wil contain zmdtype(mandatory document) and second line will contain
    zmdtypet (the description for zmdtype).
    eg.
    D001 -
    -zmdtype
    internal----
    zmdtypet
    D002
    external
    D003
    renewal
    values in t_zvs38.
    for a particular sales.org the zmdtype is filled.
    select vkorg zmdtype into corrsponding fields of table t_zvs38
    where vkorg = p_vkorg.
    Now i want to compare t_value and t_zvs38 with field zmdtype
    and delete the contents of  t_value which are not in t_zvs38.
    i have written like this.
    loop at t_value.
    read table t_zvs38 with key zmdtype = t_value-string.
    if sy-subrc ne 0.
    delete t_value. "to delete zmdtype
    sy-tabix = sy-tabix + 1.
      delete t_value. " to delete zmdtypet
    else.
    sy-tabix = sy-tabix +2. "to go to next zmdtype.
    endif.
    endloop.
    but it is deleting all the contents of t_value.
    points are assured.

    CLEAR zvs32t.
      SELECT zvs32tzmdtype zvs32tzmdtypet
        INTO (zvs32t-zmdtype, zvs32t-zmdtypet)
        FROM zvs32t
        JOIN zvs32
        ON   zvs32tzmdtype = zvs32zmdtype
        WHERE zvs32t~spras    = sy-langu
        AND   zvs32~zfrenewal = space.
         WRITE zvs32t-zmdtype TO t_value.
        APPEND t_value.
        WRITE zvs32t-zmdtypet TO t_value.
        APPEND t_value.
      ENDSELECT.
      SELECT vkorg vkbur zmdtype FROM zvs38 INTO CORRESPONDING FIELDS OF TABLE t_zvs38
      WHERE vkorg = p_vkorg
    AND vkbur = p_vkbur.
      LOOP AT t_value INTO wa_area1.
        v_index = sy-tabix.
        READ TABLE t_zvs38 INTO wa_area2 WITH KEY zmdtype = wa_area1-string
      BINARY SEARCH.
       IF sy-subrc NE 0.
          IF l_flag IS INITIAL.
            DELETE t_value INDEX v_index.
           ELSE.
            CLEAR l_flag.
          ENDIF.
       ELSE.
          l_flag = 'X'.
       ENDIF.
      ENDLOOP.
    Using this code ,i am unable to ge the correct output.Thank u all for ur help.

  • How could I assigning object values to internal table?

    CREATE DATA dref TYPE TABLE OF (table).
        ASSIGN dref->* TO <intab>.
        SELECT * FROM (table) INTO CORRESPONDING FIELDS OF TABLE <intab>.
    I have create a internal table intab1.
    obviously, the expressing "intab1 = <intab> " is wrong.
    then,how should intab1 get the value of <intab>?

    Hi
    If you need only to transfer all data: <b>INTAB1[] = <INTAB>[]</b>. But INTAB1 has to be as <INTAB>.
    If the structure of INTAB1 is different, you have to use the field-symbols:
    LOOP AT <INTAB> ASSIGNING <WA>.
      ASSIGN COMPONENT SY-INDEX OF STRUCTRE <WA> TO <VAL_F>.
      IF SY-SUBRC <> 0. EXIT. ENDIF.
      ASSIGN COMPONENT SY-INDEX OF STRUCTRE INTAB1 TO <VAL_T>.
      IF SY-SUBRC <> 0. EXIT. ENDIF.
      <VAL_T> = <VAL_F>.
    ENDLOOP.
    So how to transfer the data depends on the structures of INTAB1 and <INTAB>.
    Max

  • Printing intermediate object (images) stored in an internal table

    Hi All,
    I'm fetching certain imgaes / documents from a 3rd party repository system (IXOS) and storing the objects in an internal table in a program, later to download them onto the Presentation Server through an ABAP Program.
    But instead of downloading these images onto the Presentation Server, i want to directly print them through the ABAP Program on the local printer.
    These images are stored in some raw format in the internal table.
    Is there any way in which these N images or N raw data sets can be converted into N separate spools so that spools can be converted into N PDFs and then printed?
    Or is there any other way in which i can print these N images directly from the ABAP report.
    Request your help.
    Many thanks in advance,
    SG

    Not so easy. You can't just take an image in any format directly into a spool, SAP is only able to print TIFFs and BMPs (and not all "sub-formats") into spools.
    You first need to know what image formats you have to print, to make sure you're able to process all of these formats.
    You may try to use OLE technology to embed the image into a Word document for example, and print this document.

  • It cannot reference the dynamic internal table in memory as an object.

    Hi,
    I am getting the syntax error in the second select. I guest it cannot reference the dynamic internal table in memory as an object.
    The internal table contains different fields from multiple tables and it gets created OK. Then the first select within the loop executes OK allowing me to read the multiple tables in ITABLES.
    * 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.
    ***OK, the dynamic tables is created here
      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>.
    loop at ITABLES.
    ***OK, no syntax errors in this select here
      select * appending corresponding fields of table <dyn_table>
                 from (ITABLES-TABNAME).
    endloop.
    data: ikonp like konp occurs 0 with header line.
    ***NOT OK, there is syntax errors
      select * into table ikonp
      from KONP for all entries in <dyn_table>
      where knumh = <dyn_table>-knumh.
    Some of the tables in ITABLES are pooled tables which does not allow me to use INNER JOINS. Therefore I need a second select in order to read the pricing table KONP.
    Thanks in advance for any hint.

    Hi Abel,
    You must be getting the syntax error that <dyn_table> does not contain the field knumh.
    try putiing the entire where clause in a char type variable say wa_char and then use in ur query as
    where (wa_char) .. it may work..
    concatenate 'knumh' '=' '<dyn_table>-knumh' INTO wa_char SEPARATED BY SPACES.
    SELECT ... from konp...
    where (wa_char).
    Revert if it doesnt work.

  • Need information about Internal Tables

    Hi Every one!
    I Need some information about Internal tables. Pls help be above the same.
    Thanks & with Regards,
    Chandra.

    Hi..,
    <b>
    Internal tables </b>
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
    <b>Internal Tables as Data Types</b>
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    <b>Line type</b>
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    <b>Key</b>
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    <b>
    Table type</b>
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    <u>Standard tables</u> have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    <u>
    Sorted tables</u> are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    <u>
    Hashed tables</u> have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    <b>
    Generic Internal Tables</b>
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
    <b>Internal Tables as Dynamic Data Objects</b>
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    <b>
    Choosing a Table Type</b>
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    <b>
    Standard tables</b>
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    <b>Sorted tables</b>
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    <b>
    Hashed tables</b>
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    regards,
    sai ramesh

  • Creation of Internal Table from Object created by OOPS

    HI All,
    go_obj_ref = cl_abap_typedescr=>describe_by_data( go_drvr ).
    I have got the data in go_drvr object. From that I want to create an internal table. So that I can display output using ALV Grid. Please help me.

    Hi athul,
    data : idetails type abap_compdescr_tab.
    As i know go_obj_ref is a work area.
    idetails[] = go_obj_ref->components[].
    now loop this and teh data to u r internal table and you can assign it to ur alv.
    Thanks

Maybe you are looking for

  • Transfer data from MS Excel to Oracle table

    Hello, hope someone can help: What is the easiest way to transfer data from Excel sheet to a Oracle table and how ? An example of a row to transfer is given below Date Time Value 1 Value 2 2004-02-02     03:47:39     9,62     3,62      Thanks in adva

  • Full thread dump Java HotSpot(TM) Server VM (1.4.2_05-b04 mixed mode):

    Hi All, I am getting below error message when i am starting JBoss Anyone has any idea, why it is happening? Full thread dump Java HotSpot(TM) Server VM (1.4.2_05-b04 mixed mode): "RMI ConnectionExpiration-[127.0.0.1:33030]" daemon prio=1 tid=0x2a375e

  • Web server Migration

    Hi all, I have a web server with SOWS 6.1 SP7 and I want replicate then upgrade all the instances to the Sun Java System Web Server 7 Up1. Is there a way to do so? What are the steps I should follow to intesad of copying every single configurations,f

  • Ready interfaces in the XI\PI

    hello experts does any one konw which ready interfaces are available with the XI\PI? (what I mean, is like there are ready IDOC and RFC that are installed in the system and no need to develop them, are they ready tpz files which have inside all the D

  • BPM - Save as draft

    Hi Experts, Customer creation in MDM using Webdynpro Java UI, Webservice and BPM for approval process. Scenario -"Save as Draft" :                 Requestor fills in the form and save it as draft. Draft requested are accessed again through uwl inbox.