Oracle EBS - OM: 如何对销售定单行界面进行DataLoad,唯一性字段“Line”是非数据库字段,F11不可输入

本文介绍了销售订单行界面中唯一性字段“Line”的构成原理及其在数据库中的实现方式。Line由五个字段拼接而成,并提供了具体的Form源代码示例及查询语句。

销售定单行界面的唯一性字段“Line”是非数据库字段,F11不可输入

假如我们要在销售定单行界面DataLoad(修改字段),那么如何对销售定单行界面把你所需要的订单行找出来呢?

 

解决方法:

Line字段是有5个字段拼接起来的

Line := line_number || '.' || shipment_number || '.' || option_number || '.' || component_number || '.' ||service_number;

 

当然上面一些字段默认是Hide的,要把它们Show出来。

 

Form源代码关于如何拼接Line字段:

(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';


 


 

 

数据驱动的两阶段分布鲁棒(1-范数和∞-范数约束)的电热综合能源系统研究(Matlab代码实现)内容概要:本文围绕“数据驱动的两阶段分布鲁棒(1-范数和∞-范数约束)的电热综合能源系统研究”展开,提出了一种结合数据驱动与分布鲁棒优化方法的建模框架,用于解决电热综合能源系统在不确定性环境下的优化调度问题。研究采用两阶段优化结构,第一阶段进预决策,第二阶段根据实际场景进调整,通过引入1-范数和∞-范数约束来构建不确定集,有效刻画风电、负荷等不确定性变量的波动特性,提升模型的鲁棒性和实用性。文中提供了完整的Matlab代码实现,便于读者复现和验证算法性能,并结合具体案例分析了不同约束条件下系统运的经济性与可靠性。; 适合人群:具备一定电力系统、优化理论和Matlab编程基础的研究生、科研人员及工程技术人员,尤其适合从事综合能源系统、鲁棒优化、不确定性建模等相关领域研究的专业人士。; 使用场景及目标:①掌握数据驱动的分布鲁棒优化方法在综合能源系统中的应用;②理解1-范数和∞-范数在构建不确定集中的作用与差异;③学习两阶段鲁棒优化模型的建模思路与Matlab实现技巧,用于科研复现、论文写作或工程项目建模。; 阅读建议:建议读者结合提供的Matlab代码逐段理解算法实现细节,重点关注不确定集构建、两阶段模型结构设计及求解器调用方式,同时可尝试更换数据或调整约束参数以加深对模型鲁棒性的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值