zoukankan      html  css  js  c++  java
  • PR物料KFF弹出LOV

    image

    image

    image

    image

    PROCEDURE event (event_name VARCHAR2)
    IS
    --
    -- This procedure allows you to execute your code at specific events
    -- including:
    --
    --    ZOOM
    --    WHEN-NEW-FORM-INSTANCE
    --    WHEN-NEW-BLOCK-INSTANCE
    --    WHEN-NEW-RECORD-INSTANCE
    --    WHEN-NEW-ITEM-INSTANCE
    --    WHEN-VALIDATE-RECORD
    --
    -- Additionally, product-specific events will be passed via this
    -- interface (see the Applications Technical Reference manuals for
    -- a list of events that are available).
    --
    -- By default this routine must perform 'null;'.
    --
    -- Oracle Corporation reserves the right to change the events
    -- available through this interface at any time.
    --
    /* Sample code:

      form_name      varchar2(30) := name_in('system.current_form');
      block_name     varchar2(30) := name_in('system.cursor_block');
      param_to_pass1 varchar2(255);
      param_to_pass2 varchar2(255);
    begin
      -- Zoom event opens a new session of a form and
      -- passes parameter values to the new session.  The parameters
      -- already exist in the form being opened.
      if (event_name = 'ZOOM') then
        if (form_name = 'DEMXXEOR' and block_name = 'ORDERS') then
          param_to_pass1 := name_in('ORDERS.order_id');
          param_to_pass2 := name_in('ORDERS.customer_name');
          fnd_function.execute(FUNCTION_NAME=>'DEM_DEMXXEOR',
                               OPEN_FLAG=>'Y',
                               SESSION_FLAG=>'Y',
                               OTHER_PARAMS=>'ORDER_ID="'||param_to_pass1||
                                 '" CUSTOMER_NAME="'||param_to_pass2||'"');
          -- all the extra single and double quotes account for
          -- any spaces that might be in the passed values
        end if;

      -- This is an example of a product-specific event.  Note that as
      -- of Prod 15, this event doesn't exist.
      elsif (event_name = 'OE_LINES_PRICING') then
        get_custom_pricing('ORDERS.item_id', 'ORDERS.price');

      -- This is an example of enforcing a company-specific business
      -- rule, in this case, that all vendor names must be uppercase.
      elsif (event_name = 'WHEN-VALIDATE-RECORD') then
        if (form_name = 'APXVENDR') then
          if (block_name = 'VENDOR') then
            copy(upper(name_in('VENDOR.NAME')), 'VENDOR.NAME');
          end if;
        end if;
      else
        null;
      end if;
    end event;
    */
    --
    -- Real code starts here
    --
    BEGIN
       IF     event_name = 'WHEN-NEW-ITEM-INSTANCE'
          AND NAME_IN ('system.cursor_item') = 'LINES.ITEM_NUMBER'
       THEN
          FND_KEY_FLEX.UPDATE_DEFINITION (
             BLOCK          => 'LINES',
             FIELD          => 'ITEM_NUMBER',
             WHERE_CLAUSE   => '1 = 1
             AND MTL_SYSTEM_ITEMS_VL.ENABLED_FLAG = ''Y''
             AND TO_DATE ( SYSDATE, ''YYYY/MM/DD HH24:MI:SS'') BETWEEN NVL (
                                                                     TRUNC (
                                                                        MTL_SYSTEM_ITEMS_VL.START_DATE_ACTIVE),
                                                                     TO_DATE (
                                                                        SYSDATE,
                                                                        ''YYYY/MM/DD HH24:MI:SS''))
                                                              AND NVL (
                                                                     TRUNC (
                                                                        MTL_SYSTEM_ITEMS_VL.END_DATE_ACTIVE),
                                                                     TO_DATE (
                                                                        SYSDATE,
                                                                        ''YYYY/MM/DD HH24:MI:SS''))
             AND MTL_SYSTEM_ITEMS_VL.SEGMENT1 LIKE :LINES.ITEM_NUMBER || ''%''
             AND MTL_SYSTEM_ITEMS_VL.ORGANIZATION_ID = (SELECT OD.ORGANIZATION_ID FROM ORG_ORGANIZATION_DEFINITIONS OD WHERE OD.ORGANIZATION_CODE <> ''MST'' AND OD.OPERATING_UNIT = :PO_REQ_HDR.ORG_ID)
             AND (    (   PURCHASING_ENABLED_FLAG = ''Y''
                       OR NVL (INTERNAL_ORDER_ENABLED_FLAG, ''N'') = ''Y'')
                  AND NVL (BOM_ITEM_TYPE, 0) NOT IN (1, 2)
                  AND NVL (OUTSIDE_OPERATION_FLAG, ''N'') =  ''N'')
             AND MTL_SYSTEM_ITEMS_VL.MRP_PLANNING_CODE = 7 ');
       END IF;
    END event;

    image

  • 相关阅读:
    [OrangePi] Installation on SD Card
    网线直连笔记本玩树莓派
    vim多行缩进的方法
    对linux的根目录执行强制递归移除
    windows下快速启动 nginx 和 php-cgi 的两个批处理
    windows下nginx和php环境的配置
    c语言对文件操作完成后尽量手动关闭
    [记录]使用openGL显示点云的一个程序
    linux中使用软链接时出现 too many levels of symbolic links
    使用 nano 的时候提示找不到 libncursesw.so.5 这个共享库
  • 原文地址:https://www.cnblogs.com/quanweiru/p/5291498.html
Copyright © 2011-2022 走看看