目前分類:Form Developer (23)

瀏覽方式: 標題列表 簡短摘要

app_window.set_window_position('MAIN_WINDOW', 'XXTYPE');

XXTYPE 的選項有下列幾個:

  • CASCADE
  • OVERLAP
  • CENTER
  • CENTER_ONCE
  • RIGHT
  • BELOW
  • FIRST_WINDOW

 

ex.

app_window.set_window_position('MAIN_WINDOW', 'FIRST_WINDOW');

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Write assign item sql at POST-QUERY trigger( block level).

<example>

select name
into  :CHARGE_SET.FREIGHT_COST_TYPE-- (Non-DB item)
from wsh_freight_cost_types_v
where FREIGHT_COST_TYPE_ID=:CHARGE_SET.FREIGHT_COST_TYPE_ID;

After the assignment sql, we need to change the valiation property to flase.

POST-QUERY trigger( block level).

set_item_property('CHARGE_SET.FREIGHT_COST_TYPE',VALIDATE_FROM_LIST, property_false);

WHEN-NEW-RECORD-INSTANCE(Block Level)

set_item_property('CHARGE_SET.FREIGHT_COST_TYPE',VALIDATE_FROM_LIST, property_true);

 

Or you will get save message after each execute_query.

文章標籤

SomebabyTina 發表在 痞客邦 留言(4) 人氣()

FRAME_HORZ_LINE

FRAME_RECT

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Window Style

Most application windows appear inside the MDI window ("Document" style) except dialogs and the Folder tool palette ("Dialog" style).

Size

Guidelines and limits for window size are as follows:

  • The maximum window size is 10.3"" (width) x 6.25" (height), to support an 1024x768 screen resolution.

  • The minimum size of a window is 2" x 2." (OMS-73016)

  • A window may be drawn any size between the maximum and minimum, with the following recommendations (OMS-73017):

    • Make windows only as large as is necessary.

    • Make non-modal windows within a form approximately the same size.

    • Make modal windows smaller than the non-modal windows that invoke them.

  • Reference =>http://docs.oracle.com/cd/E18727_01/doc.121/e12900/T458979T458985.htm

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Issue : 如圖

image 

Root cause

我設了一個Query_find block.該block的query allowed attribute is No,造成的。

當cursor 走到QUERY_FIND block , 手電筒就會被關掉了…

image

Solution

image

這樣就解決了…

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

<Issue Description>

設定Record group 並指定LOV,都正常,Compile 也ok

但Open form 並下拉選單選值會發生下列錯誤

ORA-00904: "DOCUMENT_NO": invalid identifier

--------------------------------------------------------------
FRM-40502: ORACLE error: unable to read list of values.

 

Record group sql 如下

SELECT distinct wnd.name as document_no,
       wnd.delivery_id as document_id,
       wdd.org_id as org_id
  FROM wsh_new_deliveries wnd,
  wsh_delivery_assignments wda,
  wsh_delivery_details wdd
WHERE wnd.organization_id = 374
   and wda.delivery_id= wnd.delivery_id
   and wdd.delivery_detail_id= wda.delivery_detail_id
   and wdd.source_code ='OE'
   and wda.delivery_detail_id is not null
   AND wnd.initial_pickup_date >= add_months(:DOCUMENTS_HEADER.ESTIMATE_CARRY_DATE,-6)

找到這篇文章才知道,原來這一個bug.

It looks like this is caused by bug 725059:
"FILTER BEFORE DISPLAY" DOESN'T WORK IF LOV HAS COLUMN ALIASES (TRIAGE1098)

Oracle的說明是…

AVAILABLE WORKAROUNDS:
Don't use column aliases in the LOV select statement.
However if a form is generated via Designer/2000, all lookup columns
automatically use column aliases in the LOV select statement.
This would mean that Des2k users have to change all their forms.

 

 

將Record Group SQL 修改下面這樣後就正常了

select document_no,document_id,org_id from (SELECT distinct wnd.name as document_no,
       wnd.delivery_id as document_id,
       wdd.org_id as org_id
  FROM wsh_new_deliveries wnd,
  wsh_delivery_assignments wda,
  wsh_delivery_details wdd
WHERE wnd.organization_id = 374
   and wda.delivery_id= wnd.delivery_id
   and wdd.delivery_detail_id= wda.delivery_detail_id
   and wdd.source_code ='OE'
   and wda.delivery_detail_id is not null
   AND wnd.initial_pickup_date >= add_months(:DOCUMENTS_HEADER.ESTIMATE_CARRY_DATE,-6))

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

When you close [x] a form , but popup a Progress window .image

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

開發經驗紀錄

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Understand checkbox<Enforce data integrity>

image

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

At Pre-Form Trigger

置中

app_window.set_window_position('MAIN', 'CENTER');

文章標籤

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Click which value you want to delete , press “Ctrl+Shift+<”

image

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Create a block level KEY_DUPREC trigger and write NULL inside it.
It'll then prevent rows from duplicating.

image

image

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

How to set window title name on Oracle EBS Form?

==Code==

--1. 置換掉原來Winodw Property上的Title String

ex.

SET_WINDOW_PROPERTY('XXDII_INV_MISC_TXN_V',TITLE,:misc_trx_qf.Q_TYPE_NAME||'['||:misc_trx_qf.Q_MISC_TRX_NUM||']');

--2. 使用EBS Standard Library, 在Window title後加入Organization Name

app_window.set_title('XXDII_INV_MISC_TXN_V',:parameter.org_name); 

 

[Preview Result]

image

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Date and datetime fields should enable the List lamp. When the user invokes List on these fields, the form opens the Calendar window.

 

SOP

1. 選擇要設定的Item Property

2. 設定Item Data Type = Date or Datetime

SomebabyTina 發表在 痞客邦 留言(1) 人氣()

Description : I would like to design a form to define material transfer type. I need a column reference gl account.

 

Below is my summary for using KFF.

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

==注意事項==

Necessary Coding For Views
• Call code in your ON-INSERT, ON-UPDATE, ON-DELETE, and ON-LOCK
triggers to access the base table instead of the view
• Create ROWID as the first column in your view, and alias it to ROW_ID
• Use the ROWID of the main entity table in your view

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

触发器执行顺序:

1. 当打开FORM时:

(1) PRE-FORM

(2) PRE-BLOCK(BLOCK级)

(3) WHEN-NEW-FORM-INSTANCE

(4) WHEN-NEW-BLOCK-INSTANCE

(5) WHEN-NEW-RECORD-INSTANCE

(6) WHEN-NEW-ITEM-INSTANCE

2. 当填写一行记录完成后,光标移动到下一条记录的时候:

(1) WHEN-VALIDATE-RECORD
(只将填写的记录与数据库中已存在的记录作唯一性的验证,如果只是页面上的数据重复而数据库中没有与其重复的值则不会报错.)

(2) WHEN-NEW-RECORD-INSTANCE

(3) WHEN-NEW-ITEM-INSTANCE

3. 当点击“保存”时

(1) WHEN-VALIDATE-RECORD
(将页面上的所有数据提交到数据库,若页面上有重复的数据,则提交第一次时成功但只是将数据先写到数据库中一类似临时表的地方,在提交第二条重复记录的时候报错,执行事务回滚,原来执行成功的指令也将被撤消)

(2) PRE-INSERT

(3) ON-INSERT

(4) POST-INSERT

(5) POST-FORMS-COMMIT

(6) PRE-BLOCK(BLOCK级)

(7) KEY-COMMIT

(8) WHEN-NEW-ITEM-INSTANCE

4. 当光标移动到当前数据块中已经显示的行上时:

(1) WHEN-REMOVE-RECORD

(2) WHEN-NEW-RECORD-INSTANCE

(3) WHEN-NEW-ITEM-INSTANCE

当在该行上的不同ITEM移动时:

(4)WHEN-NEW-ITEM-INSTANCE

5. 当要进行修改时(在记录中的某个项上进行了修改时):

(1)ON-LOCK

6. 在修改完成后进行保存时:

(1) WHEN-VALIDATE-RECORD

(2) PRE-UPDATE

(3) ON-UPDATE

(4) POST-FORMS-COMMIT

(5) PRE-BLOCK(BLOCK级)

(6) KEY-COMMIT

(7) WHEN-NEW-ITEM-INSTANCE

7. 删除一条记录时:

(1) ON-LOCK

(2) WHEN-REMOVE-RECORD

(3) KEY-DELREC

(4) WHEN-NEW-RECORD-INSTANCE

(5) WHEN-NEW-ITEM-INSTANCE

8. F11查询过程:

(1) WHEN-CLEAR-BLOCK

(2) WHEN-NEW-RECORD-INSTANCE

(3) WHEN-NEW-ITEM-INSTANCE

在输入查询条件后点CTRL+F11:

(4) PRE-QUERY

(5) WHEN-CLEAR-BLOCK

(6) POST-QUERY

(7) WHEN-NEW-RECORD-INSTANCE

(8) WHEN-NEW-ITEM-INSTANCE

9. CRRL+F11:

(1) WHEN-CLEAR-BLOCK

(2) PRE-QUERY

(3) WHEN-CLEAR-BLOCK

(4) POST-QUERY(每查一条记录,触发一次)

(5) WHEN-NEW-RECORD-INSTANCE

(6) WHEN-NEW-ITEM-INSTANCE

10. 从查询状态(F11)转为输入状态(F4)时:

(1) WHEN-CLEAR-BLOCK

(2) KEY-EXIT

(3) WHEN-NEW-RECORD-INSTANCE

(4) WHEN-NEW-ITEM-INSTANCE

11. 手电筒查询过程:

(1) QUERY_FIND(BLOCK级)

输入查询条件后,点击“查询”按钮:

(2) WHEN-CLEAR-BLOCK

(3) PRE-QUERY

(4) WHEN-CLEAR-BLOCK

(5) POST-QUERY

(6) WHEN-NEW-RECORD-INSTANCE

(7) WHEN-NEW-ITEM-INSTANCE

12. 点击“New”时:

(1) WHEN-NEW-RECORD-INSTANCE

(2) WHEN-NEW-ITEM-INSTANCE

13. 点击“Edit Field”时:

(1)KEY-EDIT

14. 点击“Window Help”时:

(1)KEY-HELP

15. 点击“Clear Record”时:

(1) WHEN-REMOVE-RECORD

(2) POST-QUERY

(3) WHEN-NEW-RECORD-INSTANCE

(4) WHEN-NEW-ITEM-INSTANCE

16. 点击F4关闭时:

(1) KEY-EXIT

(2) POST-FORM

17. 点击“Close Form”按钮关闭时:

(1) KEY-EXIT

(2) POST-FORM

18. 点击“Translations”按钮时:

(1)TRANSLATIONS

19. 点击小叉号关闭时:

(1) WHEN-WINDOW-CLOSED

(2) CLOSE-WINDOW

(3) KEY-EXIT

(4) POST-FORM

20. 选中LOV列表:

(1) KEY-LISTVAL

(2) WHEN-NEW-ITEM-INSTANCE

21. 选中记录前面的小条时:

(1) WHEN-NEW-RECORD-INSTANCE

(2) WHEN-NEW-ITEM-INSTANCE(数据项级)

(3) WHEN-NEW-ITEM-INSTANCE

22. 光标上下移动时

(1) WHEN-NEW-RECORD-INSTANCE

(2) WHEN-NEW-ITEM-INSTANCE

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

Form Builder Basic Development

SomebabyTina 發表在 痞客邦 留言(1) 人氣()

[Query Data Souce Name] : View Name

image 

[DML Data Target ]

image

Column 上的設定

DML Table Column - 要設定一個Primiary Key Column

image

Non DML Table Column Setting

ps. 此Column 要能夠讓User 從 LOV選擇,並儲存 ID 值到DML table中

image

SomebabyTina 發表在 痞客邦 留言(0) 人氣()

問題說明:
客製Form時,常常並不是一個Block裡面的Item都是Database Item,有些Item 我們是Non-DB column.
但對於這些Non-DB column 我們常常都要秀在Form Canvas上,讓User可以選擇他看得懂的值。
在設計上,Execute_qury 後我們會把這個Non-DB Value帶出(因為他不是Block DB column),
所以原則上Form是不會自動帶出的,我們必須自己code it.
而作法呢,很簡單,寫在Post-query trigger上。
然在Query all data in UI 是ok,但關閉Form時(沒有做任何變更),竟會出現”Do you want to save the changes you have made”的字樣,
該怎麼讓它不要出現呢?
下面就是..我的註記---
 

SomebabyTina 發表在 痞客邦 留言(1) 人氣()

1 2