顯示具有 Oracle ERP Flexfield 標籤的文章。 顯示所有文章
顯示具有 Oracle ERP Flexfield 標籤的文章。 顯示所有文章

Oracle ERP Flexfield 在 Form 執行階段的限制


目前在 Oracle ERP 中,

Form 在執行時, 會遇到幾個 Flexfield 的問題,

如下,

 問題 1
Flexfield 雖設定為 Required, 但在 Form 畫面上, 沒有點選 Flexfield, 則系統不會提示要輸入該欄位.

如: Master Item 控管 Product Line Category 必須輸入.

 問題 2
若有多個 Form 用到同一個 Flexfield, 該 Flexfield 無法對每一個 Form 設定不同狀態
(有的必須輸入, 有的只能 Read-Only).

如: BOM Inventory / ECN Inventory / WIP Material Requirement 用的 Flexfield 是同一個的.

透過 SQL 語法, 找出 Oracle ERP 有哪些客制的 Flexfield


你可以透過以下幾個 Table / View :
FND_DESCRIPTIVE_FLEXS_VL

FND_DESCR_FLEX_CONTEXTS_VL

FND_DESCR_FLEX_COL_USAGE_VL

然後透過下面語法, 找出 Oracle ERP 有哪些客制新增的 Flexfield :


Oracle ERP 由 "程式直接寫入" 的 Flexfield 值, 在 DB 查詢有值, 但在畫面的 Flexfield 上看不到值 ?


在 Oracle ERP 中,

程式直接將 Data 寫入到 Attribute 欄位中, 但是若 Attribute_Category 欄位沒有同時寫入資料值, 就會發生這種情形.

問題範例 and 解決方式, 如下 :

1) Attribute1 與 Attribute2 有值, 但 Attribute_Category 無值 :


2) 在開啟 Flexfield 輸入畫面時, 沒有顯示相關資料 :


3) 將 Attribute_Category 給予相關的設定值 :


4) 再開啟一次 Flexfield 輸入畫面時, 這時就可顯示相關資料了 :


Oracle ERP 為何在 Database 可以查詢的資料, 但在 Flexfield 的 LOV 資料中找不到 ?


在 Oracle ERP 中遇到此問題,

原因在於: Flexfield 彈性欄位對應的 "Value Set" 有設定 "Security".

下面介紹, 如何設定 Value Set 的 Security :

1) 在 Value Set 畫面中, 將 "Security Type" 設定從 "No Security" 修改為 "Hierarchical Security" 或 "Non-Hierarchical Security" :


2) 在 Responsibility > ValueSet > Define 畫面中, 即可設定 "該 ValueSet 允許哪些 Responsibility 看到哪些 LOV 資料".


找出該 Flexfield 對應的 Value Set, 設定其允許的資料範圍, 然後按 "Assign" 鈕來指定給哪些 Responsibility :


這就是將 Value Set 的 Security Rule 指定給哪些 Responsibility, 用來限定哪些 Responsibility 可以查看與輸入哪些資料 :


Oracle ERP Flexfield 在 Form 作業點選後, 沒有開啟 Flexfield 輸入視窗 ?


Flexfield 在 Form 作業點選後, 沒有開啟 Flexfield 輸入視窗,

可能有以下幾個原因 :

1) Flexfield 沒有設定 Segment 欄位 :


2) Flexfield 雖然有設定 Segment 欄位, 若有區分 Context Field Value 卻沒設定 Reference Field :


3) Flexfield 設定都正確, 但 "Flexfields:Open Descr Window" System Profile 設定為 No :


Oracle ERP Flexfield 設定作業中, 為何沒有顯示可以使用的彈性欄位


在 Oracle ERP 的 Flexfield 設定作業中,

若遇到 Table Structure 明明有某些彈性欄位,

但在設定時, 卻沒有看到這些欄位,

則解決步驟, 如下 :

1) 開啟 Application Developer > Flexfield > Key or Descriptive > Register 作業中, 進行註冊 :


2)可以利用 Title or Table Name 查詢出你要的彈性欄位 :


3) 將要開放的欄位, Enabled 勾選起來 :


如此, 你就可以在 Flexfield 設定作業中, 選擇所需的欄位當作彈性欄位了.

Oracle ERP 為何〔同一個作業〕, 看到的〔Flexfield 輸入畫面〕會不相同


若在某個作業中, 開啟的 Flexfield 輸入畫面中, 所包含的 Segment 不相同時,

原因在於: Flexfield 的 Context Field Value 判斷, 而開啟相對應的 Flexfield 輸入畫面 :


判斷根據, 如下 :

當 Table 的 Attribute_Category 欄位 "" 資料時, 則 Flexfield 的 Context Field Value 的判斷以 "Attribute_Category 欄位值" 為主.

當 Table 的 Attribute_Category 欄位 "" 資料時, 則 Flexfield 的 Context Field Value 的判斷以 "Flexfield 的 Reference Field" 為主.


Oracle ERP Table 中的 ATTRIBUTE_CATEGORY 欄位有何用處

其實, 這個欄位就是儲存 FlexfieldContext Field Value.

所以, 同一個 Table, 不同筆數的 Attribute_Category 的資料值可能會不相同.

看當時, 選擇 Flexfield 的時候, Flexfield 的 Context Field Value 資料值而定.

如下圖 :


Oracle ERP 如何註冊 User Define 的 Table, Column

利用 "ad_dd" Package, 可完成 Register Table and Column 的需求.

 註冊 Table 語法
ad_dd.register_table( P_APPL_SHORT_NAME => 'App_Short_Name'
, P_TAB_NAME => 'Table_Name'
, P_TAB_TYPE => 'T'
)

-- 若註冊成功, 則在 FND_TABLES 會有該 table 資料

 取消註冊 Table 語法
ad_dd.delete_table( P_APPL_SHORT_NAME => 'App_Short_Name'
, P_TAB_NAME => 'Table_Name'
)

 註冊 Column 語法
ad_dd.register_column( P_APPL_SHORT_NAME => 'App_Short_Name'
, P_TAB_NAME => 'Table_Name'
, P_COL_NAME => 'Column_Name'
, P_COL_SEQ => Num
, P_COL_TYPE => 'DATA_TYPE'
, P_COL_WIDTH => DATA_SIZE
, P_NULLABLE => 'Y / N'
, P_TRANSLATE => 'Y / N'
)

-- 若註冊成功, 則在 FND_COLUMNS 會有該 column 資料

 取消註冊 Column 語法
ad_dd.delete_column( P_APPL_SHORT_NAME => 'App_Short_Name'
, P_TAB_NAME => 'Table_Name'
, P_COL_NAME => 'Column_Name'
)

p.s. 最後一定要下 Commit, 才可註冊成功.

Oracle ERP Flexfield 如何在不同的需求 or 資料值, 使用相同 Segment, 但取回不同的資料


Oracle ERP 在 Flexfield 所指定的 Value Set 中, 在其 Where/Order By 欄位中,

可利用以下五種方式, 設定其取回條件 :

1) :Block.Field

2) :Parameter.Parameter_Name

3) :SYSTEM.System_Name

4) :$PROFILES$.Profile_Name

5) :$FLEX$.???

Where/Order By 欄位中, 一定要輸入 Where 此單字, 且不能有分號, 否則會有 Error.

Parameter 範例 :


Block.Item 範例 :


Oracle ERP 如何在不同的需求 or 資料值, 使用不同的 Flexfield Segment 架構 or 狀態


在 Descriptive Flexfield 主畫面中,

設定 Context Field 的 Reference Field 欄位輸入 :變數,

此值會對應到 Context Field ValuesCode 欄位.


:變數可利用以下五種方式, 設定在 Reference Field :
1) :Block.Item

2) :Parameter.Name

3) :SYSTEM.Name

4) :$PROFILES$.Name

5) :$FLEX$.???

如: Reference Field 欄位輸入 :$PROFILES$.ORG_ID 表示 ORG_ID, :Parameter.ORG_ID 表示 Organization ID

注意, 若 Reference Field 欄位沒有值, 則只會對應到 Global Data Elements 這個 Structure.

Oracle ERP Form 使用哪個 Descriptive Flexfield

此需求的做法, 參考步驟如下 :

步驟 1: 在目前的 Form 作業中, 開啟 Help / Diagnostics / Examine


步驟 2: 查看 $Descriptive_Flexfield$, 然後選擇其中一個 Field


步驟 3: 上步驟所得的值, 其解釋為 <Flexfield_Title> (<Application_Name>)


驗證結果:


APP-FND-01242 : Cannot read value from field ...

原因 : Value Set 中有設定的 Filed Item, 但是在 Form 中沒有該 Field Item, 導致讀不到該 Field Item 的資料值.

 方式 1
客制 Form, 新增缺少的 Block / Field Item 即可.

缺點 1 : 有使用此 Value Set 的 Form, 都要新增此 Block / Item, 若有 n 個 Form 有用到此 Flexfield, 就必須客制 n 個.

缺點 2 : 怕會有遺漏的 Form 也使用此 Flexfield, 而沒有客制到, 導致作業時會有此錯誤訊息.


 方式 2
將使用到此 Value Set 的 Flexfield 拉到畫面上, 然後, 此 Flexfield 不配置 Value Set, 不顯示此 Flexfield, 且改由 LOV 抓出資料.
(此做法 : 參考這裡)

優點 : 只需客制目前的 Form 即可.

在客制 Form 中, 將某彈性欄位移到畫面上, 為何彈性欄位值會儲存成 NULL

因為在系統上輸入 or 修改其他某一個彈性欄位的資料時, 系統會將所有彈性欄位的資料回寫一次.

也就是說, Flexfield 若是用程式直接寫入, 而沒有在系統上設定 Flexfield, 則其他彈性欄位輸入 or 修改時, 會被回寫成 null 值.

所以, 由程式直接寫入的 Flexfield 值, 也一定要在 Flexfield 畫面上設定, 且 Enabled 勾選;

若不想給 User 看到, 可以將 Displayed 設為 No 即可, 如下圖所示 :

Oracle ERP 的 Flexfield 彈性欄位 - 介紹

本文章投影片介紹 Oracle ERP Flexfield 彈性欄位的特性 :

投影片, 目前只限站長瀏覽, Sorry :


投影片內容 :

1.Flexfield 概觀

2.Key Flexfield 設定

3.Cross-Validation 設定

4.Shorthand Aliases 設定

5.Value Set 設定
Related Posts Plugin for WordPress, Blogger...