zoukankan      html  css  js  c++  java
  • 销售订单行上行号LINE_SHIPMENT_OPTION_NUMBER

    
    销售订单行上行号:LINE_SHIPMENT_OPTION_NUMBER
    取值:

     1
    Line块的块级触发器POST-QUERY调用:
    OE_LINE.Post_Query;(来自于库OEXOELIN)


     2)
    库OEXOELIN里Line_Shipment_Option_Number赋值代码:
        OE_CONCAT_VALUES.LINE_SHIPMENT_OPTION
                                            (
                                             Name_in('Line.Line_Number' ),
                                             Name_In('Line.Shipment_Number' ),
                                             Name_In('Line.Option_Number' ),
                                             x_concat_values,
                                             Name_In('Line.Component_Number' ),
                                             Name_In('Line.Service_Number' )
                                             );

        COPY(x_concat_values, 'Line.Line_Shipment_Option_Number' );
       
       
    ( 3)
    OE_CONCAT_VALUES包代码:
    PACKAGE BODY oe_concat_values IS
      PROCEDURE line_shipment_option(line_number      IN NUMBER ,
                                     shipment_number  IN NUMBER ,
                                     option_number    IN NUMBER ,
                                     p_concat_value   OUT VARCHAR2 ,
                                     component_number IN NUMBER DEFAULT NULL ,
                                     service_number   IN NUMBER DEFAULT NULL ) IS
      BEGIN
     
        --=========================================
        -- Added for identifying Service Lines
        --=========================================
        IF service_number IS NOT NULL THEN
          IF option_number IS NOT NULL THEN
            IF component_number IS NOT NULL THEN
              p_concat_value := line_number || '.' || shipment_number || '.' ||
                                option_number || '.' || component_number || '.' ||
                                service_number;
            ELSE
              p_concat_value := line_number || '.' || shipment_number || '.' ||
                                option_number || '..' || service_number;
            END IF ;
        
            --- if a option is not attached
          ELSE
            IF component_number IS NOT NULL THEN
              p_concat_value := line_number || '.' || shipment_number || '..' ||
                                component_number || '.' || service_number;
            ELSE
              p_concat_value := line_number || '.' || shipment_number || '...' ||
                                service_number;
            END IF ;
        
          END IF ; /* if option number is not null */
      
          -- if the service number is null
        ELSE
          IF option_number IS NOT NULL THEN
            IF component_number IS NOT NULL THEN
              p_concat_value := line_number || '.' || shipment_number || '.' ||
                                option_number || '.' || component_number;
            ELSE
              p_concat_value := line_number || '.' || shipment_number || '.' ||
                                option_number;
            END IF ;
        
            --- if a option is not attached
          ELSE
            IF component_number IS NOT NULL THEN
              p_concat_value := line_number || '.' || shipment_number || '..' ||
                                component_number;
            ELSE
              /*Bug2848734 - Added IF condition */
              IF (line_number IS NULL AND shipment_number IS NULL) THEN
                p_concat_value := NULL ;
              ELSE
                p_concat_value := line_number || '.' || shipment_number;
              END IF ;
            END IF ;
        
          END IF ; /* if option number is not null */
      
        END IF ; /* if service number is not null */
     
      END line_shipment_option;

    END oe_concat_values;


    SELECT ool.line_id
          ,to_char(ool.line_number) ||
           decode (ool.shipment_number,
                  NULL ,
                  NULL ,
                  '.' || to_char(ool.shipment_number)) ||
           decode (ool.option_number,
                  NULL ,
                  NULL ,
                  '.' || to_char(ool.option_number)) ||
           decode (ool.component_number,
                  NULL ,
                  NULL ,
                  decode (ool.option_number, NULL , '.', NULL ) || '.' ||
                  to_char(ool.component_number)) ||
           decode (ool.service_number,
                  NULL ,
                  NULL ,
                  decode (ool.component_number, NULL , '.', NULL ) ||
                  decode (ool.option_number, NULL , '.', NULL ) || '.' ||
                  to_char(ool.service_number)) line_num
          ,msi.segment1 item_number
          ,ool.ordered_quantity
      FROM oe_order_lines_all ool, mtl_system_items msi
    WHERE ool.header_id = &header_id
       AND ool.ship_from_org_id = msi.organization_id(+)
       AND ool.inventory_item_id = msi.inventory_item_id(+)
       AND ool.item_type_code <> 'INCLUDED' ;
  • 相关阅读:
    【转】awk用法介绍
    【转】Shell执行MySql操作
    curl访问nagios中Host Status Details For All Host Groups页面的方法
    【转】命令行浏览器 curl 命令详解,Linux中访问url地址
    【转】DELL R710服务器可以安装的VMWare ESX Server 4.1 全套下载带注册码
    【转】一些常用的Vi命令,可帮助脱离鼠标
    乐观处世,诚实做人,不骄不躁,积极进取; 勇于创新,踏实实现,谨慎规划,付诸实践; 事在人为
    【转】Linux方向职业分析
    【转】[Asp.net]常见数据导入Excel,Excel数据导入数据库解决方案,总有一款适合你!
    【转】Nagios安装部署与Cacti整合文档超精细版本
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/5356703.html
Copyright © 2011-2022 走看看