Structure of a table

hi all,
I want to save the structure of a table in a file
can i save it?

Here's a Utility Program that I wrote and use for simplicty.
Modify it for your needs, but you can simply change the ALV Layout then export it to Excel.
REPORT yptc_table_sturcture .
TABLES: dd03l.
*   ALV Related Fields & Tables
TYPE-POOLS: slis.
CONSTANTS:
  gc_formname_top_of_page   TYPE slis_formname VALUE 'TOP_OF_PAGE',
  gc_formname_user_command   TYPE slis_formname VALUE 'USER_COMMAND'.
DATA: g_fieldcat                   TYPE slis_t_fieldcat_alv,
        g_extab                    TYPE slis_t_extab,
        g_layout                   TYPE slis_layout_alv,
        g_keyinfo                  TYPE slis_keyinfo_alv,
        g_print                    TYPE slis_print_alv,
        g_sort                     TYPE slis_t_sortinfo_alv,
        g_sp_group                 TYPE slis_t_sp_group_alv,
        g_events                   TYPE slis_t_event,
        g_events_ex                TYPE slis_t_event_exit,
        g_repid                    LIKE sy-repid,
        g_list_top_of_page         TYPE slis_t_listheader,
        g_save                     TYPE c.
*        g_exit                     TYPE c.
*        g_variant                  LIKE disvariant,
DATA: ls_line                      TYPE slis_listheader.
DATA:
  tab_rec LIKE dd03l,
  it_table LIKE STANDARD TABLE OF tab_rec.
PARAMETERS:
  tabname    LIKE dd03l-tabname.
*______________________________________  Initialization
INITIALIZATION.
* Check authority for ALV Standard layout save option
  AUTHORITY-CHECK OBJECT 'ZALV_STD'
          ID 'ACTVT' FIELD '02'.
  IF sy-subrc = 0.
    g_save = 'A'.
  ELSE.
    g_save = 'U'.
  ENDIF.
START-OF-SELECTION.
  REFRESH it_table.
  SELECT * INTO TABLE it_table FROM dd03l
    WHERE tabname = tabname
    ORDER BY position.
  PERFORM display_alv_report.
*       FORM display_alv_report                                       *
FORM display_alv_report.
  PERFORM fieldcat_init      USING g_fieldcat[].
  PERFORM build_sort_fields  USING g_sort[].
  PERFORM eventtab_build     USING g_events[]
                                   g_events_ex[].
  PERFORM layout_build       USING g_layout.
  PERFORM list_view.
ENDFORM.                    " display_alv_report.
*====> End of section that produces the report
*====> This section builds the event table
FORM eventtab_build
    USING e03_lt_events TYPE slis_t_event
          e03_lt_events_ex TYPE slis_t_event_exit.
  DATA: ls_event      TYPE slis_alv_event,
        ls_event_exit LIKE LINE OF e03_lt_events_ex.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
            i_list_type = 1
       IMPORTING
            et_events   = e03_lt_events.
  READ TABLE e03_lt_events
       WITH KEY name = slis_ev_top_of_page
       INTO ls_event.
  IF sy-subrc = 0.
    MOVE gc_formname_top_of_page TO ls_event-form.
    APPEND ls_event TO e03_lt_events.
  ENDIF.
  READ TABLE e03_lt_events
       WITH KEY name = 'USER_COMMAND'
       INTO ls_event.
  IF sy-subrc = 0.
    MOVE gc_formname_user_command TO ls_event-form.
    APPEND ls_event TO e03_lt_events.
  ENDIF.
  ls_event_exit-ucomm  = 'DISP'.
  APPEND ls_event_exit TO  e03_lt_events_ex.
ENDFORM.                    " build_events_table
*====> End of the Build Events section
*====> This section builds the Layout Record
FORM layout_build
    USING e05_ls_layout TYPE slis_layout_alv.
  CLEAR e05_ls_layout.
  e05_ls_layout-f2code = 'DISP'.
  e05_ls_layout-colwidth_optimize = 'X'.
  e05_ls_layout-zebra = 'X'.
  e05_ls_layout-detail_popup = 'X'.
  e05_ls_layout-detail_initial_lines = 'X'.
  e05_ls_layout-detail_titlebar = 'Table Structure'.
  e05_ls_layout-info_fieldname = 'X'.
*  e05_ls_layout-min_linesize = 125.
*  gs_print-no_print_listinfos = 'X'.
ENDFORM.                    " layout_build
*====> End of the Build for Layout Record
*====> This section builds the Actual Display Routine
FORM list_view.
  g_repid = sy-repid.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = g_repid
            is_layout          = g_layout
            it_sort            = g_sort[]
            it_events          = g_events[]
            it_fieldcat        = g_fieldcat[]
            i_save             = g_save
       TABLES
            t_outtab           = it_table
       EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
  IF sy-subrc <> 0.
    MESSAGE e208(00) WITH 'Error: ALV Grid'.
  ENDIF.
ENDFORM.                    " layout_build
*====> End of Actual Display Routine
*====> This section builds the Top of Page Routine
FORM top_of_page.
  DATA: ls_line TYPE slis_listheader.
  CLEAR g_list_top_of_page[].
  CLEAR ls_line.
  ls_line-typ  = 'H'.
  CONCATENATE 'Table Structure -' tabname
    INTO ls_line-info SEPARATED BY space.
  APPEND ls_line TO g_list_top_of_page.
  PERFORM build_sub_headings
      USING g_list_top_of_page.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            it_list_commentary = g_list_top_of_page[].
ENDFORM.                    " top_of_page
FORM build_sub_headings
        USING e07_top_of_page TYPE slis_t_listheader.
  DATA: ls_line TYPE slis_listheader.
  CLEAR ls_line.
  ls_line-typ  = 'S'.
  ls_line-key = 'Run Info'.
  CONCATENATE  sy-sysid sy-uname sy-mandt
        INTO ls_line-info
        SEPARATED BY space.
  APPEND ls_line TO e07_top_of_page.
ENDFORM.                    "build_sub_headings
*====> End of top_of_page
*====> This section builds the User Command Routine
FORM user_command
        USING p_ucomm LIKE sy-ucomm
              p_selfield TYPE slis_selfield.
  IF p_selfield-value NE space.
    CASE p_selfield-tabname.
      WHEN 'IT_TABLE'.
        READ TABLE it_table INDEX p_selfield-tabindex
                  INTO tab_rec.
      WHEN OTHERS.
        EXIT.
    ENDCASE.
  ELSE.
    EXIT.
  ENDIF.
  CHECK sy-subrc = 0.
  CASE p_selfield-fieldname.
*    WHEN 'QUOTE'.
*      SET PARAMETER ID 'AGN' FIELD p_selfield-value.
*      CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.
    WHEN OTHERS.
      EXIT.
  ENDCASE.
ENDFORM.                    "user_command
*&      Form  build_sort_fields
FORM build_sort_fields
  USING p_sort TYPE slis_t_sortinfo_alv..
*----------------------> ALV Build Sort Table
  DATA:  ls_sort  LIKE LINE OF p_sort.
  REFRESH p_sort.
* Table name
  CLEAR ls_sort.
  ls_sort-tabname       = 'IT_TABLE'.
  ls_sort-fieldname     = 'TABNAME'.
  ls_sort-up            = 'X'.
  APPEND ls_sort TO p_sort.
* Position of the field in the table
  CLEAR ls_sort.
  ls_sort-tabname       = 'IT_TABLE'.
  ls_sort-fieldname     = 'POSITION'.
  ls_sort-up            = 'X'.
  APPEND ls_sort TO p_sort.
ENDFORM.          " build_sort_fields
*&      Form  fieldcat_init
FORM fieldcat_init
  USING e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
  DATA: ls_fieldcat TYPE slis_fieldcat_alv.
  CLEAR: e01_lt_fieldcat[], e01_lt_fieldcat.
* Table name
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'TABNAME'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'TABNAME'.
  ls_fieldcat-key           = 'X'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Table'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Table'.
  ls_fieldcat-SELTEXT_M     = 'Table name'.
  ls_fieldcat-SELTEXT_L     =
    'Table name'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Field name
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'FIELDNAME'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'FIELDNAME'.
  ls_fieldcat-key           = 'X'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Field name'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Field name'.
  ls_fieldcat-SELTEXT_M     = 'Field name'.
  ls_fieldcat-SELTEXT_L     =
    'Field name'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Activation status of a Repository object
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'AS4LOCAL'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'AS4LOCAL'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Activation status'.
  ls_fieldcat-SELTEXT_L     =
    'Activation status'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Version of the entry (not used)
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'AS4VERS'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'AS4VERS'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Version'.
  ls_fieldcat-SELTEXT_L     =
    'Version'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Position of the field in the table
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'POSITION'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'POSITION'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Table pos.'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Table pos.'.
  ls_fieldcat-SELTEXT_M     = 'Table position'.
  ls_fieldcat-SELTEXT_L     =
    'Table position'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Identifies a key field of a table
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'KEYFLAG'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'KEYFLAG'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Key field'.
  ls_fieldcat-SELTEXT_L     =
    'Key field'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Flag: Field is required (not blank)
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'MANDATORY'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'MANDATORY'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Required field'.
  ls_fieldcat-SELTEXT_L     =
    'Required field'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Data element (semantic domain)
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'ROLLNAME'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'ROLLNAME'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Data elem.'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Data elem.'.
  ls_fieldcat-SELTEXT_M     = 'Data element'.
  ls_fieldcat-SELTEXT_L     =
    'Data element'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Check table name of the foreign key
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'CHECKTABLE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'CHECKTABLE'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Check table'.
  ls_fieldcat-SELTEXT_L     =
    'Check table'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Nesting depth for includes
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'ADMINFIELD'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'ADMINFIELD'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Admin. field'.
  ls_fieldcat-SELTEXT_L     =
    'Admin. field'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* ABAP data type (C,D,N,...)
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'INTTYPE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'INTTYPE'.
  ls_fieldcat-REPTEXT_DDIC   =
    'ABAP type'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'ABAP type'.
  ls_fieldcat-SELTEXT_M     = 'ABAP type'.
  ls_fieldcat-SELTEXT_L     =
    'ABAP type'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Internal length in bytes
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'INTLEN'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'INTLEN'.
  ls_fieldcat-REPTEXT_DDIC   =
    'IntLen'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'IntLen'.
  ls_fieldcat-SELTEXT_M     = 'Internal length'.
  ls_fieldcat-SELTEXT_L     =
    'Internal length'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Table for reference field
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'REFTABLE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'REFTABLE'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Ref. table'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Ref. table'.
  ls_fieldcat-SELTEXT_M     = 'Reference table'.
  ls_fieldcat-SELTEXT_L     =
    'Reference table'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Name of included table
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'PRECFIELD'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'PRECFIELD'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Name of include'.
  ls_fieldcat-SELTEXT_L     =
    'Name of include'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Reference field for currency and qty fields
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'REFFIELD'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'REFFIELD'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Ref. field'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Ref. field'.
  ls_fieldcat-SELTEXT_M     = 'Ref. field'.
  ls_fieldcat-SELTEXT_L     =
    'Ref. field'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Check or generating module for fields
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'CONROUT'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'CONROUT'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = ''.
  ls_fieldcat-SELTEXT_M     = 'Check module'.
  ls_fieldcat-SELTEXT_L     =
    'Check module'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Indicator that NOT NULL is forced for this field
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'NOTNULL'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'NOTNULL'.
  ls_fieldcat-REPTEXT_DDIC   =
    'NOT NULL'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'NOT NULL'.
  ls_fieldcat-SELTEXT_M     = 'NOT NULL forced'.
  ls_fieldcat-SELTEXT_L     =
    'NOT NULL forced'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Data type in ABAP Dictionary
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'DATATYPE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'DATATYPE'.
  ls_fieldcat-REPTEXT_DDIC   =
    'DataType'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'DataType'.
  ls_fieldcat-SELTEXT_M     = 'Data type'.
  ls_fieldcat-SELTEXT_L     =
    'Data type'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Length (no. of characters)
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'LENG'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'LENG'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Lngth'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Lngth'.
  ls_fieldcat-SELTEXT_M     = 'No. of characters'.
  ls_fieldcat-SELTEXT_L     =
    'No. of characters'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Number of decimal places
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'DECIMALS'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'DECIMALS'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Dec.places'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Dec.places'.
  ls_fieldcat-SELTEXT_M     = 'Decimal places'.
  ls_fieldcat-SELTEXT_L     =
    'Decimal places'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Domain name
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'DOMNAME'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'DOMNAME'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Domain'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Domain'.
  ls_fieldcat-SELTEXT_M     = 'Domain'.
  ls_fieldcat-SELTEXT_L     =
    'Domain name'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* Origin of an input help
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'SHLPORIGIN'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'SHLPORIGIN'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Origin of an input help'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'SH Origin'.
  ls_fieldcat-SELTEXT_M     = 'Origin of input help'.
  ls_fieldcat-SELTEXT_L     =
    'Origin of an input help'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* DD: Flag if it is a table
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'TABLETYPE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'TABLETYPE'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Table'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Table'.
  ls_fieldcat-SELTEXT_M     = 'Table'.
  ls_fieldcat-SELTEXT_L     =
    'Table'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* DD: Depth for structured types
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'DEPTH'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'DEPTH'.
  ls_fieldcat-REPTEXT_DDIC   =
    'Depth'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'Depth'.
  ls_fieldcat-SELTEXT_M     = 'Depth'.
  ls_fieldcat-SELTEXT_L     =
    'Depth'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
* DD: Component type
  CLEAR ls_fieldcat.
  ls_fieldcat-tabname       = 'IT_TABLE'.
  ls_fieldcat-fieldname     = 'COMPTYPE'.
  ls_fieldcat-ref_tabname   = 'DD03L'.
  ls_fieldcat-ref_fieldname = 'COMPTYPE'.
  ls_fieldcat-REPTEXT_DDIC   =
    'CompTyp'.
  ls_fieldcat-ddictxt       = 'S'.
  ls_fieldcat-SELTEXT_S     = 'CompTyp'.
  ls_fieldcat-SELTEXT_M     = 'CompTyp'.
  ls_fieldcat-SELTEXT_L     =
    'Component type'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
ENDFORM.          " fieldcat_init
Edited by: Paul Chapman on Mar 10, 2008 3:09 PM

Similar Messages

  • How to read data from a CLUSTER STRUCTURE not cluster table.

    Hi,
    how to read data from a CLUSTER STRUCTURE not cluster table.
    regards,
    Usha.

    Hello,
    A structre doesnt contain data.. so u cannot read from it. U need to find out table of that structure and read data from it.
    Regards,
    Mansi.

  • The row structure of the table BANFTAB is incorrect

    Dear Experts,
    I get right here the error message
    The row structure of the table BANFTAB is incorrect
    ZBANFN is a table type and has the line tab BANFN.
    Can you pls tell me what is wrong here ?
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data lt_eban type table of eban.
      data ls_eban type eban.
      SELECT * FROM eban into table lt_eban where BANFN IN BANFTAB AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.

    Hello,
    You have to use a ranges table in this case.
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data:lt_eban type table of eban.
      data:ls_eban type eban.
    data:
    l_r_banfn type range of banfn,
    l_wa_banfn like line of l_r_banfn,
    l_wa_banftab like likne of BANFTAB.
    loop at banftab into l_wa_banftab.
    l_wa_banfn-sign = 'I'.
    l_wa_banfn-option = 'EQ'.
    l_wa_banfn-low = l_wa_banftab-banfn.
    append l_wa_banfn into l_r_banfn.
    clear l_wa_banfn.
    endloop.
      SELECT * FROM eban into table lt_eban
      where
      BANFN IN L_R_BANFN "BANFN IN BANFTAB
    AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.
    or you can use FOR ALL ENTRIES :
    FUNCTION Z_CHANGE_EBAKZ_FLAG.
    *"*"Lokale Schnittstelle:
    *"  CHANGING
    *"     VALUE(BANFTAB) TYPE  ZBANFN
      data lt_eban type table of eban.
      data ls_eban type eban.
      SELECT * FROM eban into table lt_eban
      FOR ALL ENTRIES IN BANFTAB "--> Add this
      where BANFN = BANFTAB-BANFN
      AND EBAKZ EQ 'X'.
      IF SY-SUBRC IS INITIAL.
        LOOP AT lt_eban INTO ls_eban .
          ls_eban-EBAKZ = ' '.
          modify eban from ls_eban.
        ENDLOOP.
      ENDIF.
    ENDFUNCTION.
    Try this & let me know in case of any issues.
    BR,
    Suhas
    Edited by: Suhas Saha on Feb 10, 2009 5:43 PM

  • Se11 structure with se11 table type included

    Hi ABAP Gurus,
    in order to pass a complex datastructure by RFC I want to create a new structure via SE11 which includes in addition to some normal fields an field which represents a table of a certain type. Therefore I created a table type and tried to include that in the structure definition but without success. Any ideas of how I can create such a 'non-flat' structure in the ABAP dictionary ?
    I know that such a thing can be declared as a type in ABAP, but I'm not sure if I can do it in the dictionary.
    Any reply is very appreciated,
    Best regards, Philipp

    Hi,
    You can insert structure into the table, and vice versa is not possible.
    If you want to insert structure GO to Se11 -> provide table name -> chnage/create -> edit -> include -> insert -> provide the strcuture you want to include.
    Thanks,
    Sriram Ponna.

  • How to rearrange the structure of a table by using a view?

    At wits end: I need to reorganize the structure of a table into a new structure - either as a view or actually moving the data from the old structure to the new structure (using a view).
    The old structure is:
    TESTNAME, SCHOOL_ID, PTILE1, PTILE2, PTILE3 ... PTILE99
    Test1,0001,18,19,20...
    Test1,0002,23,24,28...
    Test1,0003,20,21,26...
    Test2,0001,48,52,55...
    Test2,0002,50,54,54...
    Test2,0003,60,62,64
    The new structure is:
    SCHOOL_ID,PTILE,TESTNAME1,TESTNAME2...
    1,0001,Score1,Score2...
    1,0002,Score1,Score2...
    1,0003,Score1,Score2...
    2,0001,Score1,Score2...
    2,0002,Score1,Score2...
    2,0003,Score1,Score2...
    99,0001,Score1,Score2...
    99,0002,Score1,Score2...
    99,0003,Score1,Score2...
    What this data shows are the percentiles for test scores for different tests for each school who took the tests.
    It seems like creating a view to arrange the data through a bunch of selects and unions would work, but I can't figure out how.

    Tricky.
    When confronted with a problem like this I try to write out an algorthm in pseudocode to work out what I want to do. If you have more than 2 or 3 tables to merge I'd consider going with a new structure; otherwise the view approach might be a good idea. Remember that if you go with a new structure you can insert once and update the other values later, something like
    foreach school insert row
    update testname1
    update testname2
    Good luck.

  • Query about screen as a structure used in table control.

    hi all,
    plz explain the fields in screen(structure).
    when and how it is used.
    specialy i/o, o/p,active,
    plz give example.

    hi,
    The screen elements text field, input/output field, status icon, group box, radio button, checkbox, and
    pushbutton all have general attributes, Dictionary attributes, program attributes, and display attributes.
    The elements subscreen, tabstrip control, and table control have general attributes, and special
    attributes relating to the respective type.
    We can divide the attributes of an element into:
    Statically definable attributes that cannot be changed dynamically
    Statically definable attributes that can be changed dynamically
    Attributes that can only be changed dynamically
    At the beginning of the PBO, the runtime system reads the statically-created and dynamically-modifiable
    attributes of each screen element on the current screen into a system table with the line type SCREEN.
    Dynamic changes to the attributes of screen elements are temporary.
    Using this technique to modify the attributes of a screen element (for example, to change whether an
    input/output field is ready for input), you can replace long sequences of separate screens, which are
    more costly in terms of both programming time and runtime.
    The system table with line type SCREEN will be called SCREEN system table in the following unit.
    When a screen is processed, the SCREEN system table contains an entry for each element created in
    the Screen Painter for that screen.
    The system table SCREEN is initialized at the start of the PBO event for the current screen. To do this, a
    system program copies the statically defined attributes of the individual screen elements into the table.
    You can then change the dynamically-modifiable attributes of the elements on the screen in a module at
    PBO using the following statements: LOOP AT SCREEN.
    MODIFY SCREEN.
    ENDLOOP.
    To do this, you use the structure SCREEN, which is created automatically by the system, and filled with
    the values of each successive line of the system table in the loop. Set attributes have the value '1',
    attributes that are not set have the value '0'. To change the system table, use MODIFY SCREEN. within
    the loop.
    To find the element whose attributes you want to modify, you can use a LOOP on the SCREEN table,
    and query one of the following fields: SCREEN-NAME, SCREEN-GROUP1 to SCREEN-GROUP4.
    You can change the attributes of several screen elements simultaneously at runtime, by including them
    in a modification group in the Screen Painter. Assign all elements that will be changed within a single
    processing step to a group in the Screen Painter.
    To do this, enter a group name for each of the relevant elements in one of the fields GROUP1 …
    GROUP4.
    You can include each element in up to four modification groups. You can choose any three-character
    sequence for the group name. You can assign elements to a modification group either in the element list
    or the layout editor in Screen Painter.
    You must program your screen modifications in a module that is processed during the PROCESS
    BEFORE OUTPUT processing block.
    You use a loop through the table SCREEN to change the attributes of an element or a group of
    elements. (LOOP AT SCREEN WHERE . . . and READ TABLE SCREEN are not supported).
    To activate and deactivate attributes, assign the value 1 (active) or 0 (inactive), and save your changes
    using the MODIFY SCREEN statement.
    Note that elements you have defined statically in the Screen Painter as invisible cannot be reactivated
    with SCREEN-ACTIVE = 1. Instead, use the statement SCREEN-INVISIBLE = 0. However, elements
    that you have statically defined as visible in the Screen Painter can dynamically be made invisible. This
    has the same effect as the three statements SCREEN-INVISIBLE = 1, SCREEN-INPUT = 0, SCREENOUTPUT
    = 0.
    There are three steps involved in displaying buffered data from the internal table in the table control:
    The system loops through the lines of the table control on the screen. The lines of the screen table are
    processed one by one. For each line, the system carries out the following steps:
    The current line of the internal table is placed in the work area of the internal table. (Note that it is
    possible to scroll in the table on the screen).
    The data from the work area of the internal table is copied into the relevant line of the table control.
    When you use table controls on a screen, the automatic field transport sequence changes.
    In the PBO processing block, data is transferred from the ABAP program to the screen after each loop
    pass in the flow logic. The rest of the screen fields are filled, as normal, at the end of the PBO.
    In the flow logic, the loop statement
    LOOP AT <itab> INTO <wa_itab> WITH CONTROL <tc_name>
    starts a loop through the screen table, and reads the line of the internal table corresponding to the
    current line of the screen table, placing it in <wa_itab>.
    <itab> is the name of the internal table containing the data, <wa_itab> is the name of the work area for
    the internal table, and <tc_name> is the name of the table control on the screen.
    If the fields in your table control have the same structure and name as those in the work area <wa_itab>,
    the system can transport data between the ABAP program and the screen automatically (step 3).
    If you are not using the same structure for the table control fields and the work area of the internal table,
    you must call a module between LOOP and ENDLOOP that moves the data from the work area
    <wa_itab> into the screen fields (MOVE-CORRESPONDING <wa_itab> TO …) .
    The system calculates the value of <ctrl>-TOP_LINE when you scroll, but not when you scroll a page at
    a time outside the table control.
    In order to transfer changed values from the table control back to the internal table the following three
    steps must be carried out:
    The system loops through the lines of the table control. The lines of the screen table are processed
    one by one. For each line, the system carries out the following steps:
    The data from the current line of the table control is copied into the header line of the internal table.
    The data in the work area must then be placed in the line of the internal table corresponding to the
    line of the table control that is being processed. (Note that it is possible to scroll in the table on the
    screen).
    In the PAI processing block, all screen fields that do not belong to a table control and that are not listed
    in a FIELD statement are transported back to the work fields in the ABAP program first.
    The contents of the table control are transported line-by-line to the corresponding work area in the ABAP
    program in the appropriate loop.
    As usual, the fields that occur in FIELD statements are transported directly before that statement.
    The structure of the screen tables contain.
    NAME
    GROUP 1
    GROUP 2
    GROUP 3
    GROUP 4
    OUTPUT
    REQUIRED
    LENGTH
    INTENSIFIED
    INVISIBLE
    ACTIVE
    Hope this helps, Do reward.
    Edited by: Runal Singh on Mar 13, 2008 10:41 AM

  • Function module to get structure of DDIC table

    Hi everyone,
    Is there any SAP standard function module to fetch the structure of DDIC table ?
    Thanks in Advance

    HI,
    Go thru this link
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    Thanks
    Sunil

  • Structure of setup table

    Hello
          can anybody tell me how can i check the structure of a setup table.Is it "extract structure" or the "comm structure" in R/3 side.
    Regards
    Tarun Khurana

    Hi,
    LIS Setup-Tables are defined as cluster tables in the database, so technically the structure is always a generic key plus a data cluster. You cannot access this table via normal SELECT or via transaction SE16.
    Within the data cluster the data is stored in the format of the extract structure. The table name is also derived from the extract strucuter: 2LIS_11_VAITM has extract structure MC11VA0ITM and setup table MC11VA0ITMSETUP.
    Regards
    Stephan

  • Assignment between include/Append structures and Database Tables

    Hi All,
    I need to find the list of all Append/Include Structures in my system and Their assignment to Tables.
    (For Each Append/Include structure, to which table it was assigned)
    Is there any way to find it?
    Thanks,
    Krishna.

    Hi,
    Go to se11 - data type - give Z* and press F4.
    Pop-up will come  - click on search for structures - u will get standard structures.
    Then take any structure name and check for where used list ( cont + shift + F3) .
    U will get all the DB tables where and all they have used that include / append structure.
    Regards,
    Kusuma.

  • Is it possible to create table variable by copying structure of existing table?

    Greetings community,
    It’s a newbie question.
    I’m still learning T-SQL, and I’m not very familiar with its syntax, so I’m not sure if I’m asking something stupid. I’m creating a “stored function”. I need to create temporary table variable to do some “thinking” in it and spit out a
    scalar result. Actually, I have to create about ten similar functions to process ten tables in similar way, so I was searching is it possible to speed it up.
    I was wondering is there any way, instead of declaring table variable with list of gazillion columns (and having the possibility to mistype something), to declare table variable so it would inherit structure of existing table.
    Thanks for any help.

    Temp table variable can not be created on the fly, but temp table can be created.
    If you want just the structure, you can use the below.
    SELECT Top 0
    INTO #temp
    FROM
    Sales.SalesOrderHeader

  • How to delete append structure in a table?

    Hi guys,
    How can I delete the structure appended to a table?
    Thanks in advance!

    hi,
    select the structure in the table which the atructure is available  by going to SE11
    and choose the Delete line option by right clicking.
    or
    Go to SE11
    enter the structure name
    choose the delete option from Application toolbar.
    <b><i>Reward points if useful</i></b>
    Chandra
    Message was edited by:
            Chandrasekhar Velpula

  • Can I join Structure with Z table ?

    Can I join Structure with Z table?
    If yes...plz explain me with an example.
    PLease provide me with an example to join a structure with a Ztable...
    Any help would be appreciated...
    Regards,
    Krishna Chaitanya

    Hi Chitanya,
      It is possible to add fields in the form of structure to a Z table.it can be done in the form of Include or Append structure.There are no other ways to join structure to the table upto my knowledge.
    if it useful, reward points.
    Thank u,
    Prasad G.V.K

  • How to add ci_cobl structure to BSEG table?

    i want to add ci_cobl structure to bseg table...

    Use append structure functionality....get key from SAP to do that....see all the implications too..
    Raghav

  • Appending structures to the tables

    Hi experts,
    Why we are appending sturctures to the tables?
    can any one tell me the main differences between the APPEND and INCLUDE structures
    in Datadictionary.
    Thanks in Advance.

    Hi Ankita,
    Customizing Includes
    A Customizing include is a structure that satisfies a special naming convention. The name of a Customizing include begins with u2018CI_u2019 and the include is in the customer namespace.
    If enhancements are already planned in the R/3 standard using customer-specific fields, such Customizing includes are included. in the corresponding standard table or standard structure. The Customizing include (that is the definition of the structure itself) is usually first created in the customer system and filled with fields by special Customizing transactions.
    Customers can thus enhance tables and structures of the R/3 standard system without themselves having to modify the table and structure definitions. This means that these enhancements will not be lost when upgrading. If a table or structure of the R/3 standard system is enhanced with customer fields using a Customizing include, these customer fields are automatically inserted in the new delivered table or structure definition during an upgrade.
    If you create a Customizing include for a table or structure, only those enhancements are allowed that are consistent with the enhancement category of the enhanced table or structure. For more information, see Structure Enhancements.
    Customers can but need not create a Customizing include and fill it with fields. If there is no Customizing include, there is no error message when the table or structure including it is activated.
    A Customizing include can be contained in several tables or structures, so that they remain consistent when the include is modified.
    Append Structures
    Append structures are used for enhancements that are not included in the standard. This includes special developments, country versions and adding customer fields to any tables or structures.
    An append structure is a structure that is assigned to exactly one table or structure. There can be more than one append structure for a table or structure.
    The following enhancements can be made to a table or structure TAB with an append structure:
    Insert new fields in TAB,
    Define foreign keys for fields of TAB that already exist,
    Attach search helps to fields of TAB that already exist,
    These enhancements are part of the append structure, i.e. they must always be changed and transported with the append structure.
    When a table or structure is activated, all the append structures of the table are searched and the fields of these append structures are added to the table or structure. Foreign keys and search help attachments added using the append structure are also added to the table. If an append structure is created or changed, the table or structure assigned to it is also adjusted to these changes when the append structure is activated.
    Since the order of the fields in the ABAP Dictionary can differ from the order of the fields on the database, adding append structures or inserting fields in such append structures does not result in a table conversion.
    The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure should also reside in the customer namespace, that is the field names should begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP.
    Reward if found helpful.
    Anirban Bhattacharjee

  • Copy the structure of a table to another with another table name.

    how to copy the structure of a table to another with another table name.
    ie. i want a emp table with same values/structure to be copied to another table called my_employee.
    how can this be done?

    create table my_emp as select * from emp;
    If you do not want the data to be copied then do the following:
    create table my_emp as select * from emp
    where 1=2;
    Avanti.

Maybe you are looking for

  • How to configure link between 2921 and SM-D-ES3G-48-P EtherSwitch Service Module

    hi, I can't do that like the procedure given by Cisco. http://www.cisco.com/en/US/partner/docs/routers/access/interfaces/software/feature/guide/eesm_sw.html#wp1942894 Cisco Procedure : interface gi10/0 ip address x.x.x.x x.x.x.x service-module gigabi

  • Cover Flow images don't fill Finder window?

    Hi everyone, I like to use Finder in Cover Flow mode to browse through images. However, if I expand Finder to fill the whole screen, and I expand the Cover Flow pane to take up most of the screen, the Cover Flow images don't expand to fill up the Cov

  • Bouncing iTunes icon in dock

    When I click on my iTunes icon to open the program, the icon continuously bounces in the dock but never actually launches.  I am on a brand new MacBook Air running OS X 10.9.1.  I just bought the  Does anyone know how to fix this?

  • Question(s) related to ASM, Raw devices and performance

    Good morning, I was recently getting acquainted with ASM. Since I was doing this in "play" VM boxes, it was not possible to draw any conclusions about any performance improvements. I'd like to know what performance improvements forum members may have

  • HT2534 Access to Apps from different country App store

    I am an Australian living in the UK and I want to access apps that are available on the Australian App store but I am being told I can't access these? Why not? I would have thought by having an apple ID I could access apps that are available on the A