销售订单行上行号: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' ;

销售订单行上行号LINE_SHIPMENT_OPTION_NUMBER的更多相关文章

  1. 如何用代码填充S/4HANA销售订单行项目的数量字段

    我的任务是用代码生成S/4HANA销售订单(Sales Order)的行项目,并且填充对应的quantity(数量)值. 最开始我用了下面的代码,把quantity的值写入item字段target_q ...

  2. C4C销售订单行项目价格维护方法

    需求很简单,能够创建销售订单,在行项目里添加产品,带出价格来,同时把总价显示在销售订单抬头区域. 如下图所示: 下面是具体配置. Business Configuration里,点击Sales Ord ...

  3. 【ABAP系列】SAP 销售订单的行项目里条件的增强

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP 销售订单的行项目里条件的 ...

  4. [SAP ABAP开发技术总结]SD销售订单定价过程

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  5. 如何用SAP Cloud for Customer的手机App创建销售订单

    第一次启动App,设置一个初始化的pin code: 输入C4C tenant的url,用户名和密码: 登录进系统后,找到Sales Order工作中心: 可以看到系统里很多已有的销售订单了.点击屏幕 ...

  6. 销售订单(SO)-API-创建销售订单

    创建销售订单API主要注意几点: 初始化环境变量:fnd_global.apps_initialize(); mo_global.init('ONT'); mo_global.set_policy_c ...

  7. 【SD系列】SAP 查看销售订单时,报了一个错误消息,“项目不符合计划行(程序错误)”

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[SD系列]SAP 查看销售订单时,报了一个错误 ...

  8. 【SD系列】SAP 创建销售订单-用外部给号的方法步骤

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[SD系列]SAP 创建销售订单-用外部给号的方 ...

  9. 为什么S/4HANA的销售订单创建会触发生产订单的创建

    调用S/4HANA销售订单创建函数SD_SALES_DOCU_MAINTAIN创建一个销售订单时,会触发生产订单的创建. 销售订单的每个行项目对应一个独立的生产订单,SD_SALES_DOCU_MAI ...

随机推荐

  1. Leetcode 225 Implement Stack using Queues

    Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. po ...

  2. lego blocks

    1.题目描述 https://www.hackerrank.com/challenges/lego-blocks 2.解法分析 这题乍看一下觉得应该可以用动态规划来做,但是却死活想不到最优子结构,在网 ...

  3. dom div重合提示

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  4. LINQ标准查询操作符(五)

    十二.相等操作符 如果两个序列的对应元素相等且这两个序列具有相同数量的元素,则视这两个序列相等. SequenceEqual方法通过并行地枚举两个数据源并比较相应元素来判断两个序列是否相等.如果两个序 ...

  5. HDU 2100 分类: ACM 2015-06-17 23:49 15人阅读 评论(0) 收藏

    Lovekey Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...

  6. HDU 2516 取石子游戏(FIB博弈)

    取石子游戏 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  7. 在Ribbon中,中文换行位置不对怎么办

    在Ribbon代码的编写时,关于UI上面设置Button的中文字,经常会出现不想换行的地方换行的情况,比如下图: 我如果希望中国一行,然后只有一行怎么办呢. 网上流传的很多方法就是直接加空格,但是很遗 ...

  8. 使用struts2实现文件下载

    <action name="downloadAction" class=""> <result type="stream" ...

  9. OC: 类的扩展、类的延展、协议、 NSDate

      NSDateFormatter 指定⽇日期格式: NSDateFormatter * formatter = [[NSDateFormatter alloc] init]; [formatter ...

  10. C# try catch finally 执行

    try { //dosomething eg: int a = 1; int b = 2; int c = a + b; if(c>2) { return; } } catch(Exceptio ...