注意 : 不是每個 Form 都可以修改 Default Where, 特別是有 Query Form 的, 它的 Where 組成是寫在按下 Button 時動態產生, 那 Personalize 寫的會被蓋掉而沒有產生效果
- Example Form : Receipt (RCVRCERC)
Type : Property
Object Type : Block
Target Object : RCV_TRANSACTION
Property Name : DEFAULT_WHERE
Value : NVL(RCV_ENTER_RECEIPTS_V.Outside_operation_flag,'N') = 'N'
- Jul 18 Fri 2008 09:00
Form Personalize - 客製 Default Where
- Jul 17 Thu 2008 09:00
Form Personalize - 客製 LOV
注意1 : 需確認標準 Form 所設定的 LOV Name 是什麼, 一般來說, 開 Form 起來看是最準的
注意2 : SQL 也最好是基於標準的 LOV SQL 下去改, 出錯的機率比較低
注意3 : 只能變動 LOV 的資料, 不能變動欄位順序或增減欄位
Example : Change Order Type LOV
Seq : 1
Type : Builtin
Builtin : Create Record Group from Query
Argument :
SELECT A.ORDER_TYPE_ID
, A.NAME
, A.DESCRIPTION
FROM OE_ORDER_TYPES_V A
WHERE TRUNC ( SYSDATE ) BETWEEN TRUNC ( A.START_DATE_ACTIVE ) AND NVL ( TRUNC ( A.END_DATE_ACTIVE ), TRUNC ( SYSDATE ))
AND A.ORDER_CATEGORY_CODE IN ( 'RETURN', 'MIXED' )
ORDER BY A.NAME
Group Name : U_ORDER_TYPE
Seq : 2
Type : Property
Object Type : LOV
Target Object : ORDER_TYPE
Property Name : GROUP_NAME
Value : U_ORDER_TYPE
- Jul 15 Tue 2008 23:54
Form Personalize - 掛載程式 (Menu)
- 設定 Menu
1. Condition:
Trigger Event : SPECIAL43 (數字自行選擇)
Actions:
Type : Builtin
Builtin Type : Launch a Function
Function Code : XXX (寫在 Application 註冊的Function Code)
Function Name : YYY (寫在 Application 註冊的Function Name)
Parameters : =' DELIVERY_ID = ' || ${item.dlvy.delivery_id.value} || ' ORGANIZATION_ID = ' || ${item.dlvy.organization_id.value} (寫該 Function 必須的參數值)
2. Condition:
Trigger Event : WHEN-NEW-FORM-INSTANCE
Actions:
Type : Menu
Menu Entry : SPECIAL43
Menu Label : ZZZ (在 Form 的選單呈現的字串)
Render line before menu : No (勾選的話, 這個 Menu 前面會有分隔線)
Enabled in Block(s) : DLVY
- Jul 15 Tue 2008 09:00
Form Personalize - Message
(Example Form : WSHFSTRX)
Type : Message
Message Type : Error
Message Value : ='Delivery# ' || ${item.dlvy.name.value}
* 可使用SQL字串相加的方式, 把 Form 上的變數傳進 Message 中, 讓 Message 的效果更好
* 若使用 Error Message, 順序在此之後的 Actions 不會被執行到, 要特別小心
Actual Example
- Delivery Group
因為標準的 Delivery Group Rule 只會考慮 Ship Information, 所以我們用了以下操作方式來做控制 :
1. 後端 Pick / Ship 人員只能看到 Firm 的 Delivery
2. 寫 Function 做其他條件的 Group
3. 在 OM User 要做 Firm 時做檢查
Condition :
Trigger Event : WHEN-NEW-RECORD-INSTANCE
Trigger Object : DLVY
Condition : :DLVY.STATUS_CODE='OP' AND :DLVY.PLANNED_FLAG='N' AND U_OM_COUNT_DELIVERY_DETAILS(:DLVY.NAME) > 1
Actions :
Seq : 1
Type : Property
Object Type : Item
Target Object : DLVY_BUTTONS.GO
Property Name : DISPLAYED (APPLICATIONS COVER)
Value : False
Seq : 2
Type : Message
Message Type : Error
Message Value : ='Delivery# ' || ${item.dlvy.name.value} || ' 不能被 Firm, 原因...........'
當然還有另外一段是做反向控制, 這在寫 Personalize 的時候也是一定要考慮到的, 也可以說是寫"還原動作"
- Jul 14 Mon 2008 20:51
Form Personalize - 控制 Item / Black
如前一篇所說, Actions 是整個 Personalize 的精華, 能夠做的事很多又雜, 目前用到的應該不到一半吧
也因為功能太多, 不知道該怎麼整理起, 所以改用範例做為主題, 只寫出 Actions 的部份, 這樣應該會比較清楚.........吧
- 欄位失效
(Example Form : OEXOEORD)
Type : Property
Object Type : Line
Target Object : LINE.ORDERED_QUANTITY
Property Name : ENABLED (APPLICATIONS COVER)
Value : FALSE
- 欄位不允許修改 (Example Form : OEXOEORD)
Type : Property
Object Type : Line
Target Object : LINE.ORDERED_QUANTITY
Property Name : UPDATE_ALLOWED
Value : FALSE
- 欄位不可見 (Example Form : OEXOEORD)
Type : Property
Object Type : Line
Target Object : LINE.ORDERED_QUANTITY
Property Name : DISPLAYED (APPLICATIONS COVER)
Value : FALSE
- 欄位變必填 (Example Form : OEXOEORD)
Type : Property
Object Type : Line
Target Object : LINE.ORDERED_QUANTITY
Property Name : REQUIRED (APPLICATIONS COVER)
Value : TRUE
- 修改欄位 Prompt (Example Form : OEXOEORD) => 部份 Form 可用 Folder 達成
Type : Property
Object Type : Line
Target Object : LINE.ORDERED_QUANTITY
Property Name : PROMPT_TEXT
Value : Qty
- Block 不可 Update (Example Form : OEXOEORD)
Type : Property
Object Type : Block
Target Object : ORDER
Property Name : UPDATE_ALLOWED
Value : FALSE
- Jul 08 Tue 2008 10:41
抓取正確的 Line Status
我一直以為在 OE_ORDER_LINES_ALL 中的 FLOW_STATUS_CODE 會等於 Form 上的 Status, 只不過一個是 Code, 一個是 Meaning, 但是, 很不巧的發現, Oracle 偷偷的留一手.....
當該 Line 已做了 Pick 時, Form 上雖然顯示 "Picked", 但在 Table 所記錄的 FLOW_STATUS_CODE 仍是 "AWAITING_SHIPPING", 不確定原因是啥, 不過 Oracle 在 Metalink 也都沒做任何的解釋, 其實就只是用了一個 Package 去做轉換的動作罷了
OE_LINE_STATUS_PUB.GET_LINE_STATUS ( LINE_ID, FLOW_STATUS_CODE)
- Jul 04 Fri 2008 09:30
Form Personalize - 簡介
在很多時候, Oracle 標準 Form 很難滿足我們的需要, 最常遇到的就是權限控制, 好比說 Receipt, 在同一個畫面可以收 PO, 也可以收 RMA, 如果對公司而言, 這兩種收料是分屬於不同的單位, 那一定要對標準 Receipt 畫面做客製.
當然, 你也可以客製 Oracle Form, 但是客製標準畫面還是最後的選擇, 這時候 Personalize 就是我們的好朋友
- 如何進入 Personalize 的編輯畫面
1. 開啟需要寫 Personalize 的 Form
2. 點選視窗上方的 Help > Diagnostics > Custom Code > Personalize
3. 輸入 Apps 的密碼
- 畫面解釋
*最上方
1. Function Name
2. Form Name
3. Debug Mode :
Off : 關閉 Debug Mode
Step-by-Step : 當所寫的 Custom Code 有問題, 可使用此模式偵錯
Show Debug Messages : 沒用過........
* 中間
1. Seq : 序號, 執行順序
2. Description : 寫給自己看的
3. Level :
Function : 只有在此 Function Name 生效
Form : 只是要這個 Form, 就算掛成不同的 Function 也會生效
4. Enabled : 生效與否
* 下方
1. Condition & Actions : 重點, 後面再說明
2. Context : 可設定要在什麼情況下生效
Industry / Site / Responsibility / User
- Condition
1. Trigger Event : 觸發的事件, 當什麼情況發生時, 會啟動該 Custom Code, 需配合下方的 Trigger Object
WHEN-NEW-FORM-INSTANCE : 當 Form 開啟時, 無需指定 Trigger Object
WHEN-NEW-BLOCK-INSTANCE : 當進入 Trigger Object 指定的 Block 時觸發
WHEN-NEW-RECORD-INSTANCE : 當進入 Trigger Object 指定的 Record 時觸發
WHEN-NEW-ITEM-INSTANCE : 當進入 Trigger Object 指定的 Item 時觸發
WHEN-VALIDATE-RECORD : 當 Trigger Object 指定的 Block 存檔時觸發
MENU1~15 : 進階應用
SPECIAL1~45 : 進階應用
* 雖然在畫面上 Oracle 有註明 : You can enter additional event name. 但是也不是說加就加, 目前只有試出 WHEN-BUTTON-PRESSED, 而且限制很多, 所以, 可能看看就好......
2. Trigger Object : 觸發的物件, 可直接用 LOV 挑選
3. Condition : 當 Event 與 Object 觸發到時, 還可以在 Condition 多做判斷, 內容只需填寫 SQL 語法 WHERE 之後的部份. 如果需要用到畫面的欄位, 可使用下方的 Insert Item Value (只能選 Value) 或 Insert 'Get' Expression (可選擇多種的屬性). Condition 裡也可套用 SQL Function, 例如 :
Z_OM_PKG.ZOMR001_OQC_PASS(:DLVY.NAME)=1 AND Z_OM_PKG.ZOMR001_TRACKINGINFO_PASS(:DLVY.NAME)=1
4. Processing Mode : Not in Enter-Query Mode / Only in Enter-Query Mode / Both
5. Context : 設定只在哪些 Level 下生效. Level 有 : Industry / Site / Responsibility / User
- Actions
精華就在此, 開另外一篇寫好了
- Jun 17 Tue 2008 10:12
Credit Exposure Bug
該死的 Oracle
最近公司內部稽核對於 Oracle 的 Credit Check Rule 做了檢查, 結果發現, Credit Exposure Report 的結果不等於實際上在 Credit Check Rule 中的設定, 更奇怪的問題是, 也不是全錯, 而是對錯各半.
後來針對這個"神奇"的現象去查才發現, 我們有針對特定的 Line Type, 利用 Defaulting Rule 去套用沒有 Credit Check 的 Payment Term, 以避免該 Line 被 Credit Hold.
在實做上 Oracle 也確實的有達到這個效果, 但是 Exposure Report 確沒有考慮到這個狀況, 而把這個 Line Type 的 Total Amount 算進去. 更嚴格的說, Oracle 是直接看 Order Amount 去計算, 沒有進到 Line 裡面仔細的計算. (Oracle Metalike Doc. 558473.1)
上週針對這個問題 Log TAR, 結果被印度人秒殺, 理由竟然是他們仍在處理中 (從 2004 年處理到現在?), 所以我今天 Log 了生平的第一個 Level 1
好吧, 看來小公司對於 Oracle 也沒什麼辦法, Oracle 不願意承認與處理這個問題, 那只好不用 Oracle 的 Credit Check, 自己客製吧.......
- May 20 Tue 2008 15:36
Credit Hold Comments Empty
Credit Hold 在 OM 大部份的情況都會是自動產生, 所以 Comments 可以讓我們了解它是為了什麼而被 Credit Hold, 例如, Over Credit, 有 Overdue 的 Invoice 等.
原本我一直以為 Hold Comments 是 "必定" 存在的, 結果也如往常, 並不是, 我是有發現一個例子 :
1. 先找一個已經 Over Credit Limit 的客戶
2. 產生一張有值訂單, 並且 Book Order
3. 因為該客戶 Credit 已經滿了, 所以 Booking 時會提醒你訂單將會被 Credit Hold
4. 使用 Additional Line Information 就可以看到 Credit Hold Comments
5. Release Credit Hold
6. 提高 Line Total and Save Order
7. 因為 Order Status = 'Booked', 所以系統只會給一個 MsgBox 告知會被 Credit Hold
"Some Lines are placed on credit check hold. Please see the Additional line information window for hold details"
8. 由上訊息可以知道, Oracle 也是請 User 使用 Additional Line Information 查詢 Hold 的原因, 但這時候可以發現, Hold Comments 並沒有值
我相信這個只是其中一個 Scenario, 所以我就 Log TAR.........
Oracle 的印度"朋友"給我一個蠻有趣的回應: 用 View Open Message (Process Messages) 去看, 但是我去看 Table, 這邊只會記錄 Open 的訊息, 如果該 Credit Hold 被 Release, Hold Comments 就會不見, 所以這個"建議"就被我否決了
(2008/07/01)
有 patch 囉....^O^
SOLUTION / ACTION PLAN
=======================
To implement the solution, please execute the following steps:
1. Download and review the readme and pre-requisites for Patch 6856362 , when released.
ETA for this patch is 31-July-2008
Beginning September 1, 2006, Order Management Suite Development is introducing the release of regular and scheduled rollup patches in a number of pro
duct areas.
You may refer Note 396910.1 -- Order Management Suite Patching Strategy For One-Off Requests and RUPs
2. Ensure that you have taken a backup of your system before applying
the recommended patch.
3. Apply the patch in a test environment.
4. Confirm the following file versions:
OEXVCRLB.pls 115.48.11510.18
You can use the commands like the following:
strings -a $ONT_TOP/patch/115/sql/OEXVCRLB.pls |grep '$Header'
5. Retest the issue.
6. Migrate the solution as appropriate to other environments.
- May 08 Thu 2008 14:22
清除 Oracle Mailer Queue
Subject: | How to purge e-mail notifications from the workflow queue so the e-mail is not sent | |||
Doc ID: | Note:372933.1 | Type: | HOWTO | |
Last Revision Date: | 03-JUL-2006 | Status: | PUBLISHED |
In this Document
Goal
Solution
Applies to:
Oracle Workflow Cartridge - Version: 11.5.10
Information in this document applies to any platform.
Goal
The Workflow mailer has not been running. There are a large number of e-mail notifications accumulating in the queue. How do we prevent these from being sent when the mailer is started.
Solution
Please take a backup before making any of these changes and try this on a Test instance first.
1. You need update the notifications you do not want sent, in the WF_NOTIFICATIONS table.
Check the WF_NOTIFICATIONS table. Records where status = 'OPEN' and mail_status = 'MAIL' are notifications
that will have an e-mail notification sent.
SQL> select notification_id, status, mail_status, begin_date
from WF_NOTIFICATIONS
where status = 'OPEN' and mail_status = 'MAIL';
This should show you which notifications are waiting to be e-mailed.
You can use the BEGIN_DATE column to help narrow down the ones you do not want sent, if you only want to stop the e-mails from a specific date range.
To update a notification so that it will not get e-mailed. Set the MAIL_STATUS = 'SENT'. The
mailer will think the e-mail has already been sent and it will not send it again.. (Users can
still reply to the notification from the worklist page in the applications).
e.g. SQL> update WF_NOTIFICATIONS set mail_status = 'SENT' where mail_status = 'MAIL';
This will update all notifications waiting to be sent by the mailer.
2. Then run the script wfntfqup.sql to purge the WF_NOTIFICATION_OUT queue and rebuild it with
data currently in the WF_NOTIFICATIONS table. This is what purges all notifications waiting in the queue to be sent.
It will then populate the queue with the current data in the wf_notifications table.
Since you have changed the mail_status = 'SENT" it will not enqueue
these messages again.. Only the ones where mail_status = 'MAIL' and status = 'OPEN' will be
placed in the WF_NOTIFICATION_OUT queue and sent by the mailer.
wfntfqup.sql是在 $FND_TOP/patch/115/sql 之下