无一揽子协议不允许下达采购订单

应用

Oracle   Purchasing

Level

Function

函数名

Funcgtion Name

PO_POXPOEPO

表单名

Form Name

POXPOEPO

说明

Description

无一揽子协议不允许下达采购订单

条件

Condition

触发器事件

Tirgger Event

WHEN-VALIDATE-RECORD

触发器对象

Tirgger Object

PO_LINES

条件

Condition

    not     exists

        (select 

             'X'   

        from po.po_headers_all        pha,

             po.po_lines_all          pla,

             po.po_line_locations_all pll,

             po.po_vendors            pv,

             po.po_vendor_sites_all   pvs,

             inv.mtl_system_items_b   msi

       where pha.po_header_id =   pla.po_header_id

             and pll.po_line_id(+) =   pla.po_line_id

             and pha.org_id = ***

             and pv.vendor_id = pha.vendor_id

             and pha.type_lookup_code = 'BLANKET'

             and nvl(pha.cancel_flag, 'N') =   'N'

             and nvl(pll.cancel_flag, 'N') =   'N'

             and nvl(pla.cancel_flag, 'N') =   'N'

             and nvl(pha.closed_code, 'OPEN')   = 'OPEN'

             and nvl(pla.closed_code, 'OPEN')   = 'OPEN'

             and nvl(pll.closed_code, 'OPEN')   = 'OPEN'

             and pvs.vendor_id = pv.vendor_id

             and pha.authorization_status =   'APPROVED'

             and pvs.vendor_site_id =   pha.vendor_site_id

             and pvs.org_id = pha.org_id

             and (trunc(pll.end_date) >=   trunc(sysdate) or pll.end_date is null)

             and msi.inventory_item_id =   pla.item_id

             and msi.organization_id = ***

             and msi.segment1 =:PO_LINES.ITEM_NUMBER

             and   pv.vendor_name=:PO_HEADERS.VENDOR_NAME

             and   pvs.vendor_site_code=:PO_HEADERS.VENDOR_SITE_CODE

             and pha.currency_code   =:PO_HEADERS.CURRENCY_CODE

             )  

  and :PO_HEADERS.DOC_TYPE_NAME = '标准采购订单'

  and :PO_HEADERS.VENDOR_NAME like 'R%临时%'

处理模式

Processing Mode

Not in   Enter-Query Mode

上下文 层/值

Contest   Level/Value

Responsibility/***职责

活动

Actions

序号

seq

特性

Type

说明

Description

语言

Language

消息类型

Message   Type

Error

10

Message

/

ALL

消息文本

Message   Type

无一揽子采购协议不允下达采购订单!

20

Builtin

/

ALL

内置类型

Builtin   Type

RAISE FORM_TIRGGER_FAILURE

处理模式

讯息提醒模式

作业

讯息型态:显示

讯息内容: 无一揽子采购协议不允下达采购订单!

posted on 2013-07-10 13:11  st.sun  阅读(264)  评论(0编辑  收藏  举报

导航