INV标准报表+INVARAAS.rdf -- ABC分配报表
INVARAAS.rdf -- ABC分配報表
? ?
? ?
? ?
? ?
? ?
? ?
? ?
? ?
+---------------------------------------------------------------------------+ 庫存管理系統: Version : 12.0.0? ?
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.? ?
INVARAAS module: ABC 分配報表 +---------------------------------------------------------------------------+? ?
當前的系統時間為 19-09-2012 14:56:58? ?
+---------------------------------------------------------------------------+? ?
? ?
+----------------------------- | 正在啟動并發執行程序... +-----------------------------? ?
變元 ------------ ORG_ID='207' GROUP_ID='229' P_SORT_ID='1' ------------? ?
APPLLCSP Environment Variable set to :? ?
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are : SIMPLIFIED CHINESE_AMERICA.AL32UTF8? ?
'.,'? ?
輸出口令:? ?
Report Builder: Release 10.1.2.3.0 - Production on 3 09 19 14:57:15 2012? ?
Copyright (c) 1982, 2005, Oracle. All rights reserved.? ?
? ?
+---------------------------------------------------------------------------+ FND_FILE 中日志消息開始 +---------------------------------------------------------------------------+ +---------------------------------------------------------------------------+ FND_FILE 中日志消息結束 +---------------------------------------------------------------------------+? ?
? ?
+---------------------------------------------------------------------------+ 正在執行請求完成選項...? ?
+------------- 1) PRINT -------------+? ?
? ?
正在打印輸出文件。 請求編號 : 5806896 ???? 份數 : 0 ???? 打印機 : noprint? ?
+--------------------------------------+? ?
? ?
已完成執行請求完成選項。? ?
+---------------------------------------------------------------------------+ 已成功完成并發請求 當前的系統時間為 19-09-2012 14:57:21? ?
+---------------------------------------------------------------------------+? ?
? ?
? ?
? ?
? ?
? ?
?
? ?
--Q_Org
--mtl_abc_assignment_groups
--計算項目ABC碼用的。用來分類物料,用來庫存盤點用
--這個表是ABC組,每個組中可以定義幾個ABC分類,
--通過某種規則計算項目在這個組中屬于那一個類,比如A、B、C、D、E等(自定義)。
? ?
SELECT org.organization_name,
gsob.currency_code,
cur.precision std_precision,
NVL (cur.extended_precision, cur.precision) ext_precision
FROM org_organization_definitions org, --組織單位表
gl_sets_of_books gsob, --帳簿表
mtl_abc_assignment_groups abc, --ABC分類
fnd_currencies cur -- 幣種表
WHERE 1 = 1
AND org.organization_id = abc.organization_id
AND org.set_of_books_id = gsob.set_of_books_id
AND abc.assignment_group_id = 229 --:GROUP_ID
AND abc.organization_id = 207 --:ORG_ID
AND gsob.currency_code = cur.currency_code(+)
? ?
? ?
FUNCTION C_FormattedCurrencyCodeFormula
RETURN VARCHAR2
IS
BEGIN
DECLARE
temp_c VARCHAR2 (20);
BEGIN
temp_c := '(' || :Currency_Code || ')';
RETURN (temp_c);
END;
? ?
RETURN NULL;
END;
? ?
? ?
--==================================================================
? ?
--Q_Groupname
? ?
SELECT assignment_group_name
FROM mtl_abc_assignment_groups abc
WHERE abc.assignment_group_id = 229 --:GROUP_ID
AND abc.organization_id = 207 --:ORG_ID
? ?
--==================================================================
--Q_Abclevel
? ?
SELECT DECODE (abc.item_scope_type, 1, '', 2, abc.secondary_inventory) TheLevel
FROM mtl_abc_assignment_groups abc,
mfg_lookups mfg
WHERE 1 = 1
--AND abc.assignment_group_id = 229 --:GROUP_ID
--AND abc.organization_id = 207 --:ORG_ID
AND mfg.lookup_type = 'MTL_ABC_ITEM_SCOPE'
AND mfg.lookup_code = abc.item_scope_type
? ?
? ?
--==================================================================
--Q_CompileItem
? ?
? ?
SELECT sys.item_number,
sys.description,
clas.abc_class_name,
com.sequence_number,
ROUND (NVL (com.compile_quantity, 0), 2) compile_quantity,
ROUND (NVL (com.compile_value, 0), 2) compile_value1,
--ROUND (NVL (com.compile_quantity, 0), :p_qty_precision) compile_quantity,
--ROUND (NVL (com.compile_value, 0), :c_std_precision) compile_value1,
sys.primary_uom_code
FROM mtl_item_flexfields sys,
mtl_abc_classes clas,
mtl_abc_compiles com,
mtl_abc_assignment_groups ass,
mtl_abc_assignments abc
WHERE sys.organization_id = 207 --:org_id
AND clas.organization_id = 207 --:org_id
AND com.organization_id = 207 --:org_id
AND ass.organization_id = 207 --:org_id
AND ass.assignment_group_id = 229 --:group_id
AND ass.compile_id = com.compile_id
AND abc.inventory_item_id = sys.item_id
AND abc.assignment_group_id = 229 --:group_id
AND abc.abc_class_id = clas.abc_class_id
AND abc.inventory_item_id = com.inventory_item_id
UNION
SELECT sys.item_number,
sys.description,
clas.abc_class_name,
DECODE (1, 0, 0, NULL) sequence_number,
0 compile_quantity,
0 compile_value,
sys.primary_uom_code
FROM mtl_item_flexfields sys,
mtl_abc_classes clas,
mtl_abc_assignment_groups ass,
mtl_abc_assignments abc
WHERE sys.organization_id = 207 --:org_id
AND clas.organization_id = 207 --:org_id
AND ass.organization_id = 207 --:org_id
AND ass.assignment_group_id = 229 --:group_id
AND abc.inventory_item_id = sys.item_id
AND abc.assignment_group_id = 229 --:group_id
AND abc.abc_class_id = clas.abc_class_id
AND NOT EXISTS
(SELECT *
FROM mtl_abc_compiles com
WHERE abc.inventory_item_id = com.inventory_item_id
AND com.organization_id = 207 --:org_id
AND ass.compile_id = com.compile_id)
-- &C_ORDERBY
? ?
? ?
--==================================================================
? ?
FUNCTION c_fcompilevalueformula
RETURN VARCHAR2
IS
BEGIN
BEGIN
srw.reference (:compile_value1);
srw.reference (:s_currencycode);
srw.USER_EXIT ('FND FORMAT_CURRENCY CODE=":S_CurrencyCode" --USD
DISPLAY_WIDTH="16"
AMOUNT=":Compile_Value1"
DISPLAY=":C_FCompileValue"');
RETURN (:c_fcompilevalue);
EXCEPTION
WHEN srw.user_exit_failure
THEN
RETURN ('FC ERROR');
END;
? ?
RETURN NULL;
END;
--==================================================================
procedure get_precision (id in number) is
begin
srw.attr.mask := srw.formatmask_attr;
--Bug 1403394 Earlier Characters are hard coded now changed.
if id = 0 then srw.attr.formatmask := '-NNNGNNNGNNNGNN0';
else
if id = 1 then srw.attr.formatmask := '-NNNGNNNGNNNGNN0D0';
else
if id = 3 then srw.attr.formatmask := '-NNGNNNGNNNGNN0D000';
else
if id = 4 then srw.attr.formatmask := '-NGNNNGNNNGNN0D0000';
else
if id = 5 then srw.attr.formatmask := '-NNNGNNNGNN0D00000';
else
if id = 6 then srw.attr.formatmask := '-NNGNNNGNN0D000000';
else
if id = 7 then srw.attr.formatmask := '-NNNNNNNNNNN0';
else
if id = 8 then srw.attr.formatmask := '-NNNNNNNNNNN0D0';
else
if id = 9 then srw.attr.formatmask := '-NNNNNNNNNN0D00';
else
if id = 10 then srw.attr.formatmask := '-NNNNNNNNNN0D000';
else
if id = 11 then srw.attr.formatmask := '-NNNNNNNNN0D0000';
else
if id = 12 then srw.attr.formatmask := '-NNNNNNNN0D00000';
else
if id = 13 then srw.attr.formatmask := '-NNNNNNN0D000000';
else srw.attr.formatmask := '-NNNGNNNGNNNGNN0D00';
end if; end if; end if; end if; end if; end if;
end if; end if; end if; end if; end if; end if; end if;
srw.set_attr(0,srw.attr);
end;
轉載于:https://www.cnblogs.com/quanweiru/archive/2012/09/26/2704755.html
總結
以上是生活随笔為你收集整理的INV标准报表+INVARAAS.rdf -- ABC分配报表的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 20、磁贴和磁贴通知(tile)(上)
- 下一篇: JS正则表达式验证账号、手机号、电话和邮