跳到主要內容

INV Interface Manager(Interface管理器)簡易說明

昨天遇到Transaction都Pending在WIP_COST_TXN_INTERFACE內,看同事處理才知道可能是INV Interface Manager的Cost Manager沒有跑,
雖然最後是使用者設定到一個參數,並不是Cost Manager有問題,
不過昨天找了一些資料,把它記錄下來。

INV Interface Manager:
  1、Cost Manager 處理表格WIP_COST_TXN_INTERFACE資料的管理器,
        如果狀態為Inactiove,可以手動執行Request:Cost Manager,
        這個Request比較特殊, Running時會查的到Request的記錄,
        但是事後就會查不到以往的記錄(EBS 11i)
  2、Lot Move Transaction 找到的資料提到可能是處理表格MTL_TRANSACTION_LOTS_INTERFACE,
         Request是 Manager: Lot Move Transactions
  3、Material Transaction 處理的表格是MTL_TRANSACTION_INTERFACE,
        Rquestdez是Manager: Process transaction interface
  4、MOVE TRANSACTION 處理的表格是WIP_MOVE_TXN_INTERFACE,
        Request是WIP Move Transaction Manager

這個INTERFACE MAMAGER 對應的manager Name是 Inventory Manager,
可以在System Administrator-->Manager-->Define中查詢裡面定義的程序的狀況。


可以從INV --> Setup -->Transactions --> Movement Statistics -->Interface Manager  





Metalink DOC:111729.1 對Interface Manager有詳細的介紹

This document was checked for relevance on 21-FEB-2005
PURPOSE
==============
This article provides technical overviews and details of the four
interface managers that can be controlled from the Interface Managers form. as
part of the setup procedures:

1. Material transaction manager
2. Demand reservation manager
3. Cost Manager
4. Move transaction manager


SCOPE & APPLICATION

This bulletin is intended for system administrators of Oracle
Applications and users that are involved with setting up Oracle Inventory 11.0.3 and higher.


RELATED DOCUMENTS
==================
Oracle Inventory User Guide - Transaction Setup


These four managers execute the following processes: material
transaction, demand reservation, resource & material cost transactions and move
transactions. Generally these managers are running continuously at regular
process intervals as determined on starting the managers.

They control the number of transaction workers, processing intervals and number of transactions
processed by the worker. The mode of operation for these managers is governed by the setting of
profile options prefixed by the letters TP (transaction processing).

o For example:

Setting profile TP:INV Transaction Processing Mode to a value of
Background Processing, will mean that Inventory and WIP transactions are
periodically transacted upon by the Material transaction manager. The transaction
manager requests will appear on the concurrent managers queue at regular
processing intervals.


Resolving Problems
------------------
As transactions are processed, the respective inventory and work in
progress tables are updated to reflect these changes. If for some reason the
results viewed in inquiry forms and reports do not reflect these updates, it
will then be necessary to review and correct the errors. This can be done in part
using the Transaction Interface & Pending Transations forms, however there are
often cases when sqlplus will be required to effect a resolution, in these
cases it may be helpful to refer to the notes below.


Material Transaction Interface
------------------------------

o INCTCM module: Process transactions interface

This program processes material transactions following changes in any of
the transactions form. For optimal processing speed the system manager
responsibility should be used to tune the Inventory Manager. The initial
setup for this is defaulted with a single target process setup.

The number of target processes will limit the number of workers
available to the transaction manager, workers can be run in parallel, therefore to
significantly reduce the time taken to process your inventory
transactions,then increase the number of target processes to the maximum allowable
within your system limits. For this request the assistance of your dba, system
memory and central processor performance will be the limiting factors for this
target parameter.

While running, the program: INCTCM, constantly checks for rows in the
interface and interface temporary tables. First checking the interfaces
temporary tables and acting upon these records and then processing the
records in the interface tables, marking these records with header identifiers
and subsequently moving them to the corresponding temporary tables, this
process is repeated each time the workers are started.

For example:
INCTCM polls and transacts upon records held in mtl_transactions_interface,
mtl_transaction_lots_interface,and mtl_serial_numbers_interface moving
these to their respective temp tables, eg: mtl_material_transactions_temp, these
are then processed by the transaction processor, such rows have their
lock_flag set to the value Y.

Different workers are submitted by the transaction processor to process
Order Entry, Work in Progress and Inventory transactions,these are processed
in groups, depending on the value of the flag validation_required,
values 1 or null = detailed validation 2=not detailed processed rows are
assigned a transaction_header_id using the sequence mtl_material_transactions_s.

o Records that are ready for selection will have:

transaction_mode=3, process_flag=1 or Y for mtl_material_transactions_temp table
lock_flag=2 or null(or N in mtl_material_transactions_temp)

process_flag has a range of values: 1=ready,2=not ready,3=failed
lock_flag has a range of values: 1=locked 2=not locked,NULL=not locked
transaction_mode has a range of values: 2=immediate mode 3=backgound mode


The rows in mtl_transactions_interface are processed in 5 phases.

1. Derives dependant columns, eg:acct_period_id, primary_quantity etc..
2. Detailed validation performed on the records
3. On hand qty check for negative qty's etc..
4. Reservations Relieved if demand was created in order entry
5. Rows are moved to mtl_material_transactions_temp where the
transaction processor is called to process these rows and update the inventory
levels etc..


For more details see vol 3 INV technical reference manual.


o Resolving Errors:

If an error occurs with the transaction processor, the entire group of
records will be marked with the error code, the actual failing row will contain
the error explanation.

You can access failing rows using Inventory's View Pending Interface
Activity form, additionally you can use this form. to resubmit the records by
setting the 'resubmit' flag to yes, this is only appropriate if the error that
caused the failure is unrelated to the interfaces transaction data, eg: database
space problem.

Errors can be determined by viewing columns: error_code and error_explanation
on table mtl_transactions_interface, once the cause has been corrected,
use sqlplus to update the process_fag = 1 and the lock_flag = 2 or null

During phases 1-3 above, rows are marked with an error code and explanation,
for phase 4 all records with this header_id will be marked as errored
regardless. For phase 5 all rows will be marked with the same error
except for the single bad row that caused the failure.


Demand Reservation Manager
--------------------------

o INCDCM module: Process demand interface

The Demand Reservation Manager periodically updates Inventory with the
demands from sales orders shipments.

INCDCM is linked into INVLIBR, the program processes records from
mtl_demand_interface to mtl_demand table. Records held in mtl_demand_interface
need to have process_flag=1 (ready), transaction_mode=3 and error_code =
null.

For more details on this program see page 3-812 vol 3 INV technical
reference manual.

o Resolving Errors:

Regardless of pass or failure, all records failing validation in the
interface table will be marked with an error code. Columns error_code and
err_explanation can be selected for explanation of the cause. A
succesful demand operation is denoted by error_code=0.

Full errors listings can be determined by selecting, lookup_code and
meaning from the table mfg_lookups
where lookup_type='MTL_DEMAND_INTERFACE_ERRORS'

For more details on the table mtl_demand_interface vol 1 Oracle
Inventory Technical Reference manual.


Material & Resource Cost transaction processor (Cost Manager)
-------------------------------------------------------------
The Cost Manager controls both the Material & Resource Cost Transaction
Processors. This manager starts the processors at the specified process
interval in the launch manager form, The Cost manager itself does not kick off a
concurrent request for each of the intervals, the manager only runs (goes from
pending to running then back to pending) once every 24 hours.

Material Cost Processor
-----------------------

o CMCMCW module: Material Cost Transaction Processor

This program is used to process material transactions for costing in
inventory and WIP products. This module scans table mtl_material_transactions
for uncosted transactions, ie:
where costed_flag='N'& transaction_group_id=NULL. For each transaction
found program; INLTCP is called to process the records.

Note:
If this program is not running then there will be no available
Transaction Distribution details in the Material Distributions inquiry form.

Records are inserted into mtl_transaction_accounts, for the account and
the value of the transactions.

For more details on this program see vol 3 Oracle Inventory Technical
Reference manual.

Resource Cost Processor
---------------------

o CMCCTM module: Resource cost transaction manager

The Resource cost transaction manager processes transactions from
Oracle's WIP in addition to those resource transactions imported from other sorces
such as barcode readers.

The program polls pending transactions in wip_cost_txn_interface and
periodically updates/inserts into the following WIP tables:
wip_transactions, wip_transaction_accounts and wip_period_balances

The program can be run from the command line: CMCCTM bom/bom passwd 0 Y

For more details on this program see Oracle WIP Technical Referance
manual.


WIP Move Transaction Manager
----------------------------

o WICTMS module:

The WIP Move Transaction Manager processes move transactions in Oracle
WIP and move transactions from devices such as bar code readers.

The table wip_move_txn_interface is polled by the program WICTMS to
determine if any transactions are pending validation and or processing.

留言

這個網誌中的熱門文章

Line如何換行

在電腦版的Line輸入文字時,遇到需要換行的情形時,我都是用記事本先寫好再複製上去,這樣就可以有換行的效果,可是這樣的做法好像失去Line的便利性。

於是查了一下,原來有一個設定可以指定Enter換行,而不是發訊息出去。



完成設定之後,要發送訊息就改用Alt+Enter,而Enter就可以換行了。

在Windows下,利用tasklist與taskkill來刪除Process

Windows7 / Windows8 kill process

Linux下要刪除某個程序通常會使用 ps 配合 kill 來刪除程序。
例如:ps -ef |grep [PROCESS NAME]
      kill -9 [PID]

在Windows下,通常是開啟工作管理員來強制結束應用程式,但是如果要寫成Script,就必須改為命令式。

TASKLIST [/S system [/U username [/P [password]]]]
         [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

TASKKILL [/S system [/U username [/P [password]]]]
         { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

(Tasklist:查詢Process ; Taskkill:刪除Process)


例如要刪除已開啟的記事本(notepad):

1、查詢記事本的Process訊息
    C:\> tasklist |find /i "notepad.exe"
    notepad.exe      6092 Console     1     5,832 K

2、由上得知記事本的PID為6092
    C:\> taskkill /f /PID 6092
    成功:處理程序 PID 6092 已經終止了。

    taskkill使用的參數
    /f:指定此參數可強制終止處理程序
    /PID:指定要終止之處理程序的 PID

3、也可以直接以程式名稱刪除
    C:\ taskkill /f /im notepad.exe
    成功:處理程序 "notepad.exe" <PID 6092> 已經終止了


下面是我自己測試的Script,可以刪除多個相同的程式,例如同時開啟了三個記事本:
@echo off

for /f "tokens=2 delims= " %%c in ('tasklist /FI "imagename eq notepad.exe" /FO table /NH&…

Shell Script簡易教學

一、概論
在許多的情況之下,我們都需要固定一組可以重覆或判斷資訊的指令,
而把這些指令存被在文字檔中,再交由Shell執行,就是Script。
一般會將Shell Script的副檔名命名為.sh,雖然副檔名在Linux中並非必要,
但是有副檔名可以讓我們更容易管理這些檔案。

假設有一個名為test.sh 的 Shell Script,首先用文字編輯器來撰寫內容如下:
#!/bin/bash
echo Hello World

第一行是必需的,它是用來定義你要使用的 shell。Linux中有許多的Shell可以使用,
如:ksh、bash,但是彼此之間語法有所差異,所以我們首先需要定義使用哪一個Shell。
而第二行的 echo 代表列出一個字串,預設會把後面的字串「Hello World」顯示在螢幕上。
將test.sh存檔後,可以用下列其中一種方式執行它:
1、直接輸入 sh test.sh
2、改變test.sh的權限,加上可以執行的權限,
   chmod a+x test.sh
   接著直接執行它:
   ./test.sh

在Shell Script中,「#」表示註解,在#後面將視為註解並且被程式忽略。
例如:
#pwd
ls -l
Shell只會執行ls -l,而不會執行ls -l

而「;」 則代表指令的分隔,例如:
pwd;ls -l

pwd
ls -l
都是一樣執行pwd及ls -l。

二、變數的使用
在Shell Script中,所有的變數都視為字串,因此不需要在定義變數類型。
在Shell中定義和使用變數時並不一樣。
例如,定義一個變數id並且設定值為2013001,接著還要將印出變數的值:
id=2013001 -> 定義變數時前面不加「$」符號
echo $id   -> 使用變數時前面要加「$」符號
注意,在等號的二邊不可以有空白,否則將出現錯誤。

再介紹一個範例:
dir=/home/oracle
ls $dir

這裡我們定義了變數dir的值為/home/oracle,接著用ls指令來印出變數dir,
此時指令會變為ls /home/oracle,所以就把目錄中所有檔案都列出來。


我們再來看一個例子,說明如何使用變數來定義變數:
$ tmppath=/tmp$ tmpfile=$tmppath/abc.txt$ ec…