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: 

RS_TOOL_ACCESS howto

Former Member
0 Kudos

Hi,

Does anyone know how to use RS_TOOL_ACCESS to build a where-used list ?

I know I have to use OPERATION = "CROSSREF", but I can't get it to work...

Thank you for your help,

Quentin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Examples how to use it

1)

nodetype = 'DM'.

call function 'RS_NAVIGATION_BREAK'.

call function 'RS_TOOL_ACCESS'

exporting

operation = 'CROSSREF'

object_name = rsd2x-mconame

object_type = nodetype

monitor_activation = 'X'

exceptions

others = 01.

2)

  • Display program source into ABAP Editor

check tag = 'X'.

clear tab_objlist. refresh tab_objlist.

tab_objlist-obj_name = sy-lisel+6(40).

tab_objlist-obj_type = 'P'.

tab_objlist-encl_obj = sy-lisel+6(40).

tab_objlist-position = '1'.

append tab_objlist.

call function 'RS_TOOL_ACCESS'

exporting

operation = 'SHOW'

monitor_activation = 'X'

tables

objlist = tab_objlist

exceptions

not_executed = 1

invalid_object_type = 2

others = 3.

Try this u will get some idea..........

7 REPLIES 7

Former Member
0 Kudos

Hello,

Examples how to use it

1)

nodetype = 'DM'.

call function 'RS_NAVIGATION_BREAK'.

call function 'RS_TOOL_ACCESS'

exporting

operation = 'CROSSREF'

object_name = rsd2x-mconame

object_type = nodetype

monitor_activation = 'X'

exceptions

others = 01.

2)

  • Display program source into ABAP Editor

check tag = 'X'.

clear tab_objlist. refresh tab_objlist.

tab_objlist-obj_name = sy-lisel+6(40).

tab_objlist-obj_type = 'P'.

tab_objlist-encl_obj = sy-lisel+6(40).

tab_objlist-position = '1'.

append tab_objlist.

call function 'RS_TOOL_ACCESS'

exporting

operation = 'SHOW'

monitor_activation = 'X'

tables

objlist = tab_objlist

exceptions

not_executed = 1

invalid_object_type = 2

others = 3.

Try this u will get some idea..........

Former Member
0 Kudos

Hi Santosh,

Thanks, I now undestand how work the CROSSREF operation.

But do you have any information about the object types?

I can't find anything about the values and their meaning.

I'd like to perform a search of a given object which can be a form, a ffunction module, a report.

And I'd like to search without restrictions, so with a scope to everywhere.

Do you know how to do this?

Thanks again,

Quentin

Former Member
0 Kudos

Hello,

Object_type is nothing but weather it is Program or Function module

CALL FUNCTION 'RS_TOOL_ACCESS'

EXPORTING

operation = 'SHOW'

object_name = v_tfpm042va-fname

object_type = 'FUNC'.

Example

object_type = 'FUNC'.

object_type = 'TABL'.

object_type = 'PROG'

CALL FUNCTION 'RS_TOOL_ACCESS'

EXPORTING

OPERATION = 'SHOW'

OBJECT_NAME = OBJECT_NAME

OBJECT_TYPE = 'PROG'

ENCLOSING_OBJECT = 'LXGDXUXX'

EXCEPTIONS

NOT_EXECUTED = 1

INVALID_OBJECT_TYPE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Former Member
0 Kudos

Hi,

Thanks for your precisions, but I still can't do what I want.

Now let's consider an example. I have a form (not a function nor a report, but a form) in a particular program.

What I want is to find where this particular form is used, in any function module or report.

How could I do that ?

Thanks

0 Kudos

I also would like to know how to do it.

I found this http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP%20program%20to%20read%20where-used%20lists but the program is missing some types...

so I don't know how to make it work..

If any expert can, please tell me

0 Kudos

Hi Quentin,

you won't find documentation anyway and you may ask yourself if it's worth the trouble. Take the example of the FORM. What you describe PERFORM ... IN PROGRAM is a rarely used static form of the call. You can run a scan (RPR_ABAP_SOURCE_SCAN) in background to find the calls. If the calls are done dynamically, you will never find anything.

I worked on a similar task to locate unused function modules (a useless task anyway - management requirement). What we finally did was creating a program that inserted a piece of code into every potentially unused function, inserted it into transport. The code would write a usage info into database. Then after a while, we could check if and where functions where used.

Nice programming playground but not of any practical relevance.

Be careful not to waste too much time on this.

Regards,

Clemens

Madhurivs23
Participant
0 Kudos

Hi Clemens,

Could you please let me know how you added the code in the ABAP code through this function module and take that change in one Transport request?

we need this for some functionality.

thanks

Madhuri