Find data sources in Oracle EBS environment (OAF articles)

It is more troublesome to find the background data source on the OAF page than in the Form, and at the same time, it cannot be located as accurately as in the Form, but it can also find most of the content.

This article describes how to use the diagnostic function provided by OAF to quickly find the database object corresponding to the OAF page:

  1. About this page (About this Page)
  2. SQL Trace function

1. Using the function of about this page (About this Page)

Premise: Set prefabricated files in the user layer: Personalize Self-Service Defn value is Yes to start the personalized mode

step:

  1. Click on the "About this Page" link in the lower left corner of the OAF page
  2. Enter the About page, expand the page structure of the Page Definition part, the structure of the page will vary with the page definition
  3. Or select the View Object definition in the Business Component References Details section
  4. View the information in the View Object column, the view object referenced by the component will have a link, click the link directly to enter the view object page
  5. The SQL in the detailed information of the view object is the statement for creating the view object, and you can know the background data source corresponding to the page component by viewing it
  6. View the corresponding definition by selecting a different view object

Example (find the corresponding background database object in the PO Document Types page):

​​​​​​​

?[Copy to clipboard]View Code SQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

SELECT podocumenttypeseo.document_type_code,

       podocumenttypeseo.org_id,

       podocumenttypeseo.document_subtype,

       podocumenttypeseo.document_template_code,

       podocumenttypeseo.contract_template_code,

       xtv1.template_name AS document_types_layout,

       xtv2.template_name AS contract_terms_layout,

       plc1.displayed_field || ' ' || plc2.displayed_field AS TYPE,

       decode(podocumenttypeseo.document_type_code,

              'RFQ' ,

              decode(podocumenttypeseo.document_subtype,

                     'STANDARD',

                     'DeleteDisabled',

                     'CATALOG',

                     'DeleteDisabled',

                     'BID',

                     'DeleteDisabled',

                     'DeleteEnabled'),

              'QUOTATION',

              decode(podocumenttypeseo.document_subtype,

                     'STANDARD',

                     'DeleteDisabled',

                     'CATALOG',

                     'DeleteDisabled',

                     'BID',

                     'DeleteDisabled',

                     'DeleteEnabled'),

              'DeleteDisabled') AS delete_switcher,

       podocumenttypeseo.type_name

  FROM po_document_types_all_vl podocumenttypeseo,

       xdo_templates_vl xtv1 ,

       xdo_templates_vl         xtv2,

       po_lookup_codes          plc1,

       po_lookup_codes          plc2

 WHERE xtv1.template_code(+) = podocumenttypeseo.document_template_code

   AND xtv2.template_code(+) = podocumenttypeseo.contract_template_code

   AND podocumenttypeseo.document_type_code = plc1.lookup_code

   AND plc1.lookup_type = 'DOCUMENT TYPE'

   AND podocumenttypeseo.document_subtype = plc2.lookup_code

   AND plc2.lookup_type = decode(podocumenttypeseo.document_type_code,

                                 'REQUISITION',

                                 'REQUISITION TYPE',

                                 'RFQ',

                                 'RFQ SUBTYPE',

                                 'QUOTATION',

                                 'QUOTATION SUBTYPE',

                                 'DOCUMENT SUBTYPE')

   AND podocumenttypeseo.org_id = :1

二、使用SQL Trace功能

只要发生数据库操作,都可以使用SQL Trace功能来跟踪数据库操作统计,OAF页面中也需要进行数据库的增删查操作,因此可以可以使用它来跟踪。

前提:在用户层设置预制文件:FND: Diagnostics 的值为Yes,进入诊断模式

步骤

  1. 选择Diagnostic为Set Trace Level,点击Go按钮
  2. 设置SQL Trace的级别
  3. 进入OAF页面中进行操作,并保证操作有查询、插入、更新或删除动作
  4. 操作完成后,再次进入关闭Trace模式,记录生成的Trace ID号码
  5. 以数据库操作系统用户,如ora02登陆数据库服务器
  6. 使用Tkprof工具格式化Trace结果文件输出
  7. 查看被格式化过的Trace文件
  8. 得出数据源

实例:

  1. 以系统管理员职责,在用户层设置预制文件:FND: Diagnostics 的值为Yes,进入诊断模式
    正在上传…重新上传取消
  2. 以预置文件设置的同一用户登录首页,在页面的顶部点击Global按钮 Diagnostics
    正在上传…重新上传取消
  3. 根据需要,选择Trace打头的几个选项来进入SQL Trace模式,点击Save按钮
    正在上传…重新上传取消
  4. 进入PO Document Types页面更新Forward Method后保存
    正在上传…重新上传取消
  5. 再次进入Diagnostics关闭Trace,记录下生成的最后一个Trace ID号码16456
    正在上传…重新上传取消
  6. 使用下面的SQL查询出trace文件的路径
    SELECT value
    FROM v$parameter
    WHERE name =
    ‘user_dump_dest’;
    VALUE
    ———————————————————————–
    /d02/db/tech_st/11.1.0/admin/VIS02_ebs006/diag/rdbms/vis02/VIS02/trace
  7. 以数据库操作系统用户(ora02)Telnet到数据库服务器,运行如下命令
    [ora02@ebs006 ~]$ cd /d02/db/tech_st/11.1.0/admin/VIS02_ebs006/diag/rdbms/vis02/VIS02/trace
    [ora02@ebs006 trace]$ ls -al *16456*
    -rw-r
    –r– 1 ora02 dba 116421 Aug 11 17:48 16456_234_1.output
    -rw-r–r– 1 ora02 dba 502101 Aug 11 17:35 VIS02_ora_16456_234.trc
    -rw-r–r– 1 ora02 dba 17288 Aug 11 17:35 VIS02_ora_16456_234.trm
    [ora02@ebs006 trace]$ tkprof VIS02_ora_16456_234.trc 16456_234_1.output
  8. 上面命令生成16456_234_1.output文件,从服务器下载文件后,找出文件中的UPDATE语句,其中对ICX类型的更新动作无需关注,16456_234_1.output文件样例
  9. 找到如下的UPDATE语句

?[Copy to clipboard]View Code SQL

1

2

3

4

5

6

7

8

UPDATE po_document_types_all_b podocumenttypeeo

   SET last_update_date     = :1,

       last_updated_by      = :2,

       forwarding_mode_code = :3,

       last_update_login    = :4

 WHERE org_id = :5

   AND document_type_code = :6

   AND document_subtype = :7

 

おすすめ

転載: blog.csdn.net/2301_76957510/article/details/129925122