<?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: Current method name (method meta data) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352866#M519560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Rich!&lt;/P&gt;&lt;P&gt;Good enough for me. I can get the class name using RTTI, so I guess I have it all.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2007 14:17:24 GMT</pubDate>
    <dc:creator>former_member185943</dc:creator>
    <dc:date>2007-06-05T14:17:24Z</dc:date>
    <item>
      <title>Current method name (method meta data)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352864#M519558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Is it possible to get meta data about current method being executed? For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_some_class IMPLEMENTATION.
  METHOD some_method.
    DATA: l_method_name TYPE char50.
*   (do something to get method name)
    WRITE 'Current method is: ', l_method_name.
  ENDMETHOD.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And the result would be something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LCL_SOME_CLASS-&amp;gt;SOME_METHOD&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 13:46:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352864#M519558</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2007-06-05T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Current method name (method meta data)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352865#M519559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,  this may not be fool proof, but it does work in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0003 .

*---------------------------------------------------------------------*
*       CLASS lcl_some_class DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_some_class definition.

  public section.
    class-methods: some_method.

endclass.


*---------------------------------------------------------------------*
*       CLASS lcl_some_class IMPLEMENTATION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_some_class implementation.
  method some_method.
    data: l_method_name type char50.
    data: icallstack type sys_callst.
    data: xcallstack like line of icallstack.

    call function 'SYSTEM_CALLSTACK'
         importing
              et_callstack = icallstack.


    read table icallstack into xcallstack index 1.
    if sy-subrc  = 0 and xcallstack-eventtype = 'METH'.
      l_method_name = xcallstack-eventname.
    endif.

*   (do something to get method name)
    write:/ 'Current method is: ', l_method_name.
  endmethod.
endclass.


start-of-selection.

  call method lcl_some_class=&amp;gt;some_method.

&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>Tue, 05 Jun 2007 13:55:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352865#M519559</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-05T13:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Current method name (method meta data)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352866#M519560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Rich!&lt;/P&gt;&lt;P&gt;Good enough for me. I can get the class name using RTTI, so I guess I have it all.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 14:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-method-name-method-meta-data/m-p/2352866#M519560</guid>
      <dc:creator>former_member185943</dc:creator>
      <dc:date>2007-06-05T14:17:24Z</dc:date>
    </item>
  </channel>
</rss>

