Append data to a nested table within structure

I am trying to write some code (not really an ABAPer but helping out) and my code is not quite working.
i have a structure that is made up of up three tables and a structure.  it is part of an DIMP add on.
I have typed my tables and structures and tables in line with target definition, however my data is not being passed across...
i have tried a number of different ways of doing this, but have been unsuccessful.  I am sure i am close, but would like some guidance...
         LOOP AT gt_mpdcycle INTO gs_mpdcycle.
            APPEND gs_mpdcycle TO gs_create_mpd-cycledata.
            INSERT gs_create_mpd-cycledata INTO gs_create_mpd.
          ENDLOOP.
the gs_create_mpd is typed to the overall structure...  the gt_mpdcycle is typed to table of mpdcycle and gs_mpdcycle is typed to mpdcycle structure.  the gs_create_mpd-mpdcycle is typed as type table of mpdcycle.
i have also tried the following:
gs_create_mpd-cycledata[] = gt_mpdcycle[].
and
INSERT gt_mpdcycle INTO gs_create_mpd-cycledata.
does that make sense?  can someone suggest a way of doing this?

I knew i was close!
          LOOP AT gt_mpdcycle INTO gs_mpdcycle.
            APPEND gs_mpdcycle TO gs_create_mpd-cycledata.
*            INSERT gs_create_mpd-cycledata INTO gs_create_mpd.
          ENDLOOP.

Similar Messages

  • Unable to retrieve data from a nested table in Oracle 8i from JSP

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

  • How to select data from one nested table and into another nested table

    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    Thanks,
    in advance

    >
    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    >
    Not unless you provide the code you are actually using.
    There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
    And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
    Post the actual code you are using and all of the structures being used.
    Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing.

  • Appending data from amultiple internal tables

    Hi Experts,
    I need to append data from more than one internal tables to one internal table. But the internal tables has different structure.
    For example, I have internal tables I_A550 table which has field KNUMH, and I_A573 which has same filed KNUMH. Same way I have 25 tables, and all have KNUMH field.
    Now I have taken an internal table I_AXXX which has only one field KNUMH. I need to transfer data from all those 25 tables to I_AXXX.
    I wrote code as below.
    LOOP AT I_A550
       MOVE I_A550-KNUMH to I_AXXX-KNUMH.
       APPEND I_AXXX.
    ENDLOOP.
    LOOP AT I_A573.
        MOVE I_A573-KNUMH to I_AXXX-KNUMH.
        APPEND I_AXXX.
    ENDLOOP.
    But instead of writing 25 loops, is there any way we can simplify this?
    Thanks in advance.

    Hi,
    Just use field-symbols for your purpose as follows:-
    See the example below
    TYPES: BEGIN OF y_t_final,
           matnr TYPE matnr,
           END OF y_t_final.
    TYPES: y_tt_final TYPE STANDARD TABLE OF y_t_final.
    data : WA_mara type mara,
           wa_mard type mard.
    DATA : itab  TYPE STANDARD TABLE OF mara.
    DATA : itab1 TYPE STANDARD TABLE OF mard.
    DATA : it_final TYPE STANDARD TABLE OF y_t_final.
    DATA : wa_final TYPE y_t_final.
    wa_mara-matnr = '1'.
    append wa_mara to itab.
    wa_mard-matnr = '2'.
    append wa_mard to itab1.
    PERFORM f_loop USING  itab
                   CHANGING it_final.
    PERFORM f_loop USING  itab1
                   CHANGING it_final.
    The code inside the perform is as follow:-
    FORM f_loop  USING    p_itab TYPE ANY TABLE
                 CHANGING p_it_final TYPE y_tt_final.
      FIELD-SYMBOLS : <fs>     TYPE ANY TABLE,
                       <wa>    TYPE ANY,
                       <field> TYPE ANY.
      DATA: l_data TYPE REF TO data.
      ASSIGN p_itab TO <fs>.
      IF <fs> IS ASSIGNED.
        CREATE DATA l_data LIKE LINE OF <fs>.
        ASSIGN l_data->* TO <wa>.
        IF <wa> IS ASSIGNED.
          LOOP AT <fs> INTO <wa>.
            ASSIGN component 'MATNR' of structure <wa> TO <field>.
            IF <field> IS ASSIGNED.
              MOVE <field> TO wa_final-matnr.
              append wa_final to p_it_final.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.
    I hope you can understand the concept.
    Regards,
    Ankur Parab

  • Datapump : How to append data in an existing table

    Hello Everyone,
    We are new to Datapump.
    We try to extract data from one user/schema and to append it into another user/schema.
    First we tried Tt use the parameter table_exists_action=append during the importation but we receive this error (but the rows are appended):
    ORA-39152: Table "XXXXX"."YYYYY_ZZZ" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
    Which I don't expect since the utility have been told to, indeed, append data.
    Next we tried to use CONTENT=DATA_ONLY on exportation and importation but the importation never end.
    How can we append data into a table's user/schema without having an error?
    Best regards.
    Carl

    IGNORE=Y during the import.it does the same operation. if the table already exists,it ignores and proceed with importing/appending data to the tables. same way, they do have indexes=n and constraints=n option.
    both export/import have equivalent options for fitering to our requirement and datapump has one step above classic import in which you can filter upto metadata object as well.

  • Storing data in data bse using nested tables

    using nested tables data can be stored in data base or not.
    if yes i need simple example for taht and how to retireve the data from data base.

    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11822/adobjvew.htm#ADOBJ00511
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/composites.htm#LNPLS99981

  • Storing data in data abse using nested  table

    using nested table is it possible 2 store data in data base .give me simple example how tos tore data in data abse usingnested tables.and how to retieve it from data abse.

    See: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:410619303624

  • Append data to a temporary table in Data Serices

    Folks,
    The job in data services that we have, has multiple work flows that try to append the data to the same target in multiple stages. I was wondering if there is a way to have a temporary table created within Data services where data can be appended to the temp table in each stage and at the end of all stages, the temporary table is mapped to the data target (BW datasource) in our case. I am not sure if data transfer transformation can be used for temp table storage, but can someone please advise if there is a way to do it.
    Best regards,
    Doniv

    Hi,
    For temp table just drag the table icon from the right side or menu pane.
    Connect to a query transform and run the job.
    You need to run the job atleast once for creating the table. After running the job once, double click the table and uncheck the two options i mentioned above from options.
    Then proceed with further runs to append the table with records.
    Hope this helps.
    Arun

  • Append data to an excel table

    I want to append new numerical data to an existing excel table.

    If you are using ActiveX to write to an open Excel document, you can ask Excel how many rows are currently in the document.
    From the reference for WorkSheet, wire a property node and select UsedRange. Cascade that into another property node and select Rows. Cascade that into another property node and select Count.
    This will return the number of rows that have been written. Just add 1 and use that number for your starting address.
    Michael
    ABCDEF
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector
    Attachments:
    Excel_Get_Used_Range.vi ‏48 KB

  • 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

  • Inserting Data into nested table

    I am exploring the differences between OBJECT & RECORD.
    As i am still in process of learning, I found that both are structures which basically groups elements of different datatypes or columns of different datatypes, one is used in SQL and other is used in PL/SQL, please correct me if I am wrong in my understanding.
    Below i am trying to insert data into an table of type object but i am unsuccessful can you please help.
    CREATE OR REPLACE type sam as OBJECT
    v1 NUMBER,
    v2 VARCHAR2(20 CHAR)
    ---Nested Table---
    create or replace type t_sam as table of sam;
    --Inserting data----
    insert into table(t_sam) values(sam(10,'Dsouza'));
    Error Message:
    Error starting at line 22 in command:
    insert into table(t_sam) values(sam(10,'Dsouza'))
    Error at Command Line:22 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 -  "invalid table name"
    *Cause:   
    *Action:

    Ariean wrote:
    So only purpose of equivalent SQL types concept of nested tables is to use them as one of the data types while defining an actual table?
    Sort of - you can definitely use them for more than just "defining an actual table". (I'm fairly certain you could pass a nested table into a procedure, for example - try it, though - I'm not 100% sure on that - it just "makes sense". If you can define a type, you can use it, pass it around, whatever.).
    Ariean wrote:
    And that nested table could be a record in SQL or an Object in PLSQL or just simple datatype(number,varchar etc)?
    Nested tables are just like any other custom data type. You can create a nested table of other data types. You can create a custom data type of nested tables.
    It could get stupidly .. er, stupid O_0
    CREATE TYPE o_myobj1 AS object ( id1   number, cdate1  date );
    CREATE TYPE t_mytype1 AS table of o_myobj1;
    CREATE TYPE o_myobj2 AS object ( id2   number,  dumb  t_mytype1 );
    CREATE TYPE t_dumber AS table of o_myobj2;
    O_0
    Ok, my brain's starting to hurt - I hope you get the idea
    Ariean wrote:
    Secondly is my understanding correct about OBJECT & RECORD?
    I can't think of any benefit of describing it another way.

  • Defining nested table storage for UDT within another UDT

    If I have two types, a FOO UDT which contains a BAR UDT, like this:
    CREATE TYPE FOO AS OBJECT (
    MY_BAR BAR
    CREATE TYPE BAR AS OBJECT (
    A_NESTED_TABLE NESTED_TABLE_TYPE
    Now when I create a table of FOO, I need to define the storage for the nested table within FOO's BAR. What is the correct syntax to that? This does not work, naturally because it doesn't specify that A_NESTED_TABLE belongs to BAR, not FOO.
    create table FOO_TAB OF FOO
    nested table A_NESTED_TABLE STORE AS A_NESTED_TABLE_STORAGE;

    sb92075 wrote:
    nested tables are evil & should be avoided.
    they buy nothing but heartburn & grief.I agree. I'm finding them difficult to work with but I am biased towards a relational model because I've always worked with tables and constraints.

  • Internal Table and Structures

    Hi,
    I am a beginer. I know how to create a structure and how to create an internal table using ABAP/4. My problem is, i don't understand where to use internal table and structure, also i find myself very confused about the explicit work areas.
    Plese someone show me a program by explaining all of this clearly.

    Hi
    Internal tables are the core of ABAP. They are like soul of a body. For any program we use
    internal tables extensively. We can use Internal tables like normal data base tables only, but the
    basic difference is the memory allocated for internal tables is temporary. Once the program is
    closed the memory allocated for internal tables will also be out of memory.
    But while using the internal tables, there are many performance issues to be considered. i.e which
    type of internal table to be used for the program..like standard internal table, hashed internal
    table or sorted internal table etc..
    Internal tables
    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.
    Internal Tables as Data Types
    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.
    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.
    Key
    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.
    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 not. 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.
    Generic Internal Tables
    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.
    Internal Tables as Dynamic Data Objects
    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.
    Choosing a Table Type
    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.
    Standard tables
    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.
    Sorted tables
    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.
    Hashed tables
    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.
    Creating Internal Tables
    Like other elements in the ABAP type concept, you can declare internal tables as abstract data
    types in programs or in the ABAP Dictionary, and then use them to define data objects.
    Alternatively, you can define them directly as data objects. When you create an internal table as a
    data object, you should ensure that only the administration entry which belongs to an internal
    table is declared statically. The minimum size of an internal table is 256 bytes. This is important if an
    internal table occurs as a component of an aggregated data object, since even empty internal
    tables within tables can lead to high memory usage. (In the next functional release, the size of the
    table header for an initial table will be reduced to 8 bytes). Unlike all other ABAP data objects, you
    do not have to specify the memory required for an internal table. Table rows are added to and
    deleted from the table dynamically at runtime by the various statements for adding and deleting
    records.
    You can create internal tables in different types.
    You can create standard internal table and then make it sort in side the program.
    The same way you can change to hashed internal tables also.
    There will be some performance issues with regard to standard internal tables/ hashed internal
    tables/ sorted internal tables.
    Internal table types
    This section describes how to define internal tables locally in a program. You can also define internal tables globally as data types in the
    ABAP Dictionary.
    Like all local data types in programs , you define internal tables using the TYPES statement. If you do not refer to an existing table type
    using the TYPE or LIKE addition, you can use the TYPES statement to construct a new local internal table in your program.
    TYPES <t> TYPE|LIKE <tabkind> OF <linetype> [WITH <key>]
    [INITIAL SIZE <n>].
    After TYPE or LIKE, there is no reference to an existing data type. Instead, the type constructor occurs:
    <tabkind> OF <linetype> [WITH <key>]
    The type constructor defines the table type <tabkind>, the line type <linetype>, and the key <key> of the internal table <t>.
    You can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    Table type
    You can specify the table type <tabkind> as follows:
    Generic table types
    INDEX TABLE
    For creating a generic table type with index access.
    ANY TABLE
    For creating a fully-generic table type.
    Data types defined using generic types can currently only be used for field symbols and for interface parameters in procedures . The generic
    type INDEX TABLE includes standard tables and sorted tables. These are the two table types for which index access is allowed. You cannot
    pass hashed tables to field symbols or interface parameters defined in this way. The generic type ANY TABLE can represent any table. You
    can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and
    parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed.
    Fully-Specified Table Types
    STANDARD TABLE or TABLE
    For creating standard tables.
    SORTED TABLE
    For creating sorted tables.
    HASHED TABLE
    For creating hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for
    standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    Line type
    For the line type <linetype>, you can specify:
    Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the
    ABAP Dictionary. If you specify any of the generic elementary types C, N, P, or X, any attributes that you fail to specify (field length, number
    of decimal places) are automatically filled with the default values. You cannot specify any other generic types.
    Any data object recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data
    type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and
    structures in the ABAP Dictionary (for compatibility reasons).
    All of the lines in the internal table have the fully-specified technical attributes of the specified data type.
    Key
    You can specify the key <key> of an internal table as follows:
    [UNIQUE|NON-UNIQUE] KEY <col1> ... <col n>
    In tables with a structured line type, all of the components <coli> belong to the key as long as they are not internal tables or references,
    and do not contain internal tables or references. Key fields can be nested structures. The substructures are expanded component by
    component when you access the table using the key. The system follows the sequence of the key fields.
    [UNIQUE|NON-UNIQUE] KEY TABLE LINE
    If a table has an elementary line type (C, D, F, I, N, P, T, X), you can define the entire line as the key. If you try this for a table whose line
    type is itself a table, a syntax error occurs. If a table has a structured line type, it is possible to specify the entire line as the key. However,
    you should remember that this is often not suitable.
    [UNIQUE|NON-UNIQUE] DEFAULT KEY
    This declares the fields of the default key as the key fields. If the table has a structured line type, the default key contains all non-numeric
    columns of the internal table that are not and do not contain references or internal tables. If the 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.
    Specifying a key is optional. If you do not specify a key, the system defines a table type with an arbitrary key. You can only use this to
    define the types of field symbols and the interface parameters of procedures . For exceptions, refer to Special Features of Standard Tables.
    The optional additions UNIQUE or NON-UNIQUE determine whether the key is to be unique or non-unique, that is, whether the table can
    accept duplicate entries. If you do not specify UNIQUE or NON-UNIQUE for the key, the table type is generic in this respect. As such, it can
    only be used for specifying types. When you specify the table type simultaneously, you must note the following restrictions:
    You cannot use the UNIQUE addition for standard tables. The system always generates the NON-UNIQUE addition automatically.
    You must always specify the UNIQUE option when you create a hashed table.
    Initial Memory Requirement
    You can specify the initial amount of main memory assigned to an internal table object when you define the data type using the following
    addition:
    INITIAL SIZE <n>
    This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to
    reserve memory space for <n> table lines when you declare the table object.
    When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each
    are then allocated.
    You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The
    space occupied, depending on the line width, is 16 <= <n> <= 100.
    It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and
    need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for
    deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
    To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the
    length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB.
    Examples
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    The program defines a table type ITAB. It is a sorted table, with line type of the structure LINE and a unique key of the component
    COLUMN1.
    TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    TYPES: BEGIN OF DEEPLINE,
    FIELD TYPE C,
    TABLE1 TYPE VECTOR,
    TABLE2 TYPE ITAB,
    END OF DEEPLINE.
    TYPES DEEPTABLE TYPE STANDARD TABLE OF DEEPLINE
    WITH DEFAULT KEY.
    The program defines a table type VECTOR with type hashed table, the elementary line type I and a unique key of the entire table line. The
    second table type is the same as in the previous example. The structure DEEPLINE contains the internal table as a component. The table
    type DEEPTABLE has the line type DEEPLINE. Therefore, the elements of this internal table are themselves internal tables. The key is the
    default key - in this case the column FIELD. The key is non-unique, since the table is a standard table.
    Internal table objects
    Internal tables are dynamic variable data objects. Like all variables, you declare them using the DATA statement. You can also declare static
    internal tables in procedures using the STATICS statement, and static internal tables in classes using the CLASS-DATA statement. This
    description is restricted to the DATA statement. However, it applies equally to the STATICS and CLASS-DATA statements.
    Reference to Declared Internal Table Types
    Like all other data objects, you can declare internal table objects using the LIKE or TYPE addition of the DATA statement.
    DATA <itab> TYPE <type>|LIKE <obj> [WITH HEADER LINE].
    Here, the LIKE addition refers to an existing table object in the same program. The TYPE addition can refer to an internal type in the
    program declared using the TYPES statement, or a table type in the ABAP Dictionary.
    You must ensure that you only refer to tables that are fully typed. Referring to generic table types (ANY TABLE, INDEX TABLE) or not
    specifying the key fully is not allowed (for exceptions, refer to Special Features of Standard Tables).
    The optional addition WITH HEADER line declares an extra data object with the same name and line type as the internal table. This data
    object is known as the header line of the internal table. You use it as a work area when working with the internal table (see Using the
    Header Line as a Work Area). When you use internal tables with header lines, you must remember that the header line and the body of the
    table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate
    this by placing brackets after the table name (<itab>[]). Otherwise, ABAP interprets the name as the name of the header line and not of the
    body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested
    in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.
    TYPES VECTOR TYPE SORTED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    DATA: ITAB TYPE VECTOR,
    JTAB LIKE ITAB WITH HEADER LINE.
    MOVE ITAB TO JTAB. <- Syntax error!
    MOVE ITAB TO JTAB[].
    The table object ITAB is created with reference to the table type VECTOR. The table object JTAB has the same data type as ITAB. JTAB also
    has a header line. In the first MOVE statement, JTAB addresses the header line. Since this has the data type I, and the table type of ITAB
    cannot be converted into an elementary type, the MOVE statement causes a syntax error. The second MOVE statement is correct, since
    both operands are table objects.
    Declaring New Internal Tables
    You can use the DATA statement to construct new internal tables as well as using the LIKE or TYPE addition to refer to existing types or
    objects. The table type that you construct does not exist in its own right; instead, it is only an attribute of the table object. You can refer to
    it using the LIKE addition, but not using TYPE. The syntax for constructing a table object in the DATA statement is similar to that for defining
    a table type in the TYPES statement.
    DATA <itab> TYPE|LIKE <tabkind> OF <linetype> WITH <key>
    [INITIAL SIZE <n>]
    [WITH HEADER LINE].
    As when you define a table type , the type constructor
    <tabkind> OF <linetype> WITH <key>
    defines the table type <tabkind>, the line type <linekind>, and the key <key> of the internal table <itab>. Since the technical attributes of
    data objects are always fully specified, the table must be fully specified in the DATA statement. You cannot create generic table types (ANY
    TABLE, INDEX TABLE), only fully-typed tables (STANDARD TABLE, SORTED TABLE, HASHED TABLE). You must also specify the key and whether
    it is to be unique (for exceptions, refer to Special Features of Standard Tables).
    As in the TYPES statement, you can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    You can create an internal table with a header line using the WITH HEADER LINE addition. The header line is created under the same
    conditions as apply when you refer to an existing table type.
    DATA ITAB TYPE HASHED TABLE OF SPFLI
    WITH UNIQUE KEY CARRID CONNID.
    The table object ITAB has the type hashed table, a line type corresponding to the flat structure SPFLI from the ABAP Dictionary, and a
    unique key with the key fields CARRID and CONNID. The internal table ITAB can be regarded as an internal template for the database table
    SPFLI. It is therefore particularly suitable for working with data from this database table as long as you only access it using the key.

  • Nested Tables and Predictable Attributes

    BOL states "The data in a nested table can be used for prediction or for input, or for both. For example, you might have two nested table columns in a model: one nested table column might contain a list of the products that a customer
    has purchased, while the other nested table column contains information about the customer's hobbies and interests, possibly obtained from a survey. In this scenario, you could use the customer's hobbies and interests as an input for analyzing purchasing behavior,
    and predicting likely purchases."
    However I cannot find where it states you cannot use a predictable attribute from a Nested Table within the Neural Network algorithm.
    Can you please tell me why I receive the error "Microsoft Neural Network does not support predictable nested tables" when attempting to process my model with one predictable column in a Nested Table, or am I missing something? The
    same structure works fine for Naive Bayes, Decision Trees etc but not for Neural Network of Logistic Regression.

    Hi Namak,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Nested tables in RTF templates

    Hi,
    I've developed several templates including nested tables(to display parent/child transactions together in a single column group, displaying all the detail transactions but the parent only once), in PDF output this looks fine. However the users want all their output in Excel, this same layout is not picked up by Excel(all column headers for the data in the nested table move to the right, while all the data in the nested table is grouped under a 'merged cell' column header). Output of BI Publisher reports in Excel is generally terrible with a template designed for publishing in PDF, usually I can solve this with a lot of tweaking but haven't found a solution for this issue yet. Has anyone else run into this formatting issue and may have a tip to solve this?
    Regards,
    Arthur

    Hi,
    You need to declare a TYPE object as and then use it in the table structure.
    CREATE TYPE type_emp IS TABLE OF VARCHAR2(15);
    CREATE TABLE Biscuits Company SA
    (company_name COMPANY NOT NULL,
    Company_Owner VARCHAR2(20) NOT NULL)
    NESTED TABLE staff_tab STORE AS type_emp;
    Please see the link for more info.
    http://www.developer.com/db/article.php/10920_3379271_3
    Thanks

Maybe you are looking for