首页 > 其他分享 >BOM展开函数

BOM展开函数

时间:2024-03-19 09:37:35浏览次数:222  
标签:函数 grp -- number 展开 session bom id BOM

--erp系统里的bom展开函数:

declare

l_grp_id number;
l_session_id number;
l_org_id number;
l_levels_to_explode number := 10;
l_module number default 2; -- bom = 2
l_cst_type_id number default - 1; -- all cost = -1 else 0
l_item_id number;
l_bom_or_eng number;
l_using_req_quantity number;
l_using_ass_dem_date date;
l_rev_date varchar2(20) := to_char(bom_dt, 'DD-MON-YY HH24:MI');
l_err_msg varchar2(250);
l_error_code number;

begin
-- 首先要有一个group id
select bom_explosion_temp_s.nextval into l_grp_id from dual;

-- 其次要得到一个session id
select bom_explosion_temp_session_s.nextval into l_session_id from dual;

bompexpl.exploder_userexit(verify_flag => 0,
org_id => l_org_id,
order_by => 1,
grp_id => l_grp_id,
session_id => l_session_id,
levels_to_explode => l_levels_to_explode,
bom_or_eng => l_bom_or_eng,
impl_flag => 1,
plan_factor_flag => 2,
explode_option => 2, -- 2,
module => l_module,
cst_type_id => l_cst_type_id,
std_comp_flag => 2,
expl_qty => 1,
item_id => l_item_id,
alt_desg => '',
comp_code => '',
rev_date => l_rev_date,
err_msg => l_err_msg,
error_code => l_error_code);

end;

/*运行结束后用以下语句得到结果
select * from bom_explosion_temp bet
where bet.group_id = l_grp_id*/

标签:函数,grp,--,number,展开,session,bom,id,BOM
From: https://www.cnblogs.com/ivenlin/p/18082032

相关文章

  • 模板函数和模板类
    模板函数的小小的案例环境:vscodeT_Case.h//需求:定义一个模板函数,实现对一个数组中对元素进行升序排序#include<iostream>usingnamespacestd;template<typenameT>voidmySort(Tarray[],intlen){for(intindex=0;index<len-1;index++){......
  • 标准API展开BOM代码
    --BOM_EXPLOSION_temp是一个临时表,在展BOM的时候,是一个很有用的表,存放了组成料件层次。默认时是没有记录的,加入下列的语句:DECLAREl_group_idNUMBER;l_error_messageVARCHAR2(1000);l_error_codeNUMBER;BEGINSELECTbom.bom_explosion_temp_s.NE......
  • 【20.4】Django框架Form组件之钩子函数(Hook)
    【一】什么是钩子函数在forms组件中钩子函数(Hooks)是用来在特定事件发生时执行自定义逻辑的函数。它们提供了一种创建交互性和动态行为的方式,并可以用于处理表单的各种状态和数据。【二】常见的钩子函数【1】onInputChange当输入框的值发生变化时触发。你可以通过这个......
  • 高等代数笔记:行列式按k行展开
    目录k阶子式及其余子式按k行(列)展开k阶子式及其余子式定义1n阶行列式|A|中任意取定k行、k列(1≤k<n),位于这些行和列的交叉处的\(k^2\)个元素按原来的排法组成的k阶行列式,称为|A|的一个k阶子式.选取|A|的第\(i_1,i_2,...,i_k\)行\((i_1<i_2<...<i_k)\),第\(j_1,j_2,...,j_k\)......
  • php事务删除加调用日志函数
    publicfunctionindex($id,$type,$data){$name='';$list='';if($type==1){$name='store';}elseif($type==2){$name='rider';......
  • 【SQL Server】超详细SQLServer日期转换、字符串、数学、聚合等常用函数大全(最新版)
    文章目录一、字符串函数1、获取uuid2、字符串截取3、字符串拼接4、字符串去空格5、大小写转换6、格式化数字为字符串7、字符串替换、转换8、查找与定位9、ISNULL判空取值二、日期时间函数1、获取当前日期和时间2、提取日期部分3、DATENAME(datepart,date_expr)函数,返......
  • C++看程序写结果:调用一次Line类构造函数,执行几次Point类复制构造函数?
    C++看程序写结果:调用一次Line类构造函数,执行几次Point类复制构造函数?#include<iostream>#include<cmath>usingnamespacestd;classPoint{//Point类定义public:Point(intxx=0,intyy=0){x=xx;y=yy;}Point(Point&p);......
  • JavaScript学习笔记4: 流程控制语句 ,函数
    流程控制语句与java基本一致的语法<script>vara=true;if(a){    //语句}else{    //语句}</script>函数函数定义方式1<script>functionadd(a,b){returna+b;}alert(add(1,2));//也可以用变量......
  • 已知有三盏灯,LED_1,LED_2,LED_3,每盏灯有两种状态LED_ON,LED_OFF,现有两个函数void init
      #include<stdio.h>#include<string.h>#include<stdlib.h>typedefenum  {    LED_1,    LED_2,    LED_3,  }LED;typedefenum{  LED_ON,  LED_OFF,}LED_CON;voidinit(LEDL){  switch(L)  { ......
  • Python 递归函数实现二分法,带思路解释
            二分法可以大大提升对有序数列的查找,传统的迭代查找会挨个比较数列中的值,如果数列较为庞大会影响查询效率。二分法每次取数列的中间数与待查找数字比较大小,以升序排列为例子 首先要考虑数列长度的奇偶性。        奇数取中间位置的数字,如果比待查找......