Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Method

Former Member
0 Kudos

How can i search a string in a method?

What are the tables that store the name of the methods, and all the information that they have?

I know that the table tadir stores the objects but i cant find the link to the table tmdir that keeps the methods.

If anyone could answer...

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Rui,

I see that this is your first post to the SDN Forums. I extend a hearty welcome to you.

Coming to the question that you have posed, the table TMDIR, if you have noticed, is not linked to any other table.

You have said that you want to search a string in a <i>method</i>. Here, considering the remainder of your description, I assume that you want to search for a string in a <i>method name</i>. If that is the case, then you can go to SE16 and search for the method name from the table TMDIR.

Regards,

Anand Mandalika.

P.S : Since you are a new member here, I should like to introduce you to the Forum Etiquette. Answering the queries you make in SDN requires some time and effort from the person(s) who take up your question. So when you get an answer that you find to be useful, please do <i>reward</i> it accordingly. It is an SDN way of saying Thank You! For more information, you can refer to the weblog https://weblogs.sdn.sap.com/pub/wlg/680. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

7 REPLIES 7

Former Member
0 Kudos

Hello Rui,

I see that this is your first post to the SDN Forums. I extend a hearty welcome to you.

Coming to the question that you have posed, the table TMDIR, if you have noticed, is not linked to any other table.

You have said that you want to search a string in a <i>method</i>. Here, considering the remainder of your description, I assume that you want to search for a string in a <i>method name</i>. If that is the case, then you can go to SE16 and search for the method name from the table TMDIR.

Regards,

Anand Mandalika.

P.S : Since you are a new member here, I should like to introduce you to the Forum Etiquette. Answering the queries you make in SDN requires some time and effort from the person(s) who take up your question. So when you get an answer that you find to be useful, please do <i>reward</i> it accordingly. It is an SDN way of saying Thank You! For more information, you can refer to the weblog https://weblogs.sdn.sap.com/pub/wlg/680. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

0 Kudos

Thanks for answering my question. My english is very bad, but i'll try to explain better, i want to search a string inside a method....

Example: i have a program that search strings in all programs that i have(source code of the programs, comentary, etc...). Now i want to extend it to the methods.... I want to search a string in the source code of a method.... So then i can view it in a alv grid of my main program.

Thanks for taking the time for viewing my question.

0 Kudos

Hello Rui,

I now get what you are trying to do. Let me explain. The code that you write for the methods of the class is stored in include programs, just the same way a Function Modules' code is stored in an include program.

And just as the include for a FM's code has a particular naming convention, so does the code for a method of a class.

For example, consider the class CL_GUI_ALV_GRID. the methods of this class are stored in includes of the form CL_GUI_ALV_GRID*. Now I shall leave it up to you to find out which method is stored in which include :-).

Hope this information has been useful to you. If yes, then please do not forget to reward the points by clicking the Yellow Star.

Regards,

Anand Mandalika.

P.S : I have enjoyed researching into this one too.

0 Kudos

i understand all that you said, but there's still one thing that i can't do, how can i read a source code of a method. Ex: read report '...~...' into .... .

Maybe the answer is in your previously answer, but my english....

thanks for wasting all this time with me.

0 Kudos

Hi Rui

First of all, I think the methods are not coded in includes in a 1-to-1 relation as in function modules.

However, since you've given points to Poornanand, I assume you've achieved to find include name for a method. Then you can read the include with the statement "READ REPORT..." as you've mentioned and scan it for "METHOD" keyword. Or use some internal ABAP statements to parse the code to tokens and then get the coding.

*--Serdar

0 Kudos

Would anyone like to reveal how to find the "include" name from the class/method.

Regards,

Rich Heilman

0 Kudos

Please look at FM: SEO_CLASS_GET_METHOD_INCLUDES

Regards

Vilmos