<?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: System Variable which stores Method name in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416761#M1243598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe:&lt;/P&gt;&lt;P&gt;  Basically I wanted to check the method name inside a Class of a PROXY. The FM which you have used gives me all the details I need. Thanks a Lot!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Apr 2009 13:18:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-03T13:18:24Z</dc:date>
    <item>
      <title>System Variable which stores Method name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416759#M1243596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;  Is there any system variable like SY-REPID or CPROG which I can use inside a method to know the Class and the Method name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 20:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416759#M1243596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable which stores Method name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416760#M1243597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample report &lt;STRONG&gt;ZUS_SDN_LOCAL_CALL_SYSTEMSTACK&lt;/STRONG&gt; shows you how to solve your problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_LOCAL_CALL_SYSTEMSTACK
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_local_call_systemstack.


*----------------------------------------------------------------------*
*       CLASS lcl_myclass DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_myclass DEFINITION.

  PUBLIC SECTION.
    CLASS-METHODS:
      method_one,
      method_two,
      get_system_stack
        RETURNING value(rd_method)  TYPE string.

ENDCLASS.                    "lcl_myclass DEFINITION


*----------------------------------------------------------------------*
*       CLASS lcl_myclass IMPLEMENTATION
*----------------------------------------------------------------------*
* Thread: System Variable which stores Method name
* &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1294681"&amp;gt;&amp;lt;/a&amp;gt;
*----------------------------------------------------------------------*
CLASS lcl_myclass IMPLEMENTATION.


  METHOD get_system_stack.
* define local data
    DATA: ld_next         TYPE i,
          lt_callstack    TYPE abap_callstack,
          ls_call         TYPE abap_callstack_line.

    CALL FUNCTION 'SYSTEM_CALLSTACK'
        EXPORTING
          MAX_LEVEL          = 2
      IMPORTING
        callstack          = lt_callstack
*         ET_CALLSTACK       =
              .

    LOOP AT lt_callstack TRANSPORTING NO FIELDS
            WHERE ( blocktype = 'METHOD'
            AND     blockname = 'GET_SYSTEM_STACK' ).
      ld_next = syst-tabix + 1.
      EXIT.
    ENDLOOP.

    READ TABLE lt_callstack INTO ls_call INDEX ld_next.
    rd_method = ls_call-blockname.

  ENDMETHOD.                    "get_system_stack

  METHOD method_one.
    DATA: ld_string  TYPE string.

    ld_string = lcl_myclass=&amp;gt;get_system_stack( ).
    MESSAGE ld_string TYPE 'I'.

  ENDMETHOD.                    "method_one

  METHOD method_two.
    DATA: ld_string  TYPE string.

    ld_string = lcl_myclass=&amp;gt;get_system_stack( ).
    MESSAGE ld_string TYPE 'I'.


  ENDMETHOD.                    "method_two
ENDCLASS.                    "lcl_myclass IMPLEMENTATION


START-OF-SELECTION.

  BREAK-POINT.

  lcl_myclass=&amp;gt;method_one( ).
  lcl_myclass=&amp;gt;method_two( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 06:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416760#M1243597</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-04-03T06:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable which stores Method name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416761#M1243598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe:&lt;/P&gt;&lt;P&gt;  Basically I wanted to check the method name inside a Class of a PROXY. The FM which you have used gives me all the details I need. Thanks a Lot!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 13:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416761#M1243598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-03T13:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: System Variable which stores Method name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416762#M1243599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe:&lt;/P&gt;&lt;P&gt;  Basically I wanted to check the method name inside a Class of a PROXY. The FM which you have used gives me all the details I need. Thanks a Lot!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2009 13:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-variable-which-stores-method-name/m-p/5416762#M1243599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-03T13:18:44Z</dc:date>
    </item>
  </channel>
</rss>

