<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the wrong in this code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431993#M543754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This events lets the system know from where the execution of code will start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2007 15:49:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-02T15:49:08Z</dc:date>
    <item>
      <title>What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431983#M543744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZTESTTEST
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ztesttest LINE-SIZE 256.
TYPE-POOLS: slis.

FIELD-SYMBOLS: &amp;lt;dyn_table&amp;gt; TYPE STANDARD TABLE ,
               &amp;lt;dyn_wa&amp;gt;,
               &amp;lt;dyn_field&amp;gt;.
FIELD-SYMBOLS: &amp;lt;dyn_table1&amp;gt; TYPE STANDARD TABLE ,
               &amp;lt;dyn_wa1&amp;gt;,
               &amp;lt;dyn_field1&amp;gt;.

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=&amp;gt;describe_by_name( p_table ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 14:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431983#M543744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431984#M543745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;START-OF-SELECTION.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431984#M543745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431985#M543746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;abap_component_tab&amp;lt;/b&amp;gt; does not exist...At least not on my system....Comment that and works fine....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:03:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431985#M543746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431986#M543747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the type pool there is no component called abap_component_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :itab TYPE abap_component_tab.&lt;/P&gt;&lt;P&gt;The above line is error in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also last line is also wrong &lt;/P&gt;&lt;P&gt;ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431986#M543747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431987#M543748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That depends on what you want it to do.  Do you want it to write "Hi"?  If so...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report  ztesttest line-size 256.
*type-pools: slis.
*
*field-symbols: &amp;lt;dyn_table&amp;gt; type standard table ,
*               &amp;lt;dyn_wa&amp;gt;,
*               &amp;lt;dyn_field&amp;gt;.
*field-symbols: &amp;lt;dyn_table1&amp;gt; type standard table ,
*               &amp;lt;dyn_wa1&amp;gt;,
*               &amp;lt;dyn_field1&amp;gt;.
*
*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.

data: o_ref type ref to cl_my_structure.

selection-screen begin of block b1 with frame title text .
parameters: p_table(30) type c default 'T001'.
selection-screen end of block b1.

start-of-selection.    "&amp;lt;--  YES, YOU NEED THIS.

create object o_ref .
call method o_ref-&amp;gt;x.

* Get the structure of the table.
*ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431987#M543748</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-02T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431988#M543749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you are exactly trying to achieve, but at a glance the code is missing the event heading start-of-selection making the last statement inaccessable. &lt;/P&gt;&lt;P&gt;Also you aren't invoking any of the methods in your local class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'd need something like this after the selection screen definition.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: lv_my_obj type ref to cl_my_structure.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  create object lv_my_obj.&lt;/P&gt;&lt;P&gt;  lv_my_obj-&amp;gt;x( ).&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the structure of the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_name( p_table ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431988#M543749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431989#M543750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi `Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood what you mean to ask me but my question is diffrent. On the sysntax check i am getting an error. When i comment the method in the local class then the syntax error will not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please explain me what is the reason for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lisa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:10:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431989#M543750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431990#M543751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431990#M543751</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-07-02T15:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431991#M543752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not the error. Just comment the method X then you will not find the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lisa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431991#M543752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431992#M543753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know why do i need toput this start of selection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lisa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431992#M543753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is the wrong in this code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431993#M543754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lisa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This events lets the system know from where the execution of code will start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2007 15:49:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-wrong-in-this-code/m-p/2431993#M543754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-02T15:49:08Z</dc:date>
    </item>
  </channel>
</rss>

