‎2008 Nov 14 9:15 AM
Is there any function module which would return all the includes name in the submitted program?
‎2008 Nov 14 9:21 AM
Hi Priya,
Use RS_GET_ALL_INCLUDES for your requirement.
Hope this will help.
Regards,
Nitin.
‎2008 Nov 14 9:55 AM
>
> Is there any function module which would return all the includes name in the submitted program?
Hi Priya,
Nitin is correct but the function module "RS_GET_ALL_INCLUDES", doen't inform the level of the INCLUDE. That means if you have a Report R1, which contains INCLUDE I1 and INCLUDE I2 and I1 inturn contains I11, then the Function Module will return:-
R1
I1
I11
I2
But it won't tell the level. If you need to know the level you can use the followinng code. In the following code the table ITAB2 also has the Depth, Level and Include Name information.
DATA prog TYPE c LENGTH 30.
DATA: itab TYPE TABLE OF string,
itab2 TYPE TABLE OF slevel,
itab3 TYPE TABLE OF stoken,
itab4 TYPE TABLE OF sstmnt.
prog = 'RSTXR3TR'.
READ REPORT prog INTO itab.
SCAN ABAP-SOURCE itab LEVELS INTO itab2
WITH INCLUDES
TOKENS INTO itab3
STATEMENTS INTO itab4.Many Regards,
Ravi.
‎2008 Nov 14 11:19 AM