EBS:訂單事務型別查詢之流程分配

samrv發表於2024-08-07

EBS R12訂單型別的流程名稱 查詢

SELECT OTTT.transaction_type_id,
       ottt.language, 
       ottt.name as transaction_type_name,
       ottt.description as LINE_transaction_desc, 
       WF.ASSIGNMENT_ID AS "分配ID",
       OTTL.TRANSACTION_TYPE_ID AS LINE_TYPE_ID,
       ottL.name as "工作流行型別",
       --ottL.description as LINE_transaction_desc, 
       WF.PROCESS_NAME AS "流程名稱CODE",
       WA.DISPLAY_NAME AS "流程名稱",
       WF.START_DATE_ACTIVE AS "開始日期",
       WF.END_DATE_ACTIVE AS "結束日期",
       WF.LAST_UPDATE_DATE AS "更新日期"
      -- ,WF.* 
  FROM
       ONT.oe_workflow_assignments wf,  -- 訂單型別分配 
       ONT.OE_TRANSACTION_TYPES_TL OTTT,
       ONT.oe_transaction_types_all ott,
       ONT.OE_TRANSACTION_TYPES_TL OTTL, -- 訂單行型別
       (  SELECT wav.display_name,
                 wav.description,
                 wav.item_type,
                 wav.name,
                 MAX (wav.version)
            FROM apps.wf_activities_vl wav
           WHERE     wav.TYPE = 'PROCESS'
                 AND NVL (wav.end_date, SYSDATE) >= SYSDATE
                 AND wav.item_type IN (  'OEOL', 'OEOH')
                 AND wav.runnable_flag = 'Y'
                 AND wav.name NOT LIKE 'UPG_%'
        GROUP BY wav.display_name,
                 wav.description,
                 wav.name,
                 wav.item_type
        ) WA -- 流程名稱
 WHERE WF.ORDER_TYPE_ID = OTT.TRANSACTION_TYPE_ID 
-- AND WF.ORDER_TYPE_ID = 1055 
 AND OTTT.TRANSACTION_TYPE_ID = OTT.TRANSACTION_TYPE_ID
 AND OTTT.LANGUAGE = USERENV('LANG') 
 AND WF.LINE_TYPE_ID = OTTL.TRANSACTION_TYPE_ID(+)
 AND OTTL.LANGUAGE(+) = USERENV('LANG') 
 AND WF.PROCESS_NAME = WA.NAME(+)
 AND OTTT.NAME LIKE '6%'
-- AND OTTL.NAME LIKE '僅發執行' --行流 - 通用;僅限於發運
 ORDER BY OTTT.NAME, OTTL.NAME ;

  

注意 APPS.WF_ACTIVITIES_VL.NAME

N: OM》》設定》》事務處理型別》》定義 。

相關文章