销售订单行上行号: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. ps 图片提取线稿方法2种 转

  2. 定制一个FlatBuffers编译器

    个人并不喜欢FlatBuffers编译器生成的代码,原因是我已经习惯了unix风格的代码. 不喜欢之处大致有以下: 1 命名法使用了Pascal命名法,而我个人习惯了小写字母加下划线式的unix式命名 ...

  3. Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

    mvn war:war命令出错: 原因: maven的web项目默认的webroot是在src\main\webapp.如果在此目录下找不到web.xml就抛出以上的异常. 解决方案: 在pom.xm ...

  4. 第三百四十天 how can I 坚持

    感觉还是要制定个计划,做不做不到是一回事,但是得制定.目标,一年时间进小米,加油,fordream 计划好好想想,技不在多,精就好. 晚上写了写杨辉三角,都不记得什么是杨辉三角了. 人言落日是天涯,望 ...

  5. 安装php5.5

    安装php5.5 ./configure --prefix=/usr/local/php5.5.14/ --with-apxs2=/usr/local/apache2.2.27/bin/apxs -- ...

  6. HDU 2544 最短路 http://acm.hdu.edu.cn/showproblem.php?pid=2544

    //代码: //方法1:Dijkstra's Algorithm #include<stdio.h> #include<math.h> #include<string.h ...

  7. javascript日期格式化方法汇总

    本文给大家汇总介绍了javascript格式化日期时间的几种常用方法,个人对最后一种个性化输出时间比较有兴趣,基本上只要项目中能用到都是使用这种,推荐给小伙伴们. 方法一: ? 1 2 3 4 5 6 ...

  8. 如何让ASP.NET网站站点不停止 永远持续运行

    转载自  http://www.cnblogs.com/insus/p/3658752.html 在公司内部服务器,运行很多网站(应用程序),但每个网站都有自动化或是定时执行的事务.后来经整合,所有这 ...

  9. windows server 2008 支持 .net framework 4.0

    windows server 2008平台下需要安装sp1,或打KB958854补丁,IIS7.0才能支持.net framework 4.0. 否则,IIS7.0中的应用程序虽然被配置为.net 4 ...

  10. C# 数据类型详解

    在asp.net中C#数据类型包括有值类型.简单类型.整型.布尔型.字符型.浮点型.结构类型等等,有需要学习的朋友可进入参考参考. 4.1 值类型 各种值类型总是含有相应该类型的一个值.C#迫使你初始 ...