I want to create an internal table without using header line and occurs 0?

hi experts,
Can anybody help me to declare an internal table without using headerline and occurs 0 options but still i have to use the functionalities that occurs 0 and header line options provide.

Hi Saisri,
You can use the internal table without headerline and create a header for then internal table with the same structure. We need to use the header while manipulating with the data of the internal table.
example:
types: begin of ty_afpo,
             kdauf type kdauf,
             kdpos type kdpos,
             ltrmp   type ltrmp,
           end   of ty_afpo.
data : t_afpo type standard table of ty_afpo,  " internal table declaration
         wa_afpo type ty_afpo.                        " work area declaration
<after populating the data into the internal table>
loop at t_afpo into wa_afpo.
write:/ wa_afpo-kdauf, wa_afpo-kdpos, wa_afpo-ltrmp.
endloop.
This I think shall give you a basic understanding of how things work.
<b>Reward points if this helps,</b>
Kiran

Similar Messages

  • Internal table with out header line

    Hi friends,
    Can u send me code for internal table with out header line : how to declare ,how to populate data and how to access the data
    Regards,
    vijay

    Hi Vijay
    There are several ways to declare an internal table without header line:
    A) You can define a type table
    TYPES: BEGIN OF TY_ITAB OCCURS 0,
            INCLUDE STRUCTURE ZTABLE.
    TYPES: END   OF TY_ITAB.
    and then your intrnal table:
    DATA: ITAB TYPE TY_ITAB.
    B) DATA: ITAB TYPE/LIKE STANDARD TABLE OF ZTABLE.
    C) DATA: ITAB TYPE/LIKE ZTABLE OCCURS 0.
    All these ways create a STANDARD TABLE
    You can create other types of internal table, for example SORTED TABLE or HASHED TABLE.
    These kinds of table can allow to improve the performance because they use different rules to read the data.
    When it wants to manage a table without header line, it need a work area, it has to have the same structure of table.
    DATA: WA LIKE ZTABLE.
    DATA: T_ZTABLE LIKE STANDARD TABLE OF ZTABLE.
    A) To insert the record:
    If you use INTO TABLE option you don't need workarea
    SELECT * FROM ZTABLE INTO TABLE T_ZTABLE
                                      WHERE FIELD1 = 'Z001'
                                        AND FIELD2 = '2006'.
    but if you want to append a single record:
    SELECT * FROM ZTABLE INTO wa WHERE FIELD1 = 'Z001'
                                   AND FIELD2 = '2006'.
    APPEND WA TO T_ZTABLE.
    ENDSELECT.
    Now you need workarea.
    B) To read data: you need always a workarea:
    LOOP AT T_ZTABLE INTO WA WHERE ....
      WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDIF.
    Anyway if you want to know only if a record exists, you can use the TRANSPORTING NO FIELDS option, in this case it doesn't need a workarea.
    READ T_ZTABLE WITH KEY FIELD3 = '0000000001'
                                      TRANSPORTING NO FIELDS.
    IF SY-SUBRC = 0.
    WRITE 'OK'.
    ENDIF.
    C) To update the data: it always needs a workarea
    LOOP AT T_ZTABLE INTO WA WHERE FIELD3 = '0000000001'.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA INDEX SY-TABIX
    ENDIF.
    AT the end you can use the internal table to update database:
    MODIFY/UPDATE/INSERT ZTABLE FROM T_ZTABLE.
    See Help online for key words DATA, you can find out more details.
    Max
    Message was edited by: max bianchi

  • "table" is a table without a header line & therefore has no component"fiel"

    Hi Experts,
         In Smartforms, I have used internal table "it_tab" in my table.. and i declared type for that internal table in TYPES tab.
    & i declared work area for that in global definitions. But i am getting this error.
    "table" is a table without a header line & therefore has no component"fieldname"
    will you please help me. please provide me an example code for this
    thanks in Advance
    Edited by: sreelakshmi.B on Jun 24, 2010 4:39 PM

    Hi,
        In Global Definitions under "Types" tab, declare as below
    TYPES: BEGIN OF type_split,
             SPLIT1(20) TYPE C,    "Day of week
             SPLIT2(20) TYPE C,    "year
             SPLIT3(20) TYPE C,    "month
             SPLIT4(20) TYPE C,    "day of month
           END OF type_split.
    TYPES : t_date TYPE type_split OCCURS 0.
    Now in "Global Data" tab, declare as below
    it_itab     TYPE     t_date
    wa_itab     TYPE     type_split
    Regards
    Bala Krishna

  • Upload data from Excel to internal table without using Screen

    Hi,
    My reqirment is to read the excel input data and then upload it to internal table for further proceeing but without using selection input screen. I mean can I mention the fixed file name and the path in the function module iself for the input file.

    1.First create one internal table as u have created ur EXCEL file.
    e.g: if ur EXCEL file contains 3 fields col1 col2 and col3.
           data: begin of wa,
                     col1(10),
                     col2(10),
                     col3(10),
                   end of wa,
                   itab like standard table of wa.
    data: filename type string 'C:\FOLDER\DATA.XLS'
    If u dont want to use the screen, then pass the file name directly to the GUI_UPLOAD FM.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = filename
       FILETYPE                      = '.XLS'
      tables
        data_tab                      = itab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This will serve ur puspose.
    loop at itab into wa.
    write: / wa-col1,wa-col2,wa-col3.
    endloop.
    Thanks & Regards
    Santhosh

  • How to sort an internal table with a header line?

    hi all,
    i have declared table i_bseg type standard table of bseg with header line.
    now i have populated data in i_bseg.
    now i am sorting it by bukrs
    ie i am writing sort i_bseg by bukrs.
    before sorting all i_bseg-belnrs were populated...
    but after sorting the contents of  the i_bseg is changing.
    some of the belnrs are getting deleted..
    is there any special way to sort an internal table with header line...?

    hi,
    <b>SORT <itab> [ASCENDING|DESCENDING] [AS TEXT] [STABLE].</b>
    The statement sorts the internal table <itab> in ascending order by its key.<b> The statement always applies to the table itself, not to the header line</b>.
    If you have an internal table with a structured line type that you want sort by a different key, you can specify the key in the SORT statement:
    SORT <itab> [ASCENDING|DESCENDING] [AS TEXT] [STABLE]
                 BY <f1> [ASCENDING|DESCENDING] [AS TEXT]
                    <fn> [ASCENDING|DESCENDING] [AS TEXT].
    <b>this is your sort statement:  sort i_bseg by bukrs.
    you try with this statement:  sort i_bseg by bukrs STABLE.</b>
    regards,
    Ashokreddy

  • Lt_item_type is a table with out header line and therefore has no component

    Dear frnds,
    I am new to webdynpro i got this error while creating a tree .can any body tell me what is the mistake i have done.
    Regards.
    siva

    Hi,
    As you are new to the tree concepts.Try to do this tutorial.It will give a idea.
    [Tree|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d075dbc5-3b33-2c10-5f9f-99bf2738fe6a?QuickLink=index&overridelayout=true]
    Regards,
    Karthik.R

  • How to create an internal table

    Hi friends,
                     In  what are the ways can we construct the internal table ?  Can you tell me the advantages and disadvantages ?

    Hi,
    You can define internal tables either with (WITH HEADER LINE addition) or without header lines. 
    An internal table with header line consists of a work area (header line) and the actual table body. You address both objects 
    using the same name. The way in which the system interprets the name depends on the context. For example, the MOVE statement applies to the header line, but the SEARCH statement applies to the body of the table.
    To avoid confusion, you are recommended to use internal tables without header lines. This is particularly important when you use nested tables. However, internal tables with header line do offer a shorter syntax in several statements 
    ( APPEND, INSERT, MODIFY, COLLECT, DELETE, READ, LOOP ). 
    Within ABAP Objects, you can only use internal tables without a header line. You can always address the body of an internal table <itab> explicitly by using the following syntax: <itab>[].  This syntax is always valid, whether the internal table has a header line or not.  
    Example
    DATA itab1 TYPE TABLE OF i WITH HEADER LINE.
    DATA itab2 TYPE TABLE OF i WITH HEADER LINE.
    itab1 = itab2.  " Only header lines will be copied 
    itab1[] = itab2[].  " Copies table body 
    Regards,
    Bhaskar

  • Error: itab is a table without a header....

    Hi everybody,
    i get the following error after activation:
    "ITAB" is a table without a header line and therefore has no component called "NUM"..
    How can i solve this problem?
      TYPES: BEGIN OF i_itab,
               NUM TYPE I,
             END OF i_itab.
      DATA: itab TYPE TABLE OF i_tab.
      LOOP AT myTable INTO ls_mytable.
        itab-num = ls_mytable-nr.
        APPEND itab.
      ENDLOOP.
    regards,
    Sid
    Edited by: Sid on Jul 7, 2009 7:39 PM

    Sid wrote:>
    > Hi everybody,
    >
    > i get the following error after activation:
    >
    >  "ITAB" is a table without a header line and therefore has no component called "NUM"..
    >
    > How can i solve this problem?
    >
    >
    >   TYPES: BEGIN OF i_itab,
    >            NUM TYPE I,
    >          END OF i_itab.
    >         
    >   DATA: itab TYPE TABLE OF i_tab.

    >   LOOP AT myTable INTO ls_mytable.
    >
    >     itab-num = ls_mytable-nr.
    >     APPEND itab.
    >
    >   ENDLOOP.
    >
    Have a work area for the internal table itab. Code modified below :
       TYPES: BEGIN OF i_itab,
                NUM TYPE I,
              END OF i_itab.
       DATA: itab TYPE TABLE OF i_tab,
                  wa TYPE i_tab.
       LOOP AT myTable INTO ls_mytable.
         wa-num = ls_mytable-nr.
         APPEND wa to itab.
       ENDLOOP.
    Hope this helps.
    Regards,
    Anand Patil

  • How to create an internal table in a Report from File of FTP Server.

    Hi All,
    I want to create an internal table in a Report program. But the problem is I have to download two latest files from FTP server.
    Now, based in those file I have to design internal tables in current program. The problem is the program from which these files are being generated has options to display some fields in the output. Hence, the columns of these files becomes dynamic due to which I am not able to design the internal table in my current program...Please Help.
    Regards & Thanks.
    Prashant.

    Hi,
    Or you can use the RTTS classes...
    Plenty of examples over here.
    one external link: http://help-abap.zevolving.com/2008/09/dynamic-internal-table-creation/
    Kr,
    Manu.

  • Count the Records in  an internal table without a loop.

    How do i count the number of records in an internal table without using the loop  statement.
    The Describe statement give the total no. of records in the internal table.But i want the count of the key fields in the internal table
    For eg
    Row Field
    1       A
    2       A
    3       A
    4       B
    5       B
    6       C
    Count of A = 3
    Count of B = 2
    Count of C = 1

    Dilip,
      I think isn't posible. Only 3 ideas:
    1ª, make other table "table2", similar to your actual table.
         table2[] = yourtable[].
         delete table2 where key <> 'A'.
         describe table table2 lines contA.
        But depending the amount of data, you may have problems in performance or memory consumption...
    2ª, make other table, only with the keys fields and a count field,
        data begin table2
           key_field1,
           cont type i.
        end data.
       when you append lines to yourdata, make a collect to this table:
        table2-keys = yourtable-keys.
        table2-cont = 1.
       collect table2.
       But only works if you can modify the program where data is appended, and you may be carefull when data is deleted :-(...
    3ª if your data if filled in a select, you may fill the table2 of point 2ª, making a similar select but:
       select keyfields count( * ) into table table2
      from ...
      where (the same you have to fill your original table...)
       group by keys.
    But you have the same problem is data is deleted later...
    I hope that any of the three is useful for you...
    Edited by: Diego Alvarez on Jan 5, 2010 5:09 PM

  • How to create an internal table with fields from different sources

    Hi.
    I need to create an internal table where some of the fields are from a database table, and the other fields are user specified. How do i do that?
    Example:
    DB table ZTAB with fields ZTAB-FIELD1, ZTAB-FIELD2.
    I want to create an internal table ITAB with the fields ZTAB-FIELD1, ZTAB-FIELD2 from ZTAB. In addition, I also want to have one more field RECORD_NO, which is not from ZTAB. How do I do it? Could I do something like below?
    DATA BEGIN OF ITAB.
            INCLUDE STRUCTURE ZTAB.
    DATA RECORD_NO TYPE I.
    DATA END OF UPLINE.
    Or, are there more efficient way of doing it? Thanks.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • Creating Dynamic Internal table with a dynamic name

    Hi,
    I want to create dynamic internal tables with dynamic names.
    For example:
    Suppose I have a table with three fields.
    1. Structure name
    2.Fields
    3.file
    And the structure of the internal table is as follows:
    TYPES:BEGIN OF table_type,
          struct                  TYPE char70,
          fields                   TYPE tt_type OCCURS 0,
          File                      TYPE ttab_type OCCURS 0,
          END OF table_type.
    Suppose I have one record inside my internal table with struct as "STRUCTURE", fields have an internal table content of set of fields and File has some set of records.
    Now I want to create dynamic internal table whose name will be "STRUCTURE" , the fields of the dynamic internal table structure[] will be as in fields, and the records will be as in File.
    Like this if i have 100 records in my internal table then I have to create 100 dynamic internal table dynamically.
    Can anyone suggest how to do this?
    Edited by: Jjammy on Jul 22, 2009 7:52 AM

    Hi,
    Check the sample program and develop your program accordingly.
    <font color=blue><pre>
    REPORT  ztest_notepad.
    *& Declarations
    *Type-pools
    TYPE-POOLS:
          slis.
    *Types
    TYPES:
          ty_fcat      TYPE lvc_s_fcat,
          ty_fcatalog  TYPE slis_fieldcat_alv.
    *Work areas
    DATA:
          wa_fcat      TYPE ty_fcat,
          wa_fcatalog  TYPE ty_fcatalog.
    *Internal tables
    DATA:
          it_fcat      TYPE STANDARD TABLE OF ty_fcat,
          it_fcatalog  TYPE STANDARD TABLE OF ty_fcatalog.
    *Type reference
    DATA:
          it_dyn_tab   TYPE REF TO data,
          wa_newline   TYPE REF TO data.
    *Filed symbols
    FIELD-SYMBOLS:
          <gt_table>   TYPE STANDARD TABLE,
          <fs_dyntable>,
          <fs_fldval>  TYPE ANY,
          <l_field>    TYPE ANY.
    *Variables
    DATA:
          l_fieldname  TYPE lvc_s_fcat-fieldname,
          l_tabname    TYPE lvc_s_fcat-tabname,
          l_fieldtext  TYPE lvc_s_fcat-seltext,
          l_index      TYPE char2.
    "Selection-screen
    PARAMETERS:
             p_colms   TYPE i.
    *& start-of-selection.
    START-OF-SELECTION.
      PERFORM build_fieldcat.
      PERFORM create_dynamic_table.
      DO 20 TIMES.
        DO p_colms TIMES.
          l_index = sy-index.
          CONCATENATE 'FIELD' l_index INTO l_fieldname.
          ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
          <l_field> = sy-index.
        ENDDO.
        INSERT <fs_dyntable> INTO TABLE <gt_table>.
      ENDDO.
      LOOP AT it_fcat INTO wa_fcat.
        PERFORM fieldcatalog1 USING: wa_fcat-fieldname
                                      wa_fcat-tabname
                                      wa_fcat-seltext.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_NOTEPAD'
          it_fieldcat        = it_fcatalog
        TABLES
          t_outtab           = <gt_table>.
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat .
      CLEAR: l_fieldname,
             l_tabname,
             l_fieldtext,
             l_index.
      DO  p_colms TIMES.
        CLEAR l_index.
        l_index = sy-index.
        CONCATENATE 'FIELD' l_index INTO l_fieldname.
        CONCATENATE 'Field' l_index INTO l_fieldtext.
        l_tabname = '<GT_TABLE>'.
        PERFORM fieldcatalog USING: l_fieldname
                                    l_tabname
                                    l_fieldtext.
      ENDDO.
    ENDFORM.                    " BUILD_FIELDCAT
    *&      Form  CREATE_DYNAMIC_TABLE
    FORM create_dynamic_table .
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_dyn_tab.
      ASSIGN it_dyn_tab->* TO <gt_table>.
    Create dynamic work area and assign to FS
      CREATE DATA wa_newline LIKE LINE OF <gt_table>.
      ASSIGN wa_newline->* TO <fs_dyntable>.
    ENDFORM.                    " CREATE_DYNAMIC_TABLE
    *&      Form  FIELDCATALOG
    FORM fieldcatalog USING field table f_txt.
      wa_fcat-fieldname = field.
      wa_fcat-tabname   = table.
      wa_fcat-seltext = f_txt.
      APPEND wa_fcat TO it_fcat.
      CLEAR  wa_fcat.
    ENDFORM.                    " FIELDCATALOG
    *&      Form  FIELDCATALOG1
    FORM fieldcatalog1 USING field table f_txt.
      wa_fcatalog-fieldname = field.
      wa_fcatalog-tabname   = table.
      wa_fcatalog-seltext_m = f_txt.
      APPEND wa_fcatalog TO it_fcatalog.
      CLEAR  wa_fcatalog.
    ENDFORM.                    " FIELDCATALOG1 </pre>
    </font>
    Thanks
    Venkat.O

  • Can i send back an internal table by using Changing clause?

    i'm using a  Perform statement in SAP Script and i have written corresponding subroutine in an Zprogram.
    In that subroutine i want to create one internal table and send back it to script.
    can i send back an internal table by using Changing clause?
    if it is possible, pls give me the idea................

    Hi,
    While calling the formroutine,just u can pass the individual values using the ITCSY.In form,you are decalring the internal table with structure itcsy-input.
    Then,you need to place the loop on the table and print in script.
    But, passing the internal table in script,is not recomnded..
    Regards,
    Shiva Kumar

  • Moving data into internal table without header line

    Hello experts.
    i have two internal tables . itab1 without headerline and itab2 with headerline. itab1 has 10 fields and itab2 has 2 fields.
    BEGIN OF itab,
            lifnr LIKE lfa1-lifnr,
            ktokk LIKE lfa1-ktokk,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            pstlz LIKE lfa1-pstlz,
            ort01 LIKE lfa1-ort01,
            land1 LIKE lfa1-land1,
           j_1ipanno LIKE j_1imovend,
    end of itab.
    DATA: itab1 TYPE STANDARD TABLE OF itab.
    data: begin of itab2 occurs 0,                             
          lifnr like j_1imovend-lifnr,
          j_1ipanno like j_1imovend-j_1ipanno,
      end of itab2.
    now i want to move the data from itab2-j_1ipanno into itab1-j_1ipanno. so pls tell me how to do that. lifnr in both the tables are the same.
    thanks for all the replies.

    Hi Shiva,
    In with out header line,
    You declare header line & body separately like
    data: IT_MARA type standard table of MARA,
    WA_MARA like line of IT_MARA.
    Advantages:
    1. Clear differentiation of header line over body
    2. It is must in the ABAP Objects to have separate header line & body
    3. Use ful in Nested Internal tables
    Disadvantages:
    1. Long syntax
    for example: Loop at IT_MARA into WA_MARA.
    In with header line
    Data ITAB like MARA occurs 0 with header line.
    Advantages:
    1. Simple to use & declare over without header line.
    Also,
    With Header line:
    codedata : itab like <dbtable> occurs 0 with header line.
    Data: begin of itab occurs 0,
    f1 type f1,
    f2 type f2,
    end of itab.[/code]
    Without Header line.
    codeTypes: begin of ty_tab,
    f1 type f1,
    f2 type f2,
    end of ty_tab.
    Data: itab type table of ty_tab, " Internal Table
    wa type ty_tab. " Work Area[/code]
    at any point of time use internal table without header line,it will be good performance as well OO ABAP will allow only internal table without header line.
    Just use one simple example :
    create one simple program with header line,use get run time field.
    create one simple program without header line,use get run time field.
    see the results ,here time will be micro seconds,so take 1000 records to internal table and do calculate the time.
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.
    kindly reward if found helpful.
    cheers,
    Hema.

  • Problem creating an internal table dynamically

    Hi,
    I'm trying to create an internal table dynamically as i would be able to determine the structure of the table based on the user input.
    I've used the sample code from this forum ...
    REPORT  ZRICH_0003       .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: alv_fldcat type slis_t_fieldcat_alv,
                   it_fldcat type lvc_t_fcat.
                   type-pools : abap.
    data : it_details type abap_compdescr_tab,
           wa_details type abap_compdescr.
    data : ref_descr type ref to cl_abap_structdescr.
    data: new_table type ref to data,
          new_line  type ref to data,
          wa_it_fldcat type lvc_s_fcat.
          selection-screen begin of block b1 with frame title text.
    parameters: p_table(30) type c.
    selection-screen end of block b1.
    Get the structure of the table.
    ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
    it_details[] = ref_descr->components[].
    loop at it_details into wa_details.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = wa_details-name .
      wa_it_fldcat-datatype = wa_details-type_kind.
      wa_it_fldcat-inttype = wa_details-type_kind.
      wa_it_fldcat-intlen = wa_details-length.
      wa_it_fldcat-decimals = wa_details-decimals.
      append wa_it_fldcat to it_fldcat .
      endloop.
    Create dynamic internal table and assign to FS
    call method cl_alv_table_create=>create_dynamic_table
                exporting
                it_fieldcatalog = it_fldcat
                importing
                ep_table        = new_table.
    assign new_table->* to <dyn_table>.
    Create dynamic work area and assign to FS
    create data new_line like line of <dyn_table>.
    assign new_line->* to <dyn_wa>.
    <b>* Select Data from table.
    select * into table <dyn_table>           from
    (p_table).</b>
    Write out data from table.
    loop at <dyn_table> into <dyn_wa>.
    do.
    assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
    if sy-subrc <> 0.
    exit.
    endif.
    if sy-index = 1.
    write:/ <dyn_field>.
    else.
    write: <dyn_field>.
    endif.
    enddo.
    endloop.
    I'm able to get the structure of the table that i want, but when i'm trying to select data from the table into this internal table..as highlighted in the sample code above..i'm getting a short dump...saying that ' the database table is 600 bytes wide but the internal table is only 576 bytes wide.
    The internal table is declared as
    field-symbols: <dyn_table> type standard table..
    Could anyone please tell me how to rectify this.
    Thanks in advance,
    Harsha.

    Hi Smitha,
    I'm building the internal table by getting the structure using the method
    cl_abap_typedescr=>describe_by_name( p_table ).
    where p_table is the table name determined dynamically..
    Now using this structure, i'm building an internal table by calling the method
    call method cl_alv_table_create=>create_dynamic_table
    I've checked all the fields after the internal table has been created .. and it contains all the fields of the table that i'm supplying initially..
    But when i read data into that internal table, it gives me that dump..I've described it in this post earlier.
    Any more suggestions would be very helpful.
    Thanks,
    Harsha

Maybe you are looking for

  • Why does the Amount slider on the Detail Panel reset to 0 when saving the file as a Smart Object?

    Whenever I open a Smart Object PSD file to adjust previous settings in RAW, I have noticed that the Amount slider in the Detail panel has reset to 0. Does this reduce the files sharpening? Is this a normal behavior? Can this be prevented? I use a Mac

  • Photoshop 7 won't open an my image?!

    I have been using a program called Theme Builder for Blackberry...I have set the preferences on this program to open any images I want to edit in Photoshop 7. The problem is when I click to edit an image (png), photoshop opens but all I get is a "new

  • How SAP AII(Auto-Id-Infrastructure) communicate with PI

    Hi, How SAP AII communicates with XI,?? And , what is XI content in SAP AII. -Surya

  • XMLBeans - Error occured at schema compiler

    HI this question is regarding apache xmlbeans. i have tried to follow the tutorial at http://xmlbeans.apache.org/documentation/tutorial_getstarted.html but when execute the command 'scomp -out easypo.jar easypo.xsd' it gives the following exception.

  • A HREF ... /A でtarget="_blank"を指定すると.Adobe Reader 7.0 でPDFが開けない

    Aサイト=Adobe Reader 7.0でPDFファイルが開けない(PDFが完全に表示される前にAdobe Readerが終わってしまう) PDF Bサイト=Adobe Reader 7.0でPDFファイルが開ける PDF 上記のようにHTMLの記述の仕方によって.PDFが開けたり.開けなかったりといった動作の違いがあるようです. この動作は.仕様なのでしょうか? 問題の起きている環境: ・Adobe Reader 7.0 ・ツールバーで「編集」-「環境設定」-「インターネット」で「PDFをブ