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

Former Member
0 Likes
510

Is there any function module that get the tables, structures, includes, function modules that used in the program you specified in the parameter at selection screen?

Does the function module `RS_TOOL_ACCESS` work that way or does this FM have different role?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
459

Hi Claire !

Try with SCAN instruction :


DATA : begin of t_code_prgm occurs 0,
            ligne(72) type c,
       end of t_code_prgm.

DATA  begin of t_tokens occurs 0.
        INCLUDE STRUCTURE STOKEN.
DATA  end of t_tokens.

DATA  begin of t_statements occurs 0.
        INCLUDE STRUCTURE SSTMNT.
DATA  end of t_statements.

DATA  begin of t_structures occurs 0.
        INCLUDE STRUCTURE SSTRUC.
DATA  end of t_structures.


Parameters : p_programme   like   sy-repid.


READ REPORT p_programme into t_code_prgm.
SCAN ABAP-SOURCE t_code_prgm  TOKENS into t_tokens
                          STRUCTURES into t_structures
                          STATEMENTS into t_statements.

TIPS:

t_structures-STMNT_FROM and t_structures-STMNT_TO is an interval matching with t_statements-number (or =index, it's the same)

t_statements-FROM and t_statements-TO is an interval matching with t_tokens index.

(Use F1 on 'SCAN' to find list of types in t_structures-TYPE and t_structures-STMNT_TYPE

example : TYPE R for "ROUTINE", STMNT_TYPE "O" for "FORM", STMNT_TYPE "M" for "MODULE" ...)

Stéphane.

Message was edited by:

Stéphane

4 REPLIES 4
Read only

andreas_mann3
Active Contributor
0 Likes
459

Hi,

RS_TOOL_ACCESS is to navigate to all types of WB-objects like tables and programs

you should look at F1 to abap command <b>scan</b>

A.

Read only

Former Member
0 Likes
459

Hi,

There is function module which will give you the info of all sub objects used in the program.

You have to search using the TADIR table for different objects and use

SCAN ABAP-SOURCE to find the routines etc.

The fun Module RS_TOOL_ACCESS will not used for the above purpose,

it is used to do the operations on that program like Delete, Copy, Edit program like that.

reward if useful

regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
0 Likes
460

Hi Claire !

Try with SCAN instruction :


DATA : begin of t_code_prgm occurs 0,
            ligne(72) type c,
       end of t_code_prgm.

DATA  begin of t_tokens occurs 0.
        INCLUDE STRUCTURE STOKEN.
DATA  end of t_tokens.

DATA  begin of t_statements occurs 0.
        INCLUDE STRUCTURE SSTMNT.
DATA  end of t_statements.

DATA  begin of t_structures occurs 0.
        INCLUDE STRUCTURE SSTRUC.
DATA  end of t_structures.


Parameters : p_programme   like   sy-repid.


READ REPORT p_programme into t_code_prgm.
SCAN ABAP-SOURCE t_code_prgm  TOKENS into t_tokens
                          STRUCTURES into t_structures
                          STATEMENTS into t_statements.

TIPS:

t_structures-STMNT_FROM and t_structures-STMNT_TO is an interval matching with t_statements-number (or =index, it's the same)

t_statements-FROM and t_statements-TO is an interval matching with t_tokens index.

(Use F1 on 'SCAN' to find list of types in t_structures-TYPE and t_structures-STMNT_TYPE

example : TYPE R for "ROUTINE", STMNT_TYPE "O" for "FORM", STMNT_TYPE "M" for "MODULE" ...)

Stéphane.

Message was edited by:

Stéphane

Read only

Former Member
0 Likes
459

use FM <b>GET_TABLES</b>, pass the program name u will get the tables used in that program