Table And Structure related

Hi all,
Can you tell me how can i find out database table for a structure defined.
as in our program we have a lot of include programs where i need to check in each and every include... instead tell me a way to find it directly using structure name.
regards,
naveen.

Hi Naveen,
  Go to SE11 and give your Structure name and select Display.
Then Utilities -> Where Used List -> Select the Check Box "Data Base Tables ".
It will Displays all the Data Base Tables Based on your Structure.
Thanks,
Reward If Helpful.

Similar Messages

  • 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.

  • Tables and structures are used in a standard scripts

    how to find which tables and structures are used in a standard scripts?
    pls explain step by step process...
    Edited by: abap on Jun 21, 2008 4:36 PM

    Go to Transaction SE80, Select Program and paste that program name below..
    Then drop down the tree of that program...then you will find option " Dict. Structures"..
    Here you can find the tables which has been you for that transaction / program.
    Regards,
    Santosh

  • Difference btw table and structure???

    Hi all guru's
    What is the difference between table and structure??
    culd you explain me???
    regards
    ss

    hi Supriya,
    structure is one single line, while a table can have as many lines as you wish.
    hope this helps
    ec

  • Difference between Table and Structure

    Dear SD Gurus,
    Can anybody tell me what is the difference between a Table and Structure
    Pls Reply.

    Tables are Database, which stay in system for long duration , as good as permanent, untill & unless the data is archived, which is not very frequent. Data at transaction level are captured from multiple tables, so as to meet the requirement. We can view the data in the table through T.code SE11 & SE16. there are certain tables in which data can be maintained as well as displayed. To maintain data, we use T.Code: SM30 or SM31.
    Structures are temporary table & hold the data for that particular instance or transaction.
    Regards,
    Rajesh Banka
    Reward suitable points.
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).

  • How to pass the JCO Table and Structure in a collection List to frontEnd

    hi,
    I have a BAPI which is returns me a Table and a structure. As i have used JCO I will receive it in JCO Table and JCO Structure. Now the question is that how I should pass both these of these using a collection to the frontend for displaying the data from it.
    Thanks' & Regards,
    Samir

    Hi Samir,
    As you are trying to pass the Table and the Structure in the form of collection to the JSP page, you can create a javabean with the structure similar to that of the table/Structure.
    Lets assume you have a table called Employee with Emp_Name, Emp_Age, Emp_Sal as three columns, create a java class by name Employee which implements Serializable and attributes as Emp_Name, Emp_Age and Emp_Sal. Generate the setters and getters for the same. In your EJB code, create an instance of this Employee class and set the attributes and save it in a HashMap in the form of key value pair, Value being your Employee class instance and key be your Employee Name. Return the HashMap in your EJB code.
    Use the HashMap in your JSP. Get the Iterator for the HashMap and Loop through the keys to get the values.
    Hope this helps.
    Regards,
    Rekha Malavathu

  • Query Builder - 2 occurrences of same table and Show Related Tables

    In SQL Developer 1.5 the Query Builder still does not allow you to drag two copies of the same table onto the canvas. Additionally the Show Related Tables does not appear to do anything even after Hide Related Tables. Both of these operations sets the cursor to the hourglass although you can continue working as if the commands completed OK. Query Builder is a great time saver but with limitations like this it is really hobbled.
    Additionally, in order to get join conditions you have to double-click the join in the diagram before the appropriate WHERE clause appears. I have not found any reference to how to use the Query Builder in any documentation. This forum has stated that the Query Builder is supposed to be intuitive and easy to use but this is not the case so far.
    The rest of SQL Developer is a pleasure to use!

    Thanks for your feedback. There are a number of things we want to do to the Query Builder. The issue about dragging 2 copies of a table onto the work surface is a logged enhancement request that we want to address. The Show Related tables and hourglass issues are bugs and need to be addressed. I'll document those.
    Better documentation is also important and we can add that into the product for a future release.
    In the short term, I have on previous occasion said I'd do a demo for using the Query Builder, so I'll make that a priority.
    Sue

  • Help me find tables and the relation at CRM_DNO_MONITOR

    hi...
    Could anyone help me finding transparent tables of CRM_DNO_MONITOR (transaction code at solution manager)?
    So far i've found
    >CRMD_ORDERADM_H
    >DNOD_NOTIF
    >DNOD_NOTIF_S
    >BUT000
    is there any other tables?
    what i really want to find is the relations between those tables.
    i've already found relation between the three top, but i couldn't find relation the three top with BUT000.
    i think there is (are) other table(s) that related them.
    Could anyone help me?
    Thanks..

    Thanks Ram for answering my question...
    I've tried to check using SE36, i still don't get what i want.
    Actualy what i want to do is, determine the business partner for a certain GUID(or OBJECT ID).
    I've searched in this forum, some said that i had to connect it through CRMD_ORDER_INDEX.
    It didn't work. Although CRMD_ORDERADM_H and CRMD_ORDER_INDEX both had GUID field, i can't find same data at those field.
    Some also said that i had to use FM 'COM_PARTNER_CONVERT_GUID_TO_NO'.
    Aparently i can only found that this FM just for converting PARTNER to PARTNER_GUID (or PARTNER_GUID to PARTNER) that both are on the same table, that is BUT000.
    I've tried to match BUT000-PARTNER_GUID with CRMD_ORDERADM_H-GUID or  BUT000-PARTNER_GUID with CRMD_ORDER_INDEX-GUID, the result is the same, there aren't match data.
    Did i miss some step here?
    My next question is, i want to find which field and table that stores message status (New, In Process, Customer Action, Sent to SAP, Solution Proposed, and Confirmed) and how to connect those table to CRMD_ORDERADM_H.
    Thanks...

  • Merging the internal table and structure for PO text material download

    Hi Experts,
       I have a query regarding downloading the PO text from material master.Actually i have successfully downloaded the PO text using TLINE structure along with FM like READ_TEXT and GUI_Download.But when i had to append the PO text for corresponding material,there i got the problem.Let me explain clearly.Below is my coding for PO text download.In that i have used TLINE structure/table for get the POtext via FM READ_TEXT.Also I am using an internal table(It_tab) which consist fields of TDFORMAT,TDLINE and MATNR,So what i need is,i want to merge TLINES structure/table into internal table(it_tab).That is I want to display the PO text along with material No.That is my requirement.But when i append the it_tab using my coding,it was not displaying in the correct order.Attached screen shot is the sample output(excel sheet).column B and C respectively for POtext and material number.I want to get in correct order as it gets the misarrangemnt.(i.e) PO text and material number should come with the same line.So Please help me to complete this task.Kindly point out if i am wrong.
    PO TEXT download from material master :
    DATA :  BEGIN of IT_LINES OCCURS 0.
                INCLUDE STRUCTURE TLINE.
    DATA : END of IT_LINES.
    DATA : t_line TYPE STANDARD TABLE OF IT_LINES WITH HEADER LINE.
    TYPES: BEGIN OF tp_matnr,
            matnr type TDOBNAME,
            END OF tp_matnr.
          DATA:lv_matnr TYPE matnr,
           t_mara TYPE TABLE OF tp_matnr WITH HEADER LINE.
    SELECT-OPTIONS : s_matnr FOR lv_matnr.
    SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TL1.
    PARAMETERS: P_FILE(50) TYPE C.
    *PARAMETERS: P_DOWNL as CHECKBOX.
    SELECTION-SCREEN END OF BLOCK BL1.
    INITIALIZATION.
    TL1 = 'PO TEXT DOWNLOAD'.
    START-OF-SELECTION.
    SELECT matnr FROM mara INTO TABLE t_mara WHERE matnr IN s_matnr.
    DATA : BEGIN OF it_tab OCCURS 0,
             TDFORMAT type TDFORMAT,
             TDLINE type TDLINE,
             MATNR type TDOBNAME,
             END OF it_tab.
    LOOP AT t_mara.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    *   CLIENT                        = SY-MANDT
        id                            = 'BEST'
        language                      = 'E'
        name                          = t_mara-matnr
        OBJECT                        = 'MATERIAL'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
    *   OLD_LINE_COUNTER              =
       TABLES
        lines                         = t_line
    * EXCEPTIONS
    *   ID                            = 1
    *   LANGUAGE                      = 2
    *   NAME                          = 3
    *   NOT_FOUND                     = 4
    *   OBJECT                        = 5
    *   REFERENCE_CHECK               = 6
    *   WRONG_ACCESS_TO_ARCHIVE       = 7
    *   OTHERS                        = 8
    IF sy-subrc = 0.
         APPEND LINES OF t_line to it_tab.
         it_tab-tdline = t_line-tdline.                                           
         it_tab-matnr = t_mara-matnr.
         APPEND it_tab.
      ENDIF.
      ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'D:\Test.xls'
    FILETYPE = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    SHOW_TRANSFER_STATUS = 'X'
    TABLES
    DATA_TAB = it_tab

    Hi Manish,
      Thanks for the support.I did simple modify in coding.Now I got the output in the correct order.If i follow the step of it_tab-tdline = t_mara-matnr, it is storing in the column B as you mentioned.But it was displayed in the second line.So i did adjust your below coding.Finally got the solution.Thanks manish
    DATA wa_line LIKE LINE OF t_line.
    LOOP AT t_line INTO wa_line.
      it_tab-tdformat = wa_line-tdformat.
      it_tab-tdline = wa_line-tdline.
      it_tab-matnr = IT_TAB-matnr.
      APPEND it_tab.
    ENDLOOP.
    Regards,
    Kavi

  • Table and structure

    can anybody explain both table & structure and difference between them.
    How these are used to create the functional spec.

    both have fields in them but the main differnce is table can store data wheras structure can only  take the data but can not store it
    if u are running a programme and the moment programme ends all the value mentioned in structure vanish out whereas if u have mentioned tha data in table fileds they would have get stored in database even after programme ends
    as the name suggest structure is a structure of a body but it has no soul means u  it is created to avoid redundency
    u can include a structure  in table but u cant include a structure in a table
    Edited by: Rahul Tyagi on Feb 26, 2008 3:51 PM

  • SQL SELECT statement Parent_child table and its related table..... HELP plz

    I have 2 tables
    Table Parent_child_table:
    ID | Parent_id | Name
    1 | NULL | Kitchen
    2 | 1 | Freezer
    3 | NULL | Garden
    4 | 3 | Grass
    Table Products:
    ID | parent_child_table_ID | Price | Comment
    1 | 2 | 111 | aaaa
    2 | 4 | 12 | vv
    I want to select Name from parent table where selected child ID are in PRODUCT table.....
    The result would like:
    |NAME|
    |Kitchen
    |Garden
    Can someone help with this SQL SELECT ?

    Raivis wrote:
    I have 2 tables
    Table Parent_child_table:
    ID | Parent_id | Name
    1 | NULL | Kitchen
    2 | 1 | Freezer
    3 | NULL | Garden
    4 | 3 | Grass
    Table Products:
    ID | parent_child_table_ID | Price | Comment
    1 | 2 | 111 | aaaa
    2 | 4 | 12 | vv
    I want to select Name from parent table where selected child ID are in PRODUCT table.....
    The result would like:
    |NAME|
    |Kitchen
    |Garden
    Can someone help with this SQL SELECT ?A guess
    select
       p.name
    from Parent_child_table p
    where p.parent_id is null
    and exists
    select
       null
    from Parent_child_table p1, products p2
    where p1.id = p2. parent_child_table_id
    and p1.parent_id = p.id
    )The reason it's a guess is because you've really done nothing to outline WHY you should get the results you say you would like. The more time you spend creating a clear question, the less time you'll have to spend weeding through useless answers.
    Cheers,

  • Table and Index related

    Hello,
    If ur moving one table from one tbs to another what is pre-req,then whats the status of index?
    alter table tablename tablespace tablespacename move; this is the command rite?
    Are there prereq's to be followed for this?
    What would be the status of indexes?
    Kindly tell me.
    Thanks,
    928714.

    You can refer this link
    alter table move .. indexes marked unusable

  • Retrieving data from a relational table and CLOB as a whole XML file

    I created the table lob_example and I have managed to insert XML document into it using XML SQL Utility. In this document I put contents of <DESCRIPTION> tag into CDATA section.
    LOB_EXAMPLE
    Name Null? Type
    ID NOT NULL NUMBER
    DESCRIPTION CLOB
    NAME VARCHAR2(40)
    But I could not retrieve this data properly. I can think of only one solution - to parse and build the whole XMLDocument. I found the suggestion of another solution to use Oracle8i views to do that in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm, but this text is not clear enough for me.
    I would like to quote the fragment from document mentioned above, which is ambiguous for me:
    "Combining XML Documents and Data Using Views
    Finally, if you have a combination of structured and unstructured XML data, but still want to view and operate on it as a whole, you can use Oracle8i views. Views enable you to construct an object on the "fly" by combining XML data stored in a variety of ways. So, you can store structured data (such as employee data, customer data, and so on) in one location within object -relational tables, and store related unstructured data (such as descriptions and comments) within a CLOB. When you need to retrieve the data as a whole, you simply construct the structure from the various pieces of data with the use of type constructors in the view's select statement. The XML SQL Utility then enables retrieving the constructed data from the view as a single XML document."
    The main question is - how to use type constructors in the view's select statement?

    Hello
    Sorry for asking the same question again, but any responses would be greatly appreciated.
    How to use type constructors in the view's select statement?
    I could not find any answers for this question on Technet. Maybe the other approaches are more efficient to combine the part of data from CLOB with data from other column types?
    Thank you

  • The type of the database table and work area are not Unicode convertible

    ***Data declaration
    TYPES : BEGIN OF t_zle_lagerplanung,
                       SEl, "stores which row user has selected
                       kdauf TYPE zle_lagerplanung-kdauf,
                       kdpos TYPE zle_lagerplanung-kdpos,
                       etenr TYPE zle_lagerplanung-etenr,
                       papiermaschine TYPE zle_lagerplanung-papiermaschine,
                       runnr TYPE zle_lagerplanung-runnr,
                       prio TYPE zle_lagerplanung-prio,
                       werk TYPE zle_lagerplanung-werk,
                       durchmesser TYPE zle_lagerplanung-durchmesser,
                       breite TYPE zle_lagerplanung-breite,
                       anzle TYPE zle_lagerplanung-anzle,
                       lgpla TYPE zle_lagerplanung-lgpla,
                       lgtyp TYPE zle_lagerplanung-lgtyp,
                       art TYPE zle_lagerplanung-art,
                       anzhoehe TYPE zle_lagerplanung-anzle,
                       fa TYPE zle_lagerplanung-fa,
    END OF t_zle_lagerplanung.
    DATA : it_zle_lagerplanung TYPE STANDARD TABLE OF t_zle_lagerplanung INITIAL SIZE 0,
                wa_zle_lagerplanung TYPE t_zle_lagerplanung.
    Here I am getting the data in internal table by using thiis select statement.
    SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
                  anzle lgpla lgtyp art anzhoehe fa
    FROM    zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
    WHERE  kdauf IN s_kdauf
    AND       KDPOS IN s_kdpos
    AND      werk = p_werks.
    But while updating the particular field in zle_lagerplanung using this statement
    UPDATE zle_lagerplanung from table it_zle_lagerplanung.
    it is giving syntax error
    "The type of the database table and work area (or internal table)
    "IT_ZLE_LAGERPLANUNG" are not Unicode convertible. "
    Could any one help me out how to resolve this problem....
    Thanks in advance

    Dear Shayamal,
    XXX....are not Unicode convertible
    This  error comes while inserting or updating database and the fields are not matching between  data base table and structure .
    Check you fields of data base table and  "zle_lagerplanung" and struture "it_zle_lagerplanung" . There fields must match.
    thanks and regrds,
    Anup Banerjee

  • RPM Project Item and role relation

    Dear All.
    i  am new to RPM project. I have created few roles in one project/ or Item. Now i want see all the roles in RPM tables and the relation between porject/ item GUID and role GUID. since business want see Bucket; Item; and roles in same report
    BR;
    J B
    Edited by: J B on Apr 22, 2010 9:15 AM

    Resolved my self

Maybe you are looking for