2009 Feb 10 3:05 AM
Hello Experts,
I'm new in ABAP programming, recently my team members wanted to find a tool in the SAP system, which could export a list of objects that used in a report program. For example, I want to figure out what function modules and classes are used in a report program, using the tool, I could get a list that have the name of the modules and classed used and even source code of them.
The function of the tool acts like 'where-used list' showed in the SAP system, but the differences is I do not have to type the name of the objects. The tool is just focus on the specific report program and list the name and source code of the objects used in that report program.
Hope I explain this clearly.
Is SAP system has such tools? Please give me some hints on this.
Thanks you all for the time and help in advance.
2009 Feb 10 3:08 AM
Hi,
Goto--SE80(WorkBench Tool/Object Navigator).
Select Program From the drop downlist..
Type your program name..You will get a tree like structure of your program.
THis is where you will find what ever is used in your program.
Regards,
Gurpreet
Hello Experts,
I'm new in ABAP programming, recently my team members wanted to find a tool in the SAP system, which could export a list of objects that used in a report program. For example, I want to figure out what function modules and classes are used in a report program, using the tool, I could get a list that have the name of the modules and classed used and even source code of them.
The function of the tool acts like 'where-used list' showed in the SAP system, but the differences is I do not have to type the name of the objects. The tool is just focus on the specific report program and list the name and source code of the objects used in that report program.
Hope I explain this clearly.
Is SAP system has such tools? Please give me some hints on this.
Thanks you all for the time and help in advance.
2009 Feb 10 3:08 AM
Hi,
Goto--SE80(WorkBench Tool/Object Navigator).
Select Program From the drop downlist..
Type your program name..You will get a tree like structure of your program.
THis is where you will find what ever is used in your program.
Regards,
Gurpreet
2009 Feb 10 3:30 AM
Hi Gurpreet,
Thanks for your quick reply.
The objects that defined in the program could be listed using the method you mentioned, but what if the objects that used is not defined in the program just using references?
anyhow, thanks for your help.
Best regards,
Anna
2009 Feb 10 3:25 AM
2009 Feb 10 4:07 AM
Hi,
Use:
Read REPORT <Program> to ITAB.
LOOP AT itab INTO code_rec.
TRANSLATE code_rec TO UPPER CASE.
LOOP AT it_search INTO obj_text.
SEARCH code_rec FOR obj_text.
CHECK sy-subrc EQ 0.
WRITE:/, obj_text, code_rec.
ENDLOOP.
ENDLOOP.
This will give youe desired result...
Regadrs,
Gurpreet
2009 Feb 10 5:24 AM
Thank you all for the answers, it really help me a lot.
By the way, one of my members found a Class named CL_ABAP_COMPILER, which have a method that could get dependcies of the program.
Please try if you are interested.
Thank you all again.
Best regards,
Anna
Edited by: anna kong on Feb 10, 2009 6:25 AM