<?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: cannot compile a method, field is unknown in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664795#M294388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the code in your method,  please make sure that the first line reads as follows....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;method&amp;lt;/b&amp;gt; PROCESS_XLS_DOWNLOAD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you may have deleted the word method or something.&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>Thu, 26 Oct 2006 13:06:42 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-26T13:06:42Z</dc:date>
    <item>
      <title>cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664794#M294387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is how I create my method, if there is any other way or additional work to do, please let me know:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-rightclick on the class ZCL_ES_BSP_ELMNT_DWN_TBL_EXCL -&amp;gt; Create -&amp;gt; Method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now there is a dialog:&lt;/P&gt;&lt;P&gt;-insert methodname "process_xls_download"&lt;/P&gt;&lt;P&gt;-insert description "xls download processing"&lt;/P&gt;&lt;P&gt;-insert the two parameters "ITAB" and "R_XSTRING"&lt;/P&gt;&lt;P&gt;-attributes: "public" and "static" (but I already tried "instance")&lt;/P&gt;&lt;P&gt;-no abstract, no final, no event handler, no modeled&lt;/P&gt;&lt;P&gt;-no entries in "exceptions"&lt;/P&gt;&lt;P&gt;-save changes to ZCL_ES_BSP...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and voila I can see my new method. I double click on it and paste your code in it.&lt;/P&gt;&lt;P&gt;CTRL+F2 gives me "no syntax errors found"&lt;/P&gt;&lt;P&gt;CTRL+F3 gives me "Method "PROCESS_XLS_DOWNLOAD" is not declared or inherited in class"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am not able to compile the class, cause "Field "PROCESS_XLS_DOWNLOAD" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so what did I wrong?&lt;/P&gt;&lt;P&gt;I don't know that I have to declare a new method manually, in case of the dialog-creation?!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 12:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664794#M294387</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2006-10-26T12:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664795#M294388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the code in your method,  please make sure that the first line reads as follows....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;method&amp;lt;/b&amp;gt; PROCESS_XLS_DOWNLOAD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you may have deleted the word method or something.&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>Thu, 26 Oct 2006 13:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664795#M294388</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-26T13:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664796#M294389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  When you double click on the new method's name, you would be taken to an editor where there is a &lt;/P&gt;&lt;P&gt;method &amp;lt;method name&amp;gt;.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;already there.&lt;/P&gt;&lt;P&gt;When you paste your code, it might have had an extra method statement.YOu need only to paste the code between the method-enmethod block.&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664796#M294389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-26T13:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664797#M294390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    If there are no syntax errors , that is if cntrl F2 does not give any error then cntrl + F3 gives you an option to activate it anyway. Try and activate it anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664797#M294390</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-10-26T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664798#M294391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my method begins with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method PROCESS_XLS_DOWNLOAD.

  data: r_string type string.

  data: lapp_type type char30,
        str       type string.

****Set the application Type - character set for conversion from string
****to Binary String - Excel Requires UTF-16 with Little Endian
 lapp_type = 'text/unicode; charset=utf-16le'.

  field-symbols: &amp;lt;tab&amp;gt;         type table,
                 &amp;lt;wa&amp;gt;          type any,
                 &amp;lt;f&amp;gt;           type any.
...
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and ends with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  concatenate  cl_abap_char_utilities=&amp;gt;byte_order_mark_little
               r_xstring
               into r_xstring in byte mode.
endmethod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there is no double expression for "method" or "endmethod". If I want to compile my complete class, I get the error:&lt;/P&gt;&lt;P&gt;"Field "PROCESS_XLS_DOWNLOAD" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the dialogcreation of this method, already created this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
class ZCL_ES_BSP_ELMNT_DWN_TBL_EXCL definition
  public
  inheriting from ZCLG_ZKEG_DOWNLOADTABLEEXCEL
  create public .
 
*"* public components of class ZCL_ES_BSP_ELMNT_DWN_TBL_EXCL
*"* do not include other source files here!!!
public section.
 
  interfaces IF_HTMLB_DATA .
 
  data SELECTED_STRING type STRING .
  data SELECTED_ID type STRING .
  data SELECTED_TEXT type STRING .
 
  class-methods CLASS_CONSTRUCTOR .
  methods GET_TABLE_STRUCTURE
    importing
      !ITAB type ref to DATA
    returning
      value(STRUCT) type EXTDFIEST .
  methods PROCESS_XLS_DOWNLOAD
    importing
      !ITAB type ref to DATA
    returning
      value(R_XSTRING) type XSTRING 
...
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the public-section of the class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way my class has a superclass, but this shouldn't make any problems?!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a other case of this program, I created a class and a method successfully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664798#M294391</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2006-10-26T13:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664799#M294392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  When you try to activate the code, how many object are you getting in the pop up?&lt;/P&gt;&lt;P&gt;Select all the objects and activate them at a time.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:51:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664799#M294392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-26T13:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664800#M294393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, activate all, if that doesn't help, say "Activate Anyway" then try to activate again and see if you still get the message.&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>Thu, 26 Oct 2006 14:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664800#M294393</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-26T14:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664801#M294394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need not have to worry about the error that is coming... The error comes when you try to activate a method in a class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After typing the code in the method and saving it, what you can do is check if it has any syntax errors. After it is clean with no syntax errors, come out of the method . Now you will be in your class. Now press CTRL + F3. This will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 20:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664801#M294394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-26T20:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: cannot compile a method, field is unknown</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664802#M294395</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;so I have 6 items in "transportation objects"&lt;/P&gt;&lt;P&gt;CPU ZCL_ES_BSP...&lt;/P&gt;&lt;P&gt;METH (5 times)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to activate anyway these items. This activation process works (all my six objects are active now), but when I change just a word from "METHOD" to "method" --&amp;gt; save it --&amp;gt; CTRL&lt;EM&gt;F2 (no errors) --&amp;gt; CTRL&lt;/EM&gt;F3 (same error as I described above)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very strange, my example is taken from a blog (/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table) by Thomas Jung, but I couldn't helped me anyway :-(. Maybe you can see any advices there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 07:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-compile-a-method-field-is-unknown/m-p/1664802#M294395</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2006-10-27T07:11:54Z</dc:date>
    </item>
  </channel>
</rss>

