<?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: Function module name..sy-repid equivalent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353430#M176759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly is your requirement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2006 00:34:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-19T00:34:07Z</dc:date>
    <item>
      <title>Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353429#M176758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does anybody know how to identify within a function module what it's name is? i.e. is there a similar variable to sy-repid to identify what the current function module is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know sy-repid will identify the main program of the function group, I want the name of the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a mechanism to log the parameters sent to calls of function modules. I have created a custom table to hold the data and one of the key fields is the name of the function module. Currently I hard-code the name when I enable this logging within a function module but I wondered if there is a variable somewhere which holds the name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This mechanism will be used by many function modules and I can't change the interfaces, say to use a new parameter. I want this function to be able to be plugged into any fm I choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prototype mechanism needs a few lines of code inserted in each fm that's going to be log-enabled. It uses a macro which takes the function module name as a parameter, works out what the parameters are called and what their values are and puts them in a custom table. Then there is an associated report which browses this table and formats the parameters appropriately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update........&lt;/P&gt;&lt;P&gt;It seems this can't be done. Rob is right that the name is knowable but I think it's hidden away in the deep magic of the kernal. Any more ideas before I close the thread?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further Update:&lt;/P&gt;&lt;P&gt;thanks Stefan - this looks exactly what I need. I will check it out thoroughly before awarding you full points!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally:&lt;/P&gt;&lt;P&gt;SYSTEM_CALLSTACK works perfectly for my purposes. I no longer have to hard-code the name of the function module I am trying to log.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 23:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353429#M176758</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-05-18T23:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353430#M176759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly is your requirement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 00:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353430#M176759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T00:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353431#M176760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a custom function module? If yes, add a parameter to pass the name of the function module..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought so...you couldn't have missed something obvious.. OK how do you intend to plug-in your mechanism in different function modules?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Suresh Datti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 01:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353431#M176760</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-05-19T01:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353432#M176761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the ABAP debugger knows the name of the FM that you're in, so it must be knowable. Maybe a kernel call of some kind??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 03:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353432#M176761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T03:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353433#M176762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try something like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before call of the FM in your program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do a set parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set parameter id 'LIB' field &amp;lt;FMNAME&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and within your FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fmname(30) .&lt;/P&gt;&lt;P&gt;get parameter id 'LIB' field fmname .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2006 07:15:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353433#M176762</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-05-23T07:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Function module name..sy-repid equivalent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353434#M176763</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;you can try FM "SYSTEM_CALLSTACK". Take in the resulting table the first entry with ProgName = SY-REPID and eventType = FUNC. Field Eventname contains FM-Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested it in some cases and it seems to work. However, I found no official documentation about it!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2006 15:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-name-sy-repid-equivalent/m-p/1353434#M176763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-23T15:11:50Z</dc:date>
    </item>
  </channel>
</rss>

