How to find where settype DB table COMM_PRMAT is accessed without debugging

简介: How to find where settype DB table COMM_PRMAT is accessed without debugging

We know settype table COMM_PRMAT is used to store attribute data modelled in product settype COMM_PR_MAT. In this table, there is one field FRG_GUID.

I would like to figure out how this field is used in ABAP code when this table is accessed.


image.png


How to find the ABAP code where this table is read with FRG_GUID in a most efficient way?

Approach1:

Write a utility method to read sales data via function module CRM_PRODUCT_SALES_READ_API:


image.png


Write a simple report to consume this method:


image.png


Use tcode SAT, click execute button:


image.png


Once done, expand trace data:


image.png


Click DB tables, all accessed database tables are listed in this tab. Choose “Position in the Hit List Tool” from context menu:

image.png



Double click statement:


image.png


Then it automatically navigates to the code position where this table is accessed.

Set a breakpoint:


image.png


Then confirm it in the runtime via debugging. Now we can also know the reason why this code place could not be found in where used list on table COMM_PRMAT : it is accessed dynamically via SELECT SINGLE * FROM (gc_set_table).


Approach2: run the report under ST05, and click button highlighted below, it can bring you to code where this table is accessed as well.

image.png

相关文章
|
9月前
|
关系型数据库 MySQL 数据库
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
140 0
delete in ST05 trace - deletion will also lead to many DB access first
delete in ST05 trace - deletion will also lead to many DB access first
102 0
delete in ST05 trace - deletion will also lead to many DB access first
|
SQL 数据库
Database specific hint in One order search
Database specific hint in One order search
111 0
Database specific hint in One order search
UDO report generate DDIC table
UDO report generate DDIC table
118 0
UDO report generate DDIC table
|
Oracle 关系型数据库
Mandatory Patching Requirement for Database Versions 11.2.0.3 or Earlier, Using DB Links (DOC ID 2335265.1)
Mandatory Patching Requirement for Database Versions 11.2.0.3 or Earlier, Using DB Links (DOC ID 2335265.
2770 0