首页 > 其他分享 >EBS: PO单据类型查询

EBS: PO单据类型查询

时间:2023-01-10 11:55:22浏览次数:38  
标签:WF code CODE pdt 单据 EBS document type PO

-- PO>>设置>>采购>>单据类型 ; 
SELECT pdt.document_type_code,
         pdt.org_id,
         pdt.document_subtype,
         pdt.document_template_code,
         pdt.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(pdt.document_type_code,
               'RFQ',
               decode(pdt.document_subtype,
                      'STANDARD',
                      'DeleteDisabled',
                      'CATALOG',
                      'DeleteDisabled',
                      'BID',
                      'DeleteDisabled',
                      'DeleteEnabled'),
               'QUOTATION',
               decode(pdt.document_subtype,
                      'STANDARD',
                      'DeleteDisabled',
                      'CATALOG',
                      'DeleteDisabled',
                      'BID',
                      'DeleteDisabled',
                      'DeleteEnabled'),
               'DeleteDisabled') AS delete_switcher,
        pdt.type_name,
      --  pdt.document_type_code, 
      -- pdt.document_subtype,
       pdt.type_name as "单据名",
       pdt.ARCHIVE_EXTERNAL_REVISION_CODE,
       pdt.CAN_PREPARER_APPROVE_FLAG AS "责任人可以审批",
       pdt.CAN_APPROVER_MODIFY_DOC_FLAG AS "责任人可以修改",
       DECODE(pdt.FORWARDING_MODE_CODE, 'HIERARCHY','层次结构','DIRECT','直接',pdt.FORWARDING_MODE_CODE)  AS "转发方式",
       pdt.CAN_CHANGE_FORWARD_FROM_FLAG AS "可以更改转发人" ,
       pdt.CAN_CHANGE_FORWARD_TO_FLAG AS "可以更改转发接收人",
       pdt.CAN_CHANGE_APPROVAL_PATH_FLAG AS "可以更改审批层次结构" ,
       pdt.QUOTATION_CLASS_CODE,
       pdt.DEFAULT_APPROVAL_PATH_ID AS "默认层次结构ID",
       (SELECT NAME FROM  PER_POSITION_STRUCTURES_V  PPS 
        WHERE PPS.position_structure_id =  pdt.DEFAULT_APPROVAL_PATH_ID
         AND ROWNUM= 1 ) AS "默认层次结构",
       pdt.SECURITY_LEVEL_CODE AS "安全级别",
       pdt.ACCESS_LEVEL_CODE AS "访问级别",
       pdt.DISABLED_FLAG,
       DECODE(pdt.WF_APPROVAL_ITEMTYPE,'REQAPPRV','申请',
        'POREQCHA','申请人更改订单审批',
        'PORPOCHA','申请人的PO更改审批',
        pdt.WF_APPROVAL_ITEMTYPE
        ) AS "审批工作流",
       DECODE(pdt.WF_APPROVAL_PROCESS,'MAIN_REQAPPRV_PROCESS','主要申请审批',pdt.WF_APPROVAL_PROCESS) AS "工作流启动流程",
       DECODE(pdt.WF_CREATEDOC_ITEMTYPE,'CREATEPO','PO 创建单据',pdt.WF_CREATEDOC_ITEMTYPE) AS "自动创建工作流",
       DECODE(pdt.WF_CREATEDOC_PROCESS,'OVERALL_AUTOCREATE_PROCESS','总体单据创建/启动审批',
       pdt.WF_CREATEDOC_PROCESS
       ) AS "自创工作流启动流程", --"自动创建工作流启动流程",
       pdt.AME_TRANSACTION_TYPE AS "审批事务处理类型",
       pdt.USE_CONTRACT_FOR_SOURCING_FLAG,
       pdt.INCLUDE_NONCATALOG_FLAG,
       pdt.DOCUMENT_TEMPLATE_CODE,
       pdt.CONTRACT_TEMPLATE_CODE,
      ( SELECT HOU.NAME FROM HR_ORGANIZATION_UNITS HOU WHERE ORGANIZATION_ID =  pdt.org_id ) AS "组织",
       pdt.last_update_date 
   FROM po_document_types_all_vl pdt,
        xdo_templates_vl         xtv1,
        xdo_templates_vl         xtv2,
        po_lookup_codes          plc1,
        po_lookup_codes          plc2
  WHERE xtv1.template_code(+) = pdt.document_template_code
    AND xtv2.template_code(+) = pdt.contract_template_code
    AND pdt.document_type_code = plc1.lookup_code
    AND plc1.lookup_type = 'DOCUMENT TYPE'
    AND pdt.document_subtype = plc2.lookup_code
    AND plc2.lookup_type = decode(pdt.document_type_code,
                                  'REQUISITION',
                                  'REQUISITION TYPE',
                                  'RFQ',
                                  'RFQ SUBTYPE',
                                  'QUOTATION',
                                  'QUOTATION SUBTYPE',
                                  'DOCUMENT SUBTYPE')
   -- AND pdt.org_id =281
 ORDER BY   pdt.org_id , pdt.last_update_date       

  

标签:WF,code,CODE,pdt,单据,EBS,document,type,PO
From: https://www.cnblogs.com/samrv/p/17039736.html

相关文章

  • DisposableBean接口
    1.作用:待补充…2.源码:packageorg.springframework.beans.factory;/***Interfacetobeimplementedbybeansthatwanttoreleaseresources*ondestruction.ABean......
  • apollo 系统出错,请重试或联系系统负责人
    本地测试apollo,使用官方QuickStart方式,启动Apollo配置中心后,访问http://localhost:8070/的portal页面,一直报错:系统出错,请重试或联系系统负责人官方解决方案是:如果提示系统......
  • @ComponentScan详解&@SpringBootApplication的scanBasePackages属性
    一、@ComponentScan源码@Retention(RetentionPolicy.RUNTIME)@Target({ElementType.TYPE})@Documented@Repeatable(ComponentScans.class)public@interfaceComponen......
  • 深入学习IO多路复用 select/poll/epoll 实现原理
    select/poll/epoll是Linux服务器提供的三种处理高并发网络请求的IO多路复用技术,是个老生常谈又不容易弄清楚其底层原理的知识点,本文打算深入学习下其实现机制。Li......
  • 深入学习IO多路复用 select/poll/epoll 实现原理
    select/poll/epoll是Linux服务器提供的三种处理高并发网络请求的IO多路复用技术,是个老生常谈又不容易弄清楚其底层原理的知识点,本文打算深入学习下其实现机制。Li......
  • 深入学习IO多路复用 select/poll/epoll 实现原理
    select/poll/epoll是Linux服务器提供的三种处理高并发网络请求的IO多路复用技术,是个老生常谈又不容易弄清楚其底层原理的知识点,本文打算深入学习下其实现机制。Li......
  • pushd 和 popd:对目录栈进行操作
    目录栈是保存目录的栈结构,当前目录处于该栈结构的顶端,可使用dirs查看目录栈的目录。pushd命令可添加一个目录到目录栈,popd命令会清除目录栈中的一个目录。dirsdirs有三......
  • POJ - 1321 棋盘问题
    POJ-1321棋盘问题题解:DFS搜索#include<bits/stdc++.h>#defineZeoystd::ios::sync_with_stdio(false),std::cin.tie(0),std::cout.tie(0)#defineall(x)(x).b......
  • DNS postfix and dovecot configuration
    KaliLinux----***DNS:1.installbind9apt-getinstallbind92.checkconfigifcannotstartnamednamed-checkconf--checkmainconfigfilenamed-checkzone-......
  • GET和POST的区别
    GET和POST是HTTP请求的两种基本方法,要说它们的区别,接触过WEB开发的人都能说出一二。最直观的区别就是GET把参数包含在URL中,POST通过requestbody传递参数。你可能自己写......