Application Development and Automation 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: 
Read only

Function module for includes

Former Member
0 Likes
475

Is there any function module which would return all the includes name in the submitted program?

3 REPLIES 3
Read only

Former Member
0 Likes
437

Hi Priya,

Use RS_GET_ALL_INCLUDES for your requirement.

Hope this will help.

Regards,

Nitin.

Read only

raviprakash
Product and Topic Expert
Product and Topic Expert
0 Likes
437

>

> 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.

Read only

Former Member
0 Likes
437

hi,

try this FM...


GET_INCLUDES

Arunima