Purpose of Row type, line type and Table Type..

Hi All,
Just I’m started working with OOABAP. Whenever I open some structures, most of the components in the structures have the below three words. What is the exact difference b/w the below words. What is purpose those?
Row type, line type
Table type:
Please let me know.

hi,
Line Type
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.
Table type
The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
Standard tables 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.
Sorted tables 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 NON-UNIQUE. Standard tables and sorted tables are known generically as index tables.
Hashed tables 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.
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.
At tables with structured row type, the standard key is formed from all character-type columns of the internal table. 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. At tables with non-structured row type, the standard key consists of the entire row. If the row type is also a table, an empty key is defined.
The user-defined key can contain any columns of the internal table that are no internal table themselves, and do not contain internal tables. References are allowed as table keys. 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.
Internal tables are always completely specified regarding row type, key and access type
Hope this helps.

Similar Messages

  • Difference between line type and table type

    hi,
    can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's

    hi,
    Go through this blog, this might help you.
    /people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
    People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
    In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
    With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
                            "InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
    class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
    Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
    In a BSP when we need to work with a table we must always do the following:
    1, in the Types definitions create a structure:
                            types : begin of ts_reclist,
    mso-bidi-        style='mso-tab-count:2'>                            receiver type somlreci1-receiver,
    mso-bidi-        style='mso-tab-count:2'>                 style='mso-tab-count: 1'>             rec_type type somlreci1-rec_type,
    mso-bidi-         style='mso-tab-count:2'>                            end of ts_reclist.
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
    2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
    class="MsoNormal">                         types : tt_reclist type table of ts_reclist.
    class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
    3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
                           data: t_reclist type tt_reclist.
    and creating the structure based upon the structure definiton:
    <![if !supportEmptyParas]>   <![endif]>                         data: s_reclist type ts_reclist.
    as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
                            s_reclist-receiver = '[email protected]'.   "<-- change address
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    mso-bidi-                         s_reclist-rec_type = 'U'.
    and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
                            append s_reclist to t_reclist.
    <![if !supportEmptyParas]> <![endif]>
    the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1">           style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>          
    class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                            EXPORTING
    style='mso-tab-count:2'>                                    document_data = docdata
    style='mso-tab-count:2'>                                    DOCUMENT_TYPE = 'RAW'
    style='mso-tab-count:2'>                                    PUT_IN_OUTBOX = 'X'
    style='mso-tab-count:2'>                                    COMMIT_WORK = 'X' "used from rel.6.10
                            TABLES
    mso-bidi-font-size: style='mso-tab-count:2'>                                    receivers = t_reclist
    class="style1"> <![if !supportEmptyParas]>   <![endif]>
    <![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
    <![if !supportEmptyParas]> “when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.”
    Hope this helps, Do reward.

  • Definitions of record and table type

    I’m confused with the definition of record and table type. Below is my understanding, Please correct me if anything wrong. Thanks in advance!
    Record type can only hold one record with multiple fields.
    Table type is an array (multiple records) with only one field
    Table type defined with %rowtype (table of records) is an array of multiple records with multiple fields.

    I am not sure that I understand what you are asking. I have not heard the term table type before.
    However, I think a record type is more closely aligned to the %rowtype declaration. Maybe a collection is what you are looking for with the term table type.
    From the Oracle 10g documentation:
    %ROWTYPE
    In PL/SQL, records are used to group data. A record consists of a number of related fields in which data values can be stored. The %ROWTYPE attribute provides a record type that represents a row in a table. The record can store an entire row of data selected from the table or fetched from a cursor or cursor variable.
    Columns in a row and corresponding fields in a record have the same names and datatypes. In the example below, you declare a record named dept_rec. Its fields have the same names and datatypes as the columns in the dept table.
    DECLARE
    dept_rec dept%ROWTYPE; -- declare record variable

  • Calling Oracle Stored proc with record type and table Type

    I have a oracle SP which takes record type and table Type which are used for order management.
    Is there anay way to populate parameters with these datatypes and call the stored procedure using ODP.NET?
    Please help.
    Thanks in advance

    Hi,
    ODP supports associative arrays and REF Cursors. There is no support for PLSQL table of records.
    Jenny

  • How does a record type and table type works

    Hi,
    How a record type and table type work for the ref cursor,
    below i m giving an example but its giving me errors
    can any one help me for this?
    declare
    type empcurtyp is ref cursor;
    type rectype is record (veid t.emp_id%type, vename t.ename%type);
    TYPE tabtype IS TABLE OF rectype;
    empcv empcurtyp;
    vtab tabtype;
    begin
    open empcv for select emp_id,ename from t;
    loop
    fetch empcv into vtab;
         exit when empcv%notfound;
         dbms_output.put_line(vtab.vename||vtab.veid);
    end loop;
    close empcv;
    end;
    here we hav table t and i m taking only two fields of the table t which r emp_id and ename.

    Hi,
    What errors are you getting with this? From experience you don't need a loop to put the records into the ref cursor its usually done on block.
    HTHS
    L :-)

  • Calrification of structure and table type

    hai experts,
    what is the difference between STRUCTURE AND TABLE TYPE?

    Refer this for TABLE TYPE
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    STRUCTURE
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2d74358411d1829f0000e829fbfe/content.htm
    SE11, In structre u <b>cant maintain any values</b>. Its just used as a refernce.
    In tables u can maintain values.

  • How could I retrieve metadata about Array Type and Table Type?

    I use DatabaseMetaData.getUDTs() method for obtain metadata about Object Types, but this method doesn't work with Array Type and Table Type.

    JJ,
    Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
    Crystal

  • Defining Record and Table Types

    Is there a good tutorial out there somewhere that provides good examples on how to define and work with Record and Table Types? How to define and work with an entire record or table as opposed to just a variable?
    For instance- I'd like to create a cursor of records from a table, loop through each record to examine variable values, and in some instances insert those entire records into another table.
    Thanks in advance for any suggestions.

    Oracle documentation is excellent (Lots of live examples that can be cutNpaste) place to start.
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm
    Is there any thing specific you are looking for?
    vr,
    Sudhakar B.

  • Difference between Table and Table Type

    Hi
       Can you please let me know the
    Difference between Table and Table Type and
    Difference between Structure and Table Type?
    Regards,
    Sree

    hi,
    table is a data dictionary object in sap. table is of different types
    1. transparent tables
    2. pool tables
    3. cluster tables
    table type gives option for u to select different types of internal tables. they r
    1. standard table
    2. sorted table
    3. hash table
    Structures :
    -Defined like a table and can then be addressed from ABAP programs.
    -Structures contain data only during the runtime of a program.
    -Just like user-defined data type.
    - they are not present in database server and only on application server.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Urgent : How to modify the line type and table type

    I am working on ALV Grid Control, i need to know how to modify the line type values to table type.
                 ls_celltab-fieldname = 'ZSAVINGS '.
                 ls_celltab-style = l_mode.
            INSERT ls_celltab INTO TABLE pt_celltab.
    Here ls_celltab is line type and pt_celltab is table type.
    Please give me the suggestion ASAP.
    C.Bharath Kumar

    Hi,
    Here is the example
    DATA: BEGIN OF LINE,
            LAND(3)  TYPE C,
            NAME(10) TYPE C,
            AGE      TYPE I,
            WEIGHT   TYPE P DECIMALS 2,
          END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE
              WITH NON-UNIQUE KEY LAND NAME AGE WEIGHT.
    LINE-LAND = 'G'.   LINE-NAME   = 'Hans'.
    LINE-AGE  = 20.    LINE-WEIGHT = '80.00'.
    INSERT LINE INTO TABLE ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Nancy'.
    LINE-AGE  = 35.    LINE-WEIGHT = '45.00'.
    INSERT LINE INTO TABLE ITAB.
    Regards
    Sudheer

  • What is the maximum rows allowed in PLSQL array table type?

    Hi,
    I have a procedure and it contains the cursor which will fetch more than 500 records. And i have 5 output parameters to store the values coming from the cursor. I don't want to store that into custom table. I want to save it one table type array or something like that. Now i want to know what is the maximum storage of array table type? If i store more than 500 data, how will be the performance? Then is there any other way to achieve this? And that should not decrease the preformace.Let me know your thoughts.
    Thanks

    It really depends on what you are planning to do with the records once you return them from your stored procedure, and what client is on the receiving end of the results.
    One option would be to just return a ref cursor and let the client deal with retreiving the rows themselves, whether one by on or by a bulk collect. Another option would be to declare a table of records matching the result set and do a bulk collect into that table type in your procedure and return the table type to the caller. You could also declare a table type for each field in the resultset, bulk collect the records into thos types and return one for each field.
    Personally, I would likely go with returning a ref cursor. Both of the collect the resultset in your procedure and then return collections to the caller methods require memory on the database server to hold the entire resultset and memeory on the client to hold the entire resultset. While 500 records is probably not going to be too bad on memory, if the result set grows, you will run into memory issues at some point.
    John

  • Initial line number in Table type

    Hi,
    What does Initial line number signifies in the Table type-->Initialization and Access tab. No help documentation is present for this tab. is it allocates initial memory or is there any other functionality of initial line number.
    thanks,
    tanmaya

    I believe it is the equivalent of the OCCURS keyword when you define an internal table in ABAP. In structure DD40V, the field is called OCCURS!
    matt

  • How to handle plsql Object and Table type inside BPEL

    Hi All,
    I have a procedure with 5 IN and 4 OUT parameters. Out of 4, One is Object type and remaining 3 are Table type. Now in my bpel, i am calling this proc from DB Adapter. The DB Adapter wizard created XSD with proper structure. But when i am testing this i am not getting these out parameters values in the payload of Invoke DBAdapter activity. I am neither getting errors nor output.
    What could be the issue.?
    Thanks in advance,
    Sudheer

    Arik,
    JDev is not creating any wrapper packages as such. It simply created a XSD with same as my procedure name.
    My XSD looks like this...
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="P_OBJ_H_INFO_O" type="db:APPS.H_OBJ_TYPE" db:index="6" db:type="Struct" minOccurs="0" nillable="true"/>
    <element name="P_TAB_L_INFO_O" type="db:APPS.L_TAB_TYPE" db:index="7" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_M_INFO_O" type="db:APPS.M_TAB_TYPE" db:index="8" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_A_INFO_O" type="db:APPS.A_TAB_TYPE" db:index="9" db:type="Array" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    And again the 3 table types internally referring object types.
    Thanks for reply. Awaiting response...
    Sudheer

  • GenIL model generation and Table types

    When we run the GenIL model generation program, it generates ZMDL* structures for each Z* structures generated previously by SPROXY. But each element that is a Table type is skipped. So the GenIL model is incomplete and does not contain table elements.
    For exemaple, assuming the existing Z_QUERY_ELMTS structure generated by SPROXY:
    CONTROLLER          Types          PRXCTRLTAB
    W_SYSTEM                               Types          CHAR
    SELECTION_BY_NIIN                          Types          ZMATERIAL_BY_EL_QU_S_SEL_N_TAB
    SELECTION_BY_PART_NUM     Types          ZMATERIAL_BY_EL_QU_S_SEL_P_TAB
    DESCRIPTION          Types          ZSEARCH_TEXT     STRING
    EIAC               Types          ZEIACCODE     STRING
    the corresponding ZMDL structure is
    WEAPON_SYSTEM     Types     CHAR2                          CHAR
    DESCRIPTION     Types     ZMDLSEARCH_TEXT     STRING
    EIAC                          Types     ZMDLEIACCODE     STRING
    So every table type is skipped.
    Is it a limitation of the product? Or a missing functionanliy?
    Thanks in advance for your help

    By the way in the developer guide, it's also confusing:
    - Creation of root object, p.47
    Type Name: This is the data type which you retrieved above (ZSALES_ORDER_HEADER_DETAILS) u2013 the root attribute structure of the business object will be based on this structure. This structure has to completely define the attributes (payload) of your business object and typically matches with the response of the Read operation. Make sure this structure is u201Cflatu201D and does not contain any complex types or tables
    - But p.51
    Take a look at the attribute structure. It contains the list of all attributes of your business object derived from the structures of the server proxy. Also take a look a folder Relations, which contains relationships to dependent objects if your data structure is of a complex nature. In our example this folder is empty since the data structure is a flat one and therefore no relationship and no dependent object are required.

  • Abap Objects and table type

    Hi,
    The following is a public attribute in the class CL_MEREP_SYNCBO_META
    data FIELD_GROUPS type MEREP_TSYNCBO_FIELD_GROUP read-only .
    MEREP_TSYNCBO_FIELD_GROUP  is a table type having ref type CL_MEREP_SYNCBO_FIELD_GROUP (which is a class)
    What is the meaning of such table type?
    Regards,
    Ravi

    Hi Ravi,
    It simply means that any data object that is declared using this table type will be able to hold the objects (actually object-references) of that class.
    You can think of it as an array of pointers (to objects).
    Regards,
    Anand Mandalika.

Maybe you are looking for

  • ITunes no longer recognizing iPod

    Following a total re-install of MacBook operating system, including an update of iTunes to 10.4, iPod touch was no longer recognized. iTunes 10.3.1 was restored, but now it also is not recognized. Another oddity is that I can not delete podcasts from

  • How to install Windows 7 from a USB drive!

    This is even easier than installing Windows XP from a USB drive, and will also reduce the time taken to install Windows 7, it took me about 15 minutes! The advice in the guide is also applicable to installing Vista. You need basically: a USB flash dr

  • How to use variable in automator?

    So I am trying to create this dictation command in automator where i can go like this "Launch Safari" or "Launch iTunes" so how to use the variable for text in the command?

  • R9 270x gaming BF4 GOP Request

    Hi, could you provide me with a GOP UEFI vBIOS for the following card: MSI R9 270x Gaming BF4 Edition SN: 602-V303-03SB1311023527 thanks in advance

  • Launch outside applicatio​n

    I am trying to create a button to launch an outside application. I am trying to run a Flash presentation of my system in operation from my front panel. Whenever the user clicks on the button, I want to execute once and then stop and exit Flash. I hav