Skip to Content
0
Former Member
Jul 02, 2007 at 02:57 PM

What is the wrong in this code

17 Views

*&---------------------------------------------------------------------*
*& Report  ZTESTTEST
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ztesttest LINE-SIZE 256.
TYPE-POOLS: slis.

FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE ,
               <dyn_wa>,
               <dyn_field>.
FIELD-SYMBOLS: <dyn_table1> TYPE STANDARD TABLE ,
               <dyn_wa1>,
               <dyn_field1>.

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 :itab TYPE abap_component_tab.
*----------------------------------------------------------------------*
*       CLASS cl_my_structure  DEFENITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_my_structure DEFINITION.
  PUBLIC  SECTION.
    METHODS: x.
  PROTECTED SECTION.

  PRIVATE SECTION.



ENDCLASS.                    "cl_my_structure  DEFENITION
*----------------------------------------------------------------------*
*       CLASS cl_my_structure IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_my_structure IMPLEMENTATION.
  METHOD x.
    WRITE 'HI'.
  ENDMETHOD.                    "x
ENDCLASS.                    "cl_my_structure IMPLEMENTATION


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 DEFAULT 'T001'.
SELECTION-SCREEN END OF BLOCK b1.

* Get the structure of the table.
ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).