<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3014670900155818228</id><updated>2024-08-31T00:47:41.619-07:00</updated><category term="Oracle ERP"/><category term="開心農場"/><category term="Oracle PO"/><category term="Oracle WIP"/><category term="Oracle INV"/><category term="Oracle DBA"/><category term="Oracle OM"/><category term="Oracle Cost"/><category term="Oracle FND"/><category term="Oracle Discoverer"/><category term="Oracle PL/SQL"/><category term="Oracle RCV"/><category term="Android"/><category term="Oracle AP"/><category term="Oracle BOM"/><category term="Oracle FA"/><title type='text'>狗爸的世界</title><subtitle type='html'>1. 這是個初學農友的農友日誌~&#xa;2. Oracle ERP 分享&#xa;3. Oracle DBA 心得&#xa;4. Android 開發心得&#xa;5. MoJo寵物手作粉絲成員&#xa;6. 程式客製及外包專案接案</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>109</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-2437564251759379595</id><published>2016-12-26T16:28:00.000-08:00</published><updated>2016-12-26T16:28:02.115-08:00</updated><title type='text'>Oracle ERP R12. - 內建SQL Package 可以得到會計節段說明資料</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;單一節段的代碼說明&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;gl_flexfields_pkg.get_description_sql(chart_of_accounts_id,---
chart of account id&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
1,----- Position of segment&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;segment1
---- Segment value&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;整段會計科目的說明&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;gl_flexfields_pkg.get_concat_description(chart_of_accounts_id,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
code_combination_id&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
);&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/2437564251759379595/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2016/12/oracle-erp-r12-sql-package.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/2437564251759379595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/2437564251759379595'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2016/12/oracle-erp-r12-sql-package.html' title='Oracle ERP R12. - 內建SQL Package 可以得到會計節段說明資料'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-3764763783057728592</id><published>2015-03-12T18:49:00.001-07:00</published><updated>2015-03-12T18:49:50.868-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><title type='text'>Oracle ERP R12. 無法複製貼上</title><content type='html'>Login ERP 時,系統會彈出一對話框,要求Java的存取授權,若沒有接收的話,就可能出現無法使用複製貼上的功能.&lt;br /&gt;
&lt;br /&gt;
若重新登入時已接受授權,仍不能複制貼上,則可試著重開機~</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/3764763783057728592/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2015/03/oracle-erp-r12.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3764763783057728592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3764763783057728592'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2015/03/oracle-erp-r12.html' title='Oracle ERP R12. 無法複製貼上'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-3295141209541242430</id><published>2014-02-26T17:12:00.003-08:00</published><updated>2014-02-26T17:12:54.979-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FND"/><title type='text'>Oracle ERP R12. 中文環境下Export 亂碼之狀況排除</title><content type='html'>說明 :&lt;br /&gt;
Oracle ERP Server之字元集與Client的字元集不符,導至Export產出之excel於Client開啟時,中文部分會呈現亂碼&lt;br /&gt;
&lt;br /&gt;
解法 :&lt;br /&gt;
設定 &lt;b&gt;&lt;u style=&quot;background-color: yellow;&quot;&gt;FND: NATIVE CLIENT ENCODING&lt;/u&gt;&lt;/b&gt;&amp;nbsp;個人的Profile 為Client的字元集&lt;br /&gt;
&lt;br /&gt;
例 : Client的字元集為繁體中文&amp;nbsp;ZHT16BIG5 , 設定如下&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-3vFb7t5mWM0/Uw6Q-kDiStI/AAAAAAAACSU/Rp7MLsA-MHI/s1600/export%E4%BA%82%E7%A2%BC.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-3vFb7t5mWM0/Uw6Q-kDiStI/AAAAAAAACSU/Rp7MLsA-MHI/s1600/export%E4%BA%82%E7%A2%BC.jpg&quot; height=&quot;108&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/3295141209541242430/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2014/02/oracle-erp-r12-export.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3295141209541242430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3295141209541242430'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2014/02/oracle-erp-r12-export.html' title='Oracle ERP R12. 中文環境下Export 亂碼之狀況排除'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-3vFb7t5mWM0/Uw6Q-kDiStI/AAAAAAAACSU/Rp7MLsA-MHI/s72-c/export%E4%BA%82%E7%A2%BC.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-7972277802125338568</id><published>2013-10-06T17:50:00.000-07:00</published><updated>2013-10-06T17:50:44.412-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FND"/><title type='text'>Oracle ERP R12. WF_NOTIFICATION.SEND (通知訊息功能)</title><content type='html'>Sample Code :&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PROCEDURE SEND_WF_NOTIFICATION(I_TO IN VARCHAR2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_SUBJECT IN VARCHAR2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TEXT &amp;nbsp; &amp;nbsp;IN VARCHAR2)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; /*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; I_TO : Oracle EBS帳號&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; I_SUBJECT : 要顯示在Worklist的主旨&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; I_TEXT : 內容&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; */&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; V_NOTIFICATION_ID NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; V_NOTIFICATION_ID := WF_NOTIFICATION.SEND(ROLE &amp;nbsp; &amp;nbsp; =&amp;gt; I_TO,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSG_TYPE =&amp;gt; &#39;CS_MSGS&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSG_NAME =&amp;gt; &#39;FYI_MESSAGE&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIORITY =&amp;gt; 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WF_NOTIFICATION.SETATTRTEXT(NID &amp;nbsp; &amp;nbsp;=&amp;gt; V_NOTIFICATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ANAME &amp;nbsp;=&amp;gt; &#39;OBJECT_TYPE&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AVALUE =&amp;gt; I_SUBJECT);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WF_NOTIFICATION.SETATTRTEXT(NID &amp;nbsp; &amp;nbsp;=&amp;gt; V_NOTIFICATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ANAME &amp;nbsp;=&amp;gt; &#39;MESSAGE_TEXT&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AVALUE =&amp;gt; I_TEXT); --MESSAGE BODY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; COMMIT;&lt;br /&gt;
&amp;nbsp; END;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/7972277802125338568/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/10/oracle-erp-r12-wfnotificationsend.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7972277802125338568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7972277802125338568'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/10/oracle-erp-r12-wfnotificationsend.html' title='Oracle ERP R12. WF_NOTIFICATION.SEND (通知訊息功能)'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-5771724043536799568</id><published>2013-09-24T01:57:00.001-07:00</published><updated>2013-09-24T01:58:21.055-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle INV"/><title type='text'>Oracle ERP R12. create locator using API (INV_LOC_WMS_PUB.CREATE_LOCATOR) - 建立Locator的API</title><content type='html'>若有需要大量新增Locator 則其有二種方式 :&lt;br /&gt;
&lt;br /&gt;
1. Data Load&lt;br /&gt;
&lt;br /&gt;
2. 呼叫 INV_LOC_WMS_PUB.CREATE_LOCATOR 該API&lt;br /&gt;
用法 :&lt;br /&gt;
FND_GLOBAL.APPS_INITIALIZE(1114,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;51007,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;401);&lt;br /&gt;
FND_MSG_PUB.Initialize; &lt;br /&gt;
&lt;br /&gt;
INV_LOC_WMS_PUB.CREATE_LOCATOR(X_RETURN_STATUS =&amp;gt; :X_RETURN_STATUS,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X_MSG_COUNT =&amp;gt; :X_MSG_COUNT,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X_MSG_DATA =&amp;gt; :X_MSG_DATA,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X_INVENTORY_LOCATION_ID =&amp;gt; :X_INVENTORY_LOCATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X_LOCATOR_EXISTS =&amp;gt; :X_LOCATOR_EXISTS,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;P_ORGANIZATION_ID =&amp;gt; :P_ORGANIZATION_ID,&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ORGANIZATION_CODE =&amp;gt; :P_ORGANIZATION_CODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;P_CONCATENATED_SEGMENTS =&amp;gt; &lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;儲位,&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;P_DESCRIPTION =&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;儲位描述&lt;/b&gt;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;P_INVENTORY_LOCATION_TYPE =&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;3,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_PICKING_ORDER =&amp;gt; :P_PICKING_ORDER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_LOCATION_MAXIMUM_UNITS =&amp;gt; :P_LOCATION_MAXIMUM_UNITS,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;P_SUBINVENTORY_CODE =&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;倉別&lt;/b&gt;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_LOCATION_WEIGHT_UOM_CODE =&amp;gt; :P_LOCATION_WEIGHT_UOM_CODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_MAX_WEIGHT =&amp;gt; :P_MAX_WEIGHT,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_VOLUME_UOM_CODE =&amp;gt; :P_VOLUME_UOM_CODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_MAX_CUBIC_AREA =&amp;gt; :P_MAX_CUBIC_AREA,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_X_COORDINATE =&amp;gt; :P_X_COORDINATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_Y_COORDINATE =&amp;gt; :P_Y_COORDINATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_Z_COORDINATE =&amp;gt; :P_Z_COORDINATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_PHYSICAL_LOCATION_ID =&amp;gt; :P_PHYSICAL_LOCATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_PICK_UOM_CODE =&amp;gt; :P_PICK_UOM_CODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_DIMENSION_UOM_CODE =&amp;gt; :P_DIMENSION_UOM_CODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_LENGTH =&amp;gt; :P_LENGTH,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_WIDTH =&amp;gt; :P_WIDTH,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_HEIGHT =&amp;gt; :P_HEIGHT,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;P_STATUS_ID =&amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;1,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_DROPPING_ORDER =&amp;gt; :P_DROPPING_ORDER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE_CATEGORY =&amp;gt; :P_ATTRIBUTE_CATEGORY,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE1 =&amp;gt; :P_ATTRIBUTE1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE2 =&amp;gt; :P_ATTRIBUTE2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE3 =&amp;gt; :P_ATTRIBUTE3,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE4 =&amp;gt; :P_ATTRIBUTE4,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE5 =&amp;gt; :P_ATTRIBUTE5,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE6 =&amp;gt; :P_ATTRIBUTE6,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE7 =&amp;gt; :P_ATTRIBUTE7,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE8 =&amp;gt; :P_ATTRIBUTE8,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE9 =&amp;gt; :P_ATTRIBUTE9,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE10 =&amp;gt; :P_ATTRIBUTE10,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE11 =&amp;gt; :P_ATTRIBUTE11,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE12 =&amp;gt; :P_ATTRIBUTE12,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE13 =&amp;gt; :P_ATTRIBUTE13,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE14 =&amp;gt; :P_ATTRIBUTE14,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ATTRIBUTE15 =&amp;gt; :P_ATTRIBUTE15,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_ALIAS =&amp;gt; :P_ALIAS);</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/5771724043536799568/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/09/oracle-erp-r12-create-locator-using-api.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5771724043536799568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5771724043536799568'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/09/oracle-erp-r12-create-locator-using-api.html' title='Oracle ERP R12. create locator using API (INV_LOC_WMS_PUB.CREATE_LOCATOR) - 建立Locator的API'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-1929118508725231495</id><published>2013-09-11T17:41:00.003-07:00</published><updated>2013-09-11T17:41:57.653-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle OM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle PL/SQL"/><title type='text'>Oracle ERP R12. How to select oe_transaction_type_syn ?</title><content type='html'>Before execute SQL :&lt;br /&gt;
&lt;br /&gt;
declare&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp; MO_GLOBAL.SET_POLICY_CONTEXT(&#39;S&#39;,81); --Set Org_ID&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
select * from oe_transaction_types_syn;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/1929118508725231495/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/09/oracle-erp-r12-how-to-select.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/1929118508725231495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/1929118508725231495'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/09/oracle-erp-r12-how-to-select.html' title='Oracle ERP R12. How to select oe_transaction_type_syn ?'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-4789189537012997077</id><published>2013-07-31T18:45:00.000-07:00</published><updated>2013-08-05T03:23:13.380-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle OM"/><title type='text'>Oracle ERP R12. Profile - OE: AutoPrice (自動更新Unit Selling Price時機設定)</title><content type='html'>經同仁反應,訂單的單價常會不明原因自動被更改掉,而user都不知道.&lt;br /&gt;
經查發現原因如下:&lt;br /&gt;
&lt;br /&gt;
因為訂單會指定price list ,故只要訂單項次有調整任何一欄位(unit selling price欄除外),則系統會再自動從price list中取回目前最新的設定.&lt;br /&gt;
而該行為的主要原因是控制在一Profile =&amp;gt;&amp;nbsp;OE: AutoPrice , 該Profile的值預設為空值所導致的關係.&lt;br /&gt;
&lt;br /&gt;
以下是該Profile設定的說明 : (本人測試得來的結果)&lt;br /&gt;
空值 =&amp;gt; 不論是Entered 或是 Booked狀態皆會自動取回最新的price list值&lt;br /&gt;
Entry =&amp;gt; 只有在訂單狀態為Entered 時才會自動取回最新的price list值&lt;br /&gt;
Booking =&amp;gt; &lt;b&gt;&lt;span style=&quot;background-color: yellow; color: red;&quot;&gt;不論狀態&lt;/span&gt;&lt;/b&gt;如何&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;皆不會&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;自動取回最新的price list值.&lt;br /&gt;
&lt;br /&gt;
Ps :&lt;br /&gt;
以上純為本人測試之結果,若讀者測試後有任何心得請不吝指教,以該本人更新正確之資訊~&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;&amp;lt;&amp;lt;2013/08/04 不具名的網友 補充以下說明&amp;gt;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;通常業務流程而言, 應該定義為N (calculate_price_flag) , 避免訂單預定後仍可能因為手動或API變更而改變售價&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;*reference Doc ID 134326.1&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;· If it’s set to ‘Y’, both pricing and freight charge calculations are done.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;· If it’s set to ‘P’, only the freight charge calculation is done.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;&#39;P&#39; also indicates that modifiers assigned to a pricing phase&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;where freeze override is enabled could also be applied.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;&quot;&gt;· If it’s set to ‘N’, neither pricing nor freight charge is calculated.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/4789189537012997077/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/07/oracle-erp-r12-profile-oe-autoprice.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4789189537012997077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4789189537012997077'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/07/oracle-erp-r12-profile-oe-autoprice.html' title='Oracle ERP R12. Profile - OE: AutoPrice (自動更新Unit Selling Price時機設定)'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-3936301915810664206</id><published>2013-07-30T19:40:00.000-07:00</published><updated>2013-07-30T19:40:50.830-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><title type='text'>Oracle ERP R12. 如何透過Personalize功能呼叫另一form來回傳值. Get another form&#39;s result value (user personalize) .</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;狀況假設&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; :&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;A-Form(Rcv_transaction) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;要呼叫另一客制&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;form (B-Form),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;由&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;B-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;運算後產生一結果回轉&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;A-Form&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Step 1. &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;建立一&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;用來取回&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;B-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;的&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;result&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;例&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; : &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;create&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;or&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;replace&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;function&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;
HPX_WEN_TEST_F(I_KEY &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;VARCHAR2&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;) &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;return&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;varchar2&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;is&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; T_Result &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;VARCHAR2&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;100&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; T_EXIT &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;VARCHAR2&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;1&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;) := &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;N&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; T_EXIT_TIME &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;DATE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; := &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;SYSDATE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;+&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;5&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;/(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;24&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;*&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;60&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;begin&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;WHILE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; T_EXIT = &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;N&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;LOOP&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;SELECT&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; DECODE(&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;COUNT&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;(*),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;0&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;,&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;N&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;Y&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;MAX&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;(HC.VALUE_2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;INTO&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 13.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;T_EXIT&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T_RESULT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;FROM&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; HPX_CONFIG_T HC&lt;span style=&quot;background-color: yellow;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;–&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;假設該&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;table&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;為&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;result&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;WHERE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; HC.KEY_ID = &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;TEST&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;AND&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;
HC.VALUE_1 = I_KEY;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;--Key&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;值&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;用來確認所抓取的資料無誤&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;--&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;IF&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; T_EXIT_TIME &amp;lt;= &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;SYSDATE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;THEN&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T_EXIT := &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&#39;Y&#39;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;; &lt;/span&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;--&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;逾時離開以避免無窮迴圈&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;END&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;IF&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;END&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;LOOP&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;return&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;(T_Result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;end&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt; HPX_WEN_TEST_F;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: white;&quot;&gt;S&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;tep 2. &lt;/span&gt;&lt;span style=&quot;background: white; color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;在&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;A-Form&lt;/span&gt;&lt;span style=&quot;background: white; color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;的&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt; mso-highlight: yellow;&quot;&gt;WHEN-NEW-FORM-INSTANCE&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;加入一&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;LOCAL
VARIABLE &amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;的宣告&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;及&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;MENU BUTTON&lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;的宣告&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: navy; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-font-kerning: 0pt; mso-hansi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;例&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt; :&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipu0osXrvNHh3yMObKaPxXMaHjaN1dViRfhh26G19prMp4G6pOzi-KR2G3cbGtqD0TOPcRwwsPkIlNs4ttmSjG9dmJfR_K936ZYiskezFP1EhchpVgJ4kDUJOoU06aNfqXP5T7yfa4Gd-b/s1600/20130731-1-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipu0osXrvNHh3yMObKaPxXMaHjaN1dViRfhh26G19prMp4G6pOzi-KR2G3cbGtqD0TOPcRwwsPkIlNs4ttmSjG9dmJfR_K936ZYiskezFP1EhchpVgJ4kDUJOoU06aNfqXP5T7yfa4Gd-b/s640/20130731-1-1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHzVCP8nKsZ5Yxftz_FBp1t0cZSbnxNPjOghTYy06SE7EFviXWP8h2g36GqjhIZLfiztSF6nuFfNGsVKxaJrH5h-bvYZfP8k73j8Yu7N85ZjQNTNsNHz7tPqKoaN7MRcg5KS4VR8gKz8cg/s1600/20130731-1-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHzVCP8nKsZ5Yxftz_FBp1t0cZSbnxNPjOghTYy06SE7EFviXWP8h2g36GqjhIZLfiztSF6nuFfNGsVKxaJrH5h-bvYZfP8k73j8Yu7N85ZjQNTNsNHz7tPqKoaN7MRcg5KS4VR8gKz8cg/s640/20130731-1-2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: navy; font-family: &amp;quot;Courier New&amp;quot;; mso-bidi-font-size: 12.0pt; mso-font-kerning: 0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjOAXUGp-usrm3eYvPm8JU1L5phmKQHO26VJPdxFlnuDMYH57zmIXiw5SypHQ0r5Y0qi1G0wEY9VOxe6u7QBZEFl2aG67m0XhvcxyF9cNw5vFdDa6WkEr7WpbvO_IdXZtvlnoMiRvfw0gW/s1600/20130731-1-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjOAXUGp-usrm3eYvPm8JU1L5phmKQHO26VJPdxFlnuDMYH57zmIXiw5SypHQ0r5Y0qi1G0wEY9VOxe6u7QBZEFl2aG67m0XhvcxyF9cNw5vFdDa6WkEr7WpbvO_IdXZtvlnoMiRvfw0gW/s640/20130731-1-3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Step 3. &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;設定上述&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;MENU
BUTTON&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;的功能行為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;例&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; :&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC42km_F6wvlRwdByno8gzKVeH0kdJylix1hqBYa_6LfkHzxF-Xw6dyD4mjGy8K7RuutEJBsmaQwRE9UmcezsIzPzOkT39DC2r-ttfVGfuqyCKCV81YdlilhExq-E-O3OMrHE_B89r1Hs4/s1600/20130731-2-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC42km_F6wvlRwdByno8gzKVeH0kdJylix1hqBYa_6LfkHzxF-Xw6dyD4mjGy8K7RuutEJBsmaQwRE9UmcezsIzPzOkT39DC2r-ttfVGfuqyCKCV81YdlilhExq-E-O3OMrHE_B89r1Hs4/s640/20130731-2-1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_28&quot; o:spid=&quot;_x0000_i1030&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:313.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2dm9i8dxHgGFjSpupHGoHfwlQs1mRGU1wZVoaddTAwmGDpEnnx3ewIbWUZqODpGp1e4dFFl_fJkc6y0u_uaGmeFZf96pQytlPaMmF-fEU_5OIow_CPWmY-3UEqjfQ9-nPC4-zv1iN4Ku/s1600/20130731-2-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf2dm9i8dxHgGFjSpupHGoHfwlQs1mRGU1wZVoaddTAwmGDpEnnx3ewIbWUZqODpGp1e4dFFl_fJkc6y0u_uaGmeFZf96pQytlPaMmF-fEU_5OIow_CPWmY-3UEqjfQ9-nPC4-zv1iN4Ku/s640/20130731-2-2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;埋入&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Debug&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;用的訊息&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3hhOMfP5AeoqQGCmG7sUNtJttt14wa3R4hffY_l7zkWXbX9AbIz8Jkb6mS8pLU8jJBKhk1LTIXLjJaXeScU5X2X_xxjdycy69GUfHfy_SbFdI77QH4syj8wVqZl5A4lSIfOHMr1WJTeLN/s1600/20130731-2-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3hhOMfP5AeoqQGCmG7sUNtJttt14wa3R4hffY_l7zkWXbX9AbIz8Jkb6mS8pLU8jJBKhk1LTIXLjJaXeScU5X2X_xxjdycy69GUfHfy_SbFdI77QH4syj8wVqZl5A4lSIfOHMr1WJTeLN/s640/20130731-2-3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;將游標固定至等定&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;ITEM &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;重要&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;該步驟是為了&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;A-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;重新取得控制取時只會觸發&lt;/span&gt; &lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;WHEN-NEW-ITEM-INSTANCE&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;所以要知道是那一&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;ITEM&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;會被觸發&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeHBy1UtjfjjlreXEj1P8mwIKTlnn8_PGGmHhzeueunbtxYXPpiUNHKN8JtasISXe628ANKGDRY10Ia6JHDaDEnY1poTyEQKXGODxA07vqszH4x3rIiEYDHhqve0mATPYuZCM_isp2YQXy/s1600/20130731-2-4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeHBy1UtjfjjlreXEj1P8mwIKTlnn8_PGGmHhzeueunbtxYXPpiUNHKN8JtasISXe628ANKGDRY10Ia6JHDaDEnY1poTyEQKXGODxA07vqszH4x3rIiEYDHhqve0mATPYuZCM_isp2YQXy/s640/20130731-2-4.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_31&quot; o:spid=&quot;_x0000_i1029&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:314.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;呼叫&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;B-Form &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;注意&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;這裡的&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;HPXINVF004&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;是隨便設的&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;並不會真的寫入&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Result table ,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;這裡只是要模擬說明而已&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;假設會寫入&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Step 1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;的&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Result table&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA1NPq9Vjn0ZVHppZEp1tIrKAPPyJcvmAzH7QXgAlcCzi6XhSr_YoeoLCI5ncylk_sFKJjcI9mf0eDNMhx7wrScHl2nIigb2mQmXncPdN3So4Q5ISLhbxfWEwK9Jn7Q0qLqGUrpzp0ejgL/s1600/20130731-2-5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA1NPq9Vjn0ZVHppZEp1tIrKAPPyJcvmAzH7QXgAlcCzi6XhSr_YoeoLCI5ncylk_sFKJjcI9mf0eDNMhx7wrScHl2nIigb2mQmXncPdN3So4Q5ISLhbxfWEwK9Jn7Q0qLqGUrpzp0ejgL/s640/20130731-2-5.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_34&quot; o:spid=&quot;_x0000_i1028&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:314.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image015.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Step 4. &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;設定&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;A-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;重新取得控制權後的行為動作&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;並由判斷&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;是否有值來確認是否要進入該程序&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;注意&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;由&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;B-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;返回&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;A-Form&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;時只會觸發&lt;/span&gt; &lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;&lt;b&gt;WHEN-NEW-ITEM-INSTANCE&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; , &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;故上步驟會先&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;GO_ITEM.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDZKPZhyphenhyphenradvnaN5U5w2lu8pBYu0XJlBCIdR0NPINpQtX_V_uQvZOSibQDrjoNuvkfbzwPGjHn_aQrPkKvo8ghyphenhyphenlKz1K2XJ65SDmQTOitiYnfmha5zD-Z8DHXPxwIqK8D8balCp6C1Nxu7/s1600/20130731-3-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDZKPZhyphenhyphenradvnaN5U5w2lu8pBYu0XJlBCIdR0NPINpQtX_V_uQvZOSibQDrjoNuvkfbzwPGjHn_aQrPkKvo8ghyphenhyphenlKz1K2XJ65SDmQTOitiYnfmha5zD-Z8DHXPxwIqK8D8balCp6C1Nxu7/s640/20130731-3-1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_37&quot; o:spid=&quot;_x0000_i1027&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:319.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image017.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;呼叫&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Step 1. 的Function來&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;取回&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Result
Table&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;的值&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfV9DPCTKzHyr3hlGh2Rbfi0MGKX2i4U02ziYLKskKKuR4GoMDwHlJVn4Hy6Qt6u7x-PUWQI_AHV91smiWXYMsVqm7PCJxdySbxkBZg-LQ_sRRYIR2R6hh2m7lEp3-3QXqT1uB0fvClYV6/s1600/20130731-3-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfV9DPCTKzHyr3hlGh2Rbfi0MGKX2i4U02ziYLKskKKuR4GoMDwHlJVn4Hy6Qt6u7x-PUWQI_AHV91smiWXYMsVqm7PCJxdySbxkBZg-LQ_sRRYIR2R6hh2m7lEp3-3QXqT1uB0fvClYV6/s640/20130731-3-2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_40&quot; o:spid=&quot;_x0000_i1026&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:317.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image019.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;清除&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Key&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;值&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;以避免誤動作&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvSXo36bDv0dMOiq-PRLd5p6Oa18v7fdRC2HYPjBMVKy-RvHVjPh_f2gjDLVUnClDRD0HmPteBuBqyrO3haTrJg5GaQxe4r6_MXeVwdXJ1hPYS2TsXrpdHjTu4qesDYXPhlyZDlwtfnaan/s1600/20130731-3-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvSXo36bDv0dMOiq-PRLd5p6Oa18v7fdRC2HYPjBMVKy-RvHVjPh_f2gjDLVUnClDRD0HmPteBuBqyrO3haTrJg5GaQxe4r6_MXeVwdXJ1hPYS2TsXrpdHjTu4qesDYXPhlyZDlwtfnaan/s640/20130731-3-3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 新細明體; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;圖片_x0020_43&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:523.5pt;
 height:318pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\A0964\AppData\Local\Temp\msohtmlclip1\01\clip_image021.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/3936301915810664206/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/07/oracle-erp-r12-personalizeform-get.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3936301915810664206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3936301915810664206'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/07/oracle-erp-r12-personalizeform-get.html' title='Oracle ERP R12. 如何透過Personalize功能呼叫另一form來回傳值. Get another form&#39;s result value (user personalize) .'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipu0osXrvNHh3yMObKaPxXMaHjaN1dViRfhh26G19prMp4G6pOzi-KR2G3cbGtqD0TOPcRwwsPkIlNs4ttmSjG9dmJfR_K936ZYiskezFP1EhchpVgJ4kDUJOoU06aNfqXP5T7yfa4Gd-b/s72-c/20130731-1-1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-7418552614418719406</id><published>2013-06-19T19:07:00.001-07:00</published><updated>2013-06-19T19:07:16.374-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle INV"/><title type='text'>Oracle ERP R12. Unassign or delete large number of items . </title><content type='html'>&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;There is an option on the &lt;/span&gt;&lt;span style=&quot;background-color: yellow; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Tools menu&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt; of the Delete Item form that opens the &lt;/span&gt;&lt;span style=&quot;background-color: yellow; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Item Search screen&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;There you can search on a number of criteria, including status, and the search results are populated in your Delete Group.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;You can review the list, and delete unwanted entries (or add new ones, if necessary).&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;span style=&quot;font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Then run the&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;b&gt; Delete process.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Reference from Metalink :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: yellow; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 14px; font-weight: bold; text-align: right;&quot;&gt;ID 1347893.1&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/7418552614418719406/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/06/oracle-erp-r12-unassign-or-delete-large.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7418552614418719406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7418552614418719406'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/06/oracle-erp-r12-unassign-or-delete-large.html' title='Oracle ERP R12. Unassign or delete large number of items . '/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-5154624515817025188</id><published>2013-03-25T23:33:00.005-07:00</published><updated>2013-03-25T23:34:57.951-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FND"/><title type='text'>Oracle ERP R12. 使用者忘記密碼 如何自行變更密碼</title><content type='html'>分享同事提供的自行變更密碼做法:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; text-indent: -18.0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;1.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 7.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;在登入畫面下方,點選&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;”&lt;span style=&quot;background-color: yellow;&quot;&gt;Login
Assistance&lt;/span&gt;”&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; text-indent: -18.0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;2. 輸入&lt;span style=&quot;background-color: yellow;&quot;&gt;帳號&lt;/span&gt;,點選&quot;&lt;span style=&quot;background-color: yellow;&quot;&gt;Forgot Password&lt;/span&gt;&quot; , 系統就會發送密碼重設的mail至該帳號上所定義的mail&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; text-indent: -18.0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;3. 待收到mail後,點選mail內&quot;&lt;span style=&quot;background-color: yellow;&quot;&gt;Reset your password&lt;/span&gt;&quot;的超連結,即可進入密碼&lt;span style=&quot;background-color: yellow;&quot;&gt;重設的畫面&lt;/span&gt;.&lt;/span&gt;&lt;span style=&quot;text-indent: -18pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; text-indent: -18.0pt;&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/5154624515817025188/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5154624515817025188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5154624515817025188'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12.html' title='Oracle ERP R12. 使用者忘記密碼 如何自行變更密碼'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-6502741914186470652</id><published>2013-03-13T20:06:00.005-07:00</published><updated>2013-03-13T20:06:56.886-07:00</updated><title type='text'>狗爸的世界: Oracle ERP R12. 使用interface批量變更品號的operation code ....</title><content type='html'>&lt;a href=&quot;http://doggww.blogspot.com/2013/01/oracle-erp-r12-interfaceoperation-code.html?spref=bl&quot;&gt;狗爸的世界: Oracle ERP R12. 使用interface批量變更品號的operation code ....&lt;/a&gt;: Sample code :    DECLARE  &amp;nbsp; --  &amp;nbsp;  T_OLD_OP VARCHAR2(10) := &#39;2T02&#39;; &amp;nbsp;--**** old operation code  &amp;nbsp; T_NEW_OP VARCHAR2(10) := &#39;2S02...</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/6502741914186470652/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-interfaceoperation-code.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/6502741914186470652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/6502741914186470652'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-interfaceoperation-code.html' title='狗爸的世界: Oracle ERP R12. 使用interface批量變更品號的operation code ....'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-8174417988651384854</id><published>2013-03-13T20:06:00.003-07:00</published><updated>2013-03-13T20:06:48.371-07:00</updated><title type='text'>狗爸的世界: Oracle ERP R12. - 如何快速複製使用者權限 , How to grant privi...</title><content type='html'>&lt;a href=&quot;http://doggww.blogspot.com/2013/03/oracle-erp-r12-how-to-grant-privileges.html?spref=bl&quot;&gt;狗爸的世界: Oracle ERP R12. - 如何快速複製使用者權限 , How to grant privi...&lt;/a&gt;: 以下Sample是當有新人時,可以快速複制user a 的權限至user b的作法 ~   My Sample code : (Package)   /*PACKAGE HEADER*/   CREATE OR REPLACE PACKAGE XX_FND_USER_RESP_P...</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/8174417988651384854/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-how-to-grant-privi.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/8174417988651384854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/8174417988651384854'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-how-to-grant-privi.html' title='狗爸的世界: Oracle ERP R12. - 如何快速複製使用者權限 , How to grant privi...'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-3089645358465197438</id><published>2013-03-13T20:06:00.001-07:00</published><updated>2013-03-13T20:06:15.454-07:00</updated><title type='text'>狗爸的世界: Oracle ERP R12. 如何使用API (FND_USER_PKG)建立帳號. How to...</title><content type='html'>&lt;a href=&quot;http://doggww.blogspot.com/2013/03/oracle-erp-r12-api-fnduserpkg-how-to.html?spref=bl&quot;&gt;狗爸的世界: Oracle ERP R12. 如何使用API (FND_USER_PKG)建立帳號. How to...&lt;/a&gt;: 以下是使用FND_USER_PKG.CREATEUSER 建立使用者的範例程式碼   Sample code :  FND_USER_PKG.CREATEUSER(X_USER_NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; :USER_NAME , --USER ACCOUNT ...</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/3089645358465197438/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-api-fnduserpkg-how-to_13.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3089645358465197438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3089645358465197438'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-api-fnduserpkg-how-to_13.html' title='狗爸的世界: Oracle ERP R12. 如何使用API (FND_USER_PKG)建立帳號. How to...'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-460588688712400530</id><published>2013-03-12T19:15:00.001-07:00</published><updated>2013-03-12T19:15:35.070-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FND"/><title type='text'>Oracle ERP R12. 如何使用API (FND_USER_PKG)建立帳號. How to use FND_USER_PKG.CREATEUSER ?</title><content type='html'>&lt;br /&gt;
以下是使用FND_USER_PKG.CREATEUSER 建立使用者的範例程式碼&lt;br /&gt;
&lt;br /&gt;
Sample code :&lt;br /&gt;
FND_USER_PKG.CREATEUSER(X_USER_NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; :USER_NAME , --USER ACCOUNT&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X_OWNER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;SEED&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X_UNENCRYPTED_PASSWORD =&amp;gt; &#39;ABC234&#39;, &amp;nbsp;--Default password&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X_EMPLOYEE_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; :EMPLOYEE_ID, --Mapping to employee id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X_EMAIL_ADDRESS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; :EMAIL_ADDRESS); --user email&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;PS :&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;X_UNENCRYPTED_PASSWORD 需注意是否有啟用密碼的複雜度檢查，若有則必需符合其複雜度檢查規定&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/460588688712400530/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-api-fnduserpkg-how-to.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/460588688712400530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/460588688712400530'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-api-fnduserpkg-how-to.html' title='Oracle ERP R12. 如何使用API (FND_USER_PKG)建立帳號. How to use FND_USER_PKG.CREATEUSER ?'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-4943814424772832714</id><published>2013-03-12T19:01:00.000-07:00</published><updated>2013-03-12T19:02:34.912-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FND"/><title type='text'>Oracle ERP R12. - 如何快速複製使用者權限 , How to grant privileges from one user to another user ?</title><content type='html'>以下Sample是當有新人時,可以快速複制user a 的權限至user b的作法 ~&lt;br /&gt;
&lt;br /&gt;
My Sample code : (Package)&lt;br /&gt;
&lt;br /&gt;
/*PACKAGE HEADER*/&lt;br /&gt;
&lt;br /&gt;
CREATE OR REPLACE PACKAGE XX_FND_USER_RESP_PKG&lt;br /&gt;
IS&lt;br /&gt;
&amp;nbsp; PROCEDURE XX_FND_COPY_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_MODE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN NUMBER DEFAULT 0);&lt;br /&gt;
&amp;nbsp; -- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; PROCEDURE COPY_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER);&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE DISABLE_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER); &lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE ENABLE_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER); &lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE DISABLE_USER_ALL_RESP(I_USER_ID &amp;nbsp; IN NUMBER);&lt;br /&gt;
END XX_FND_USER_RESP_PKG;&lt;br /&gt;
&lt;br /&gt;
/*PACKAGE BODY*/&lt;br /&gt;
&lt;br /&gt;
CREATE OR REPLACE PACKAGE BODY XX_FND_USER_RESP_PKG&lt;br /&gt;
IS&lt;br /&gt;
&amp;nbsp; PROCEDURE XX_FND_COPY_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_MODE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN NUMBER DEFAULT 0)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /*&lt;br /&gt;
&amp;nbsp; &amp;nbsp; When &amp;nbsp; &amp;nbsp; Who &amp;nbsp; &amp;nbsp; &amp;nbsp; What&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ===============================&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 20130313 WenShen &amp;nbsp; Created for 複製某人權限至另一人&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; 說明 :&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 1. I_MODE : 權限複製規則&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 : 只新增短少的權限,但不將即有卻失效的權限予以復權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 : 新增短少的權限,且將即有卻失效的權限予以復權(且不影其它即有的權限)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 : 完整複製,將原有權限全數失效後再執行I_MODE 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; */&lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF I_MODE = 0 THEN &amp;nbsp;--只新增短少的權限,但不將即有卻失效的權限予以復權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --新增短少的權限&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; COPY_USER_RESP(I_FROM_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ELSIF I_MODE = 1 THEN --新增短少的權限,且將即有卻失效的權限予以復權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --Step 1. 新增短少的權限&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; COPY_USER_RESP(I_FROM_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --Step 2. 依來源USER權限設定將目標USER的權限的予以復權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ENABLE_USER_RESP(I_FROM_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ELSIF I_MODE = 2 THEN --完整複製,將原有權限全數失效後再執行I_MODE 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --Step 1. 將所有權限予以停權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DISABLE_USER_ALL_RESP(I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --Step 2. 新增短少的權限&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; COPY_USER_RESP(I_FROM_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --Step 3. 依來源USER權限設定將目標USER的權限的予以復權&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ENABLE_USER_RESP(I_FROM_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE COPY_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_AP_ID &amp;nbsp; &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_RESP_ID NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --來源者權限表&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CURSOR C_F_RESP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_KEY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_USER_RESP_GROUPS_DIRECT FUR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FR.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND (FR.END_DATE IS NULL OR FR.END_DATE &amp;gt;= SYSDATE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE (FUR.END_DATE IS NULL OR FUR.END_DATE &amp;gt;= SYSDATE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND NOT EXISTS (SELECT &#39;X&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM FND_USER_RESP_GROUPS_DIRECT FUR2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE FUR2.USER_ID = I_TO_USER_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND FUR2.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID) --已存在不重覆轉&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR.USER_ID = I_FROM_USER_ID; --來源對象&lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FOR C1 IN C_F_RESP LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --取得RESP資訊&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FR.APPLICATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_AP_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FR.RESPONSIBILITY_KEY = C1.RESPONSIBILITY_KEY; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --CALL API&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FND_USER_RESP_GROUPS_API.INSERT_ASSIGNMENT(USER_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; I_TO_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_APPLICATION_ID =&amp;gt; T_AP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SECURITY_GROUP_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;START_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; TRUNC(SYSDATE),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; NULL,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DESCRIPTION &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COMMIT; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION WHEN OTHERS THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END LOOP;&lt;br /&gt;
&amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE DISABLE_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_AP_ID &amp;nbsp; &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_RESP_ID &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_END_DATE DATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --來源者權限表&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CURSOR C_F_RESP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_KEY,FUR2.START_DATE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_USER_RESP_GROUPS_DIRECT FUR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FR.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_USER_RESP_GROUPS_DIRECT FUR2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FUR2.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR2.USER_ID = I_TO_USER_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FUR.END_DATE &amp;lt; SYSDATE --已失效的部分&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR.USER_ID = I_FROM_USER_ID; --來源對象&lt;br /&gt;
&amp;nbsp; BEGIN &lt;br /&gt;
&amp;nbsp; &amp;nbsp; FOR C1 IN C_F_RESP LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --取得RESP資訊&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FR.APPLICATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_AP_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FR.RESPONSIBILITY_KEY = C1.RESPONSIBILITY_KEY; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; IF C1.START_DATE IS NOT NULL THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF C1.START_DATE &amp;gt; SYSDATE THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T_END_DATE := C1.START_DATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T_END_DATE := SYSDATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FND_USER_RESP_GROUPS_API.UPDATE_ASSIGNMENT(USER_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; I_TO_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_APPLICATION_ID =&amp;gt; T_AP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SECURITY_GROUP_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;START_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; C1.START_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; T_END_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DESCRIPTION &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; NULL); &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION WHEN OTHERS THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END LOOP; &lt;br /&gt;
&amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE ENABLE_USER_RESP(I_FROM_USER_ID &amp;nbsp; IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TO_USER_ID &amp;nbsp; &amp;nbsp; IN NUMBER) &lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_AP_ID &amp;nbsp; &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_RESP_ID NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --來源者權限表&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CURSOR C_F_RESP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_KEY,FUR2.START_DATE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_USER_RESP_GROUPS_DIRECT FUR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FR.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_USER_RESP_GROUPS_DIRECT FUR2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FUR2.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR2.USER_ID = I_TO_USER_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE (FUR.END_DATE IS NULL OR FUR.END_DATE &amp;gt;= SYSDATE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR.USER_ID = I_FROM_USER_ID; --來源對象 &lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FOR C1 IN C_F_RESP LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --取得RESP資訊&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FR.APPLICATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_AP_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FR.RESPONSIBILITY_KEY = C1.RESPONSIBILITY_KEY; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FND_USER_RESP_GROUPS_API.UPDATE_ASSIGNMENT(USER_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; I_TO_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_APPLICATION_ID =&amp;gt; T_AP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SECURITY_GROUP_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;START_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; C1.START_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; NULL,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DESCRIPTION &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; NULL); &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION WHEN OTHERS THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END LOOP; &lt;br /&gt;
&amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; PROCEDURE DISABLE_USER_ALL_RESP(I_USER_ID &amp;nbsp; IN NUMBER)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_AP_ID &amp;nbsp; &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_RESP_ID &amp;nbsp;NUMBER;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_END_DATE DATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --來源者權限表&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CURSOR C_F_RESP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_KEY,FUR.START_DATE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_USER_RESP_GROUPS_DIRECT FUR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON FR.RESPONSIBILITY_ID = FUR.RESPONSIBILITY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE (FUR.END_DATE IS NULL OR FUR.END_DATE &amp;gt;= SYSDATE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FUR.USER_ID = I_USER_ID; --來源對象 &lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FOR C1 IN C_F_RESP LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --取得RESP資訊&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FR.RESPONSIBILITY_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FR.APPLICATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_AP_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_RESPONSIBILITY FR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FR.RESPONSIBILITY_KEY = C1.RESPONSIBILITY_KEY; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; IF C1.START_DATE IS NOT NULL THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF C1.START_DATE &amp;gt; SYSDATE THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T_END_DATE := C1.START_DATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; T_END_DATE := SYSDATE;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END IF; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FND_USER_RESP_GROUPS_API.UPDATE_ASSIGNMENT(USER_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; I_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; T_RESP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RESPONSIBILITY_APPLICATION_ID =&amp;gt; T_AP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SECURITY_GROUP_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 0,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;START_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; C1.START_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END_DATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; T_END_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DESCRIPTION &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; NULL); &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION WHEN OTHERS THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END LOOP; &lt;br /&gt;
&amp;nbsp; END;&lt;br /&gt;
END XX_FND_USER_RESP_PKG;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;/*使用說明&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; :*/&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;begin&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; XX_fnd_user_resp_pkg.hpx_fnd_copy_user_resp(i_from_user_id
=&amp;gt; :i_from_user_id, &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings;&quot;&gt;ç&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; A&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;使用者&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;USER ID&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i_to_user_id
=&amp;gt; :i_to_user_id, &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings;&quot;&gt;ç&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; B&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;使用者&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;USER ID&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i_mode
=&amp;gt; :i_mode); &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings;&quot;&gt;ç&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;複製規則&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;如下說明&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;end; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;I_MODE
: &lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;權限複製規則&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
0 : &lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;只新增使用者&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;B&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;短少的權限&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;但不將即有卻失效的權限予以復權&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
1 : &lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;新增使用者&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;B&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;短少的權限&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;且將即有但失效的權限予以復權&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;(&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;且不影使用者&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;B&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;較使用者&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;A&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;多的權限&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
2 : &lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;完整複製&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;,&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;將使用者&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;B&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;background: white; color: red; font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;; mso-highlight: white;&quot;&gt;原有權限全數失效後再執行&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: white; color: red; font-family: &amp;quot;Courier New&amp;quot;; mso-highlight: white;&quot;&gt;I_MODE 2&lt;/span&gt;&lt;/i&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;新細明體&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/4943814424772832714/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-how-to-grant-privileges.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4943814424772832714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4943814424772832714'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/03/oracle-erp-r12-how-to-grant-privileges.html' title='Oracle ERP R12. - 如何快速複製使用者權限 , How to grant privileges from one user to another user ?'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-5424699764804269358</id><published>2013-02-07T01:22:00.001-08:00</published><updated>2013-02-07T01:22:02.885-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle DBA"/><title type='text'>Oracle DBA - ORA-01591 lock held by in-doubt distributed transaction</title><content type='html'>ORA-01591&lt;br /&gt;
&lt;br /&gt;
Step 1. Select &#39;Rollback force &#39;&#39;&#39;||local_tran_id||&#39;&#39;&#39;&#39; from sys.pending_trans$;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Find out the local_tran_id.&lt;br /&gt;
Step 2. Try to commit or rollback.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rollback force LOCAL_TRAN_ID;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; commit force LOCAL_TRAN_ID;&lt;br /&gt;
Step 3. If still error . then log in use sys and execute :&lt;br /&gt;
set transaction use rollback segment system;    &lt;br /&gt;delete from dba_2pc_pending where local_tran_id = LOCAL_TRAN_ID;    &lt;br /&gt;delete from pending_sessions$ where local_tran_id = LOCAL_TRAN_ID;    &lt;br /&gt;delete from pending_sub_sessions$ where local_tran_id = LOCAL_TRAN_ID;    &lt;br /&gt;commit;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;rollback force LOCAL_TRAN_ID; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/5424699764804269358/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/02/oracle-dba-ora-01591-lock-held-by-in.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5424699764804269358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5424699764804269358'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/02/oracle-dba-ora-01591-lock-held-by-in.html' title='Oracle DBA - ORA-01591 lock held by in-doubt distributed transaction'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-656493630341503213</id><published>2013-02-04T16:50:00.001-08:00</published><updated>2013-02-04T16:50:26.377-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Cost"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle INV"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle WIP"/><title type='text'>Oracle ERP R12. CST_INVALID_WIP (The wip entity is either not defined or does not have a period balance entry.) - Discrete Job</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;Cause :&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;Records not found in WIP_PERIOD_BALANCES&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;(該工單於WIP_PERIOD_BALANCES裡，少了該交易期間的資料)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;Solution :&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;I. Normally, when there are records in MTL_MATERIAL_TRANSACTIONS with the　Costed_Flag = &#39;E&#39; you would resubmit these records by doing the following :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; （一般而言，若MMT裡有發現COSTED_FLAG=E時，正常異常排除的步驟如下）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; a. Backup the rows to be updated.　（將資料備份下來）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; b. Turn off the Cost Manager.　（先暫停Cost Manager，以避免干擾接下來要執行的步驟）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; c. Run the SQL statement:　（執行以下SQL）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: yellow; color: blue;&quot;&gt;UPDATE MTL_MATERIAL_TRANSACTIONS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET costed_flag &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &#39;N&#39;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error_code &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = NULL,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error_explanation &amp;nbsp; &amp;nbsp;= NULL,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transaction_group_id = NULL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE organization_id =&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and transaction_source_id =&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and costed_flag IS NOT NULL;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;II. When this does not work, it is usually due to one or more of the following three conditions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; (若異常狀況仍存在，則可以是以下原因造成)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;* Item costs are not defined for Frozen cost type in CST_ITEM_COSTS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;　　（CST_ITEM_COSTS沒有該品號的Frozen cost）&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;==&amp;gt; 請補建Item Cost 並Copy cost至Forezen cost&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;* WIP_PERIOD_BALANCES is missing rows for the acct_period_id.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;　　 (該工單於WIP_PERIOD_BALANCES缺少該期間的餘額資料)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;==&amp;gt; 請於&lt;/span&gt;&lt;span style=&quot;background-color: yellow; color: blue;&quot;&gt;WIP_PERIOD_BALANCES補該筆工單該Period的資料&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; NOTE: &amp;nbsp;THIS DOES NOT APPLY TO CLOSED DISCRETE JOBS WDJ.STATUS_TYPE = 12&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; (注意 : 該動作不適用於Closed的工單)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/656493630341503213/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/02/oracle-erp-r12-cstinvalidwip-wip-entity.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/656493630341503213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/656493630341503213'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/02/oracle-erp-r12-cstinvalidwip-wip-entity.html' title='Oracle ERP R12. CST_INVALID_WIP (The wip entity is either not defined or does not have a period balance entry.) - Discrete Job'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-5240131779849811459</id><published>2013-01-31T00:18:00.004-08:00</published><updated>2013-01-31T00:20:31.421-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle BOM"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><title type='text'>Oracle ERP R12. 使用interface批量變更品號的operation code . (Mass changes item&#39;s operation code use BOM_OP_SEQUENCES_INTERFACE. )</title><content type='html'>Sample code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DECLARE&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; T_OLD_OP VARCHAR2(10) := &#39;2T02&#39;; &amp;nbsp;--**** old operation code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; T_NEW_OP VARCHAR2(10) := &#39;2S02&#39;; --**** new operation code&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; T_NEW_OP_ID NUMBER;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; T_ORGANIZATION_ID NUMBER := 85; --organization id&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; T_DISABLE_DATE DATE := SYSDATE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; T_EFFECT_DATE DATE := SYSDATE+1/86400; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;CURSOR C_LIST &amp;nbsp;--item list ==&amp;gt; user define&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; SELECT &lt;span style=&quot;background-color: yellow;&quot;&gt;D.ORGANIZATION_ID,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;D.INVENTORY_ITEM_ID,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A.ROUTING_SEQUENCE_ID,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B.OPERATION_SEQUENCE_ID,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B.OPERATION_SEQ_NUM,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C.STANDARD_OPERATION_ID&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FROM BOM_OPERATIONAL_ROUTINGS A&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JOIN BOM_OPERATION_SEQUENCES_V B--BOM_OPERATION_SEQUENCES B&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ON A.COMMON_ROUTING_SEQUENCE_ID = B.ROUTING_SEQUENCE_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; LEFT JOIN BOM_STANDARD_OPERATIONS C&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ON B.STANDARD_OPERATION_ID = C.STANDARD_OPERATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JOIN MTL_SYSTEM_ITEMS_B D&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ON A.ORGANIZATION_ID = D.ORGANIZATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AND A.ASSEMBLY_ITEM_ID = D.INVENTORY_ITEM_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JOIN BOM_DEPARTMENTS F&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ON F.DEPARTMENT_ID = B.DEPARTMENT_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AND F.ORGANIZATION_ID = A.ORGANIZATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp;WHERE A.ORGANIZATION_ID = T_ORGANIZATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AND C.OPERATION_CODE = T_OLD_OP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AND (B.DISABLE_DATE IS NULL OR&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B.DISABLE_DATE &amp;gt;= SYSDATE);&lt;br /&gt;
BEGIN&lt;br /&gt;
&amp;nbsp; --Find the new operation id&lt;br /&gt;
&amp;nbsp; SELECT BSO.STANDARD_OPERATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; INTO T_NEW_OP_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FROM BOM_STANDARD_OPERATIONS BSO&lt;br /&gt;
&amp;nbsp; &amp;nbsp;WHERE BSO.ORGANIZATION_ID = T_ORGANIZATION_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AND BSO.OPERATION_CODE = T_NEW_OP;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; FOR C1 IN C_LIST LOOP &lt;br /&gt;
&amp;nbsp; &amp;nbsp; --STEP 1. Disable old operation&lt;br /&gt;
&amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO BOM_OP_SEQUENCES_INTERFACE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; (ASSEMBLY_ITEM_ID, &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORGANIZATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ROUTING_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OPERATION_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DISABLE_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TRANSACTION_TYPE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PROCESS_FLAG,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BATCH_ID)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(C1.INVENTORY_ITEM_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.ORGANIZATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.ROUTING_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.OPERATION_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_DISABLE_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;Update&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; --STEP 2. Add new operation&lt;br /&gt;
&amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO BOM_OP_SEQUENCES_INTERFACE(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ASSEMBLY_ITEM_ID, &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORGANIZATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ROUTING_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OPERATION_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OPERATION_SEQ_NUM, &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;EFFECTIVITY_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STANDARD_OPERATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;REFERENCE_FLAG,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TRANSACTION_TYPE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PROCESS_FLAG,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BATCH_ID)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(C1.INVENTORY_ITEM_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.ORGANIZATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.ROUTING_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.OPERATION_SEQUENCE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C1.OPERATION_SEQ_NUM,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_EFFECT_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T_NEW_OP_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;Create&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; END LOOP;&lt;br /&gt;
END;&lt;br /&gt;
&lt;br /&gt;
Step 3. Run BOM &amp;amp; Routing Import (Bill and Routing Interface) ==&amp;gt; &lt;span style=&quot;background-color: yellow;&quot;&gt;batch id is set to 1&lt;/span&gt; (For disable old operation code)&lt;br /&gt;
&lt;br /&gt;
Step 4. Run BOM &amp;amp; Routing Import (Bill and Routing Interface) ==&amp;gt; &lt;span style=&quot;background-color: yellow;&quot;&gt;batch id is set to 2 &lt;/span&gt;(For add new operation code)</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/5240131779849811459/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-interfaceoperation-code.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5240131779849811459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/5240131779849811459'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-interfaceoperation-code.html' title='Oracle ERP R12. 使用interface批量變更品號的operation code . (Mass changes item&#39;s operation code use BOM_OP_SEQUENCES_INTERFACE. )'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-3660583576800684801</id><published>2013-01-29T16:50:00.003-08:00</published><updated>2013-01-31T00:20:59.586-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle PO"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle RCV"/><title type='text'>Oracle ERP R12. Receiving Transaction can not find the RT number .</title><content type='html'>&lt;br /&gt;
Receipt number(RT No.) can not find the experience to share with you in this.&lt;br /&gt;
If you are sure that points to receipt also learned that the receipt number(RT No.), but acceptance and delivery can not be found the receipt number(RT No.) in the Receiving Transaction Function.&amp;nbsp;&lt;span style=&quot;background-color: yellow; color: blue;&quot;&gt;&lt;b&gt;Please check the RCV_TRANSACTIONS_INTERFACE&amp;nbsp;&lt;/b&gt;&lt;/span&gt;, and if so, then in the confirmation after such interface delete. After re-entering the Receiving Transaction should be able to find the receipt number (RT No.).&lt;br /&gt;
The Function of Receiving Transaction Receipt Number LOV will exclude the Interface are still part of the data, in order to ensure that the data would not have repeated transactions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
在這跟各位分享一下收料單找不到的經驗。&lt;br /&gt;
若你確定已進行點收也得知收料單，但是卻在Receiving Transaction該Function裡找不到該收料點進行驗收及入庫動作時。 &lt;span style=&quot;color: blue;&quot;&gt;&lt;b style=&quot;background-color: yellow;&quot;&gt;請檢查RCV_TRANSACTIONS_INTERFACE 是否有該收料單Pending的資料&lt;/b&gt;&lt;/span&gt;， 若有則在確認後將該筆interface刪除。之後再進入Receiving Transaction就應該可以找到該收料點了。&lt;br /&gt;
因為Receiving Transaction該Function的Receipt Number LOV會排除掉Interface尚有資料的部分，以確保同一筆資料不會有重覆的交易。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/3660583576800684801/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-receiving-transaction.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3660583576800684801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/3660583576800684801'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-receiving-transaction.html' title='Oracle ERP R12. Receiving Transaction can not find the RT number .'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-7941851848117181</id><published>2013-01-14T00:23:00.002-08:00</published><updated>2013-01-31T00:21:20.373-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle OM"/><title type='text'>Oracle ERP R12. Delivery is closed but SO Line status is &#39;Picked&#39;.</title><content type='html'>今天User反應一狀況，其表示有一筆Delivery 已做Ship Confirm ，而且Delivery 的狀態也是呈現Closed ，但是訂單項次(SO Line)的Status卻仍停在Picked !&lt;br /&gt;
&lt;br /&gt;
解法如下 (執行Interface Trip Stop - SRS):&lt;br /&gt;
OM Module =&amp;gt; Shipping =&amp;gt; Interface =&amp;gt; Run =&amp;gt;&amp;nbsp;Interface Trip Stop - SRS&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/7941851848117181/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-delivery-is-closed-but.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7941851848117181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7941851848117181'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-delivery-is-closed-but.html' title='Oracle ERP R12. Delivery is closed but SO Line status is &#39;Picked&#39;.'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-4674064296320434542</id><published>2013-01-13T18:51:00.002-08:00</published><updated>2013-01-13T18:51:38.780-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><title type='text'>Oracle ERP R12. How to use the interface tables update attribute to null?</title><content type='html'>&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;一般而言透過interface table匯入資料時,其欄位值若為空值(null),則代表該欄位不匯入,也就是不會去動該欄位.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;故若該欄位原本有資料,也不會將其清空為空值(null).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;但若需要透過interface table來將該欄位值清空,那要怎麼做呢?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;其實很簡單,方法如下:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;1. 若為數字欄位,則輸入 -999999&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;2. 若為文字欄位,則輸入 &quot;!&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;====================================&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;If a field for numeric fields, fill -999999.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 23px;&quot;&gt;If a field for character fields, fill &quot;!&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/4674064296320434542/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-how-to-use-interface.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4674064296320434542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4674064296320434542'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-how-to-use-interface.html' title='Oracle ERP R12. How to use the interface tables update attribute to null?'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-2345020398418176999</id><published>2013-01-07T17:25:00.000-08:00</published><updated>2013-01-31T00:22:04.264-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle OM"/><title type='text'>Oracle ERP R12. Add SO_SHORTTEXT with FND_DOCUMENTS_PKG (API)</title><content type='html'>&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;以下程式碼範例是用來在SO (訂單)裡加入附件迴紋針說明的用法,分享給各位讀者.&lt;/span&gt;該範例是例用SHORTTEXT來紀錄訂單的正面&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;麥頭及側面&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;麥頭&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;CREATE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;PROCEDURE SO_SHORTTEXT(I_ORG_ID IN NUMBER,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_HEADER_ID &amp;nbsp; &amp;nbsp;IN NUMBER,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TITLE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN VARCHAR2, --PGM_NAME&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_DESCRIPTION &amp;nbsp; &amp;nbsp; IN VARCHAR2, --TITLE DESCRIPTION&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IN VARCHAR2,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_DOCUMENT_ID &amp;nbsp; &amp;nbsp; OUT NUMBER,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_ATTACHED_DOC_ID OUT NUMBER,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_MEDIA_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OUT NUMBER)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; IS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; T_ROWID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROWID;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; T_SEQ_NUM NUMBER; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; T_FND_USER_ID NUMBER := 0; --DEFAULT SYSADMIN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;T_SHORT_DATATYPE_ID NUMBER := 1; --SHORT_TEXT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: yellow; line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; T_CATEGORY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; NUMBER := 326; --Documents&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; T_EXISTS VARCHAR2(10);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; BEGIN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; FND_PROFILE.GET(&#39;USER_ID&#39;,T_FND_USER_ID);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; IF T_FND_USER_ID IS NULL THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID := 0;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; SELECT DECODE(COUNT(*),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0,&#39;N&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Y&#39;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_EXISTS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM HPX_OE_ORDER_MARK_V HOOM&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE HOOM.HEADER_ID = I_HEADER_ID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND HOOM.ORG_ID = I_ORG_ID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;AND HOOM.DOCUMENT_DESCRIPTION = I_TITLE;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; IF I_TITLE = &#39;訂單正麥&#39; THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_SEQ_NUM := 10;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; ELSIF I_TITLE = &#39;訂單側麥&#39; THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_SEQ_NUM := 20;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT NVL(MAX(FAD.SEQ_NUM),0)+1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_SEQ_NUM&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_ATTACHED_DOCUMENTS FAD&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE 1=1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;AND FAD.PK1_VALUE = TO_CHAR(I_HEADER_ID);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; IF T_EXISTS = &#39;N&#39; THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_DOCUMENTS_PKG.INSERT_ROW&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_Rowid =&amp;gt; T_ROWID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_document_id =&amp;gt; O_DOCUMENT_ID, &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_creation_date =&amp;gt; SYSDATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_created_by =&amp;gt; T_FND_USER_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_last_update_date =&amp;gt; SYSDATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_last_updated_by =&amp;gt; T_FND_USER_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_datatype_id =&amp;gt; T_SHORT_DATATYPE_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_create_doc =&amp;gt; &#39;Y&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_category_id =&amp;gt; T_CATEGORY_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_security_type =&amp;gt; 4,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_security_id =&amp;gt; NULL,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_description =&amp;gt; I_DESCRIPTION,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_media_id =&amp;gt; O_MEDIA_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_title =&amp;gt; I_TITLE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_language =&amp;gt; &#39;US&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_publish_flag =&amp;gt; &#39;N&#39;, --This flag allow the file to share across multiple organization&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; X_usage_type =&amp;gt; &#39;O&#39;); --O:可被修改 / S:不能修改&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT MAX(HOOM.media_id)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO O_MEDIA_ID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM HPX_OE_ORDER_MARK_V HOOM&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE HOOM.HEADER_ID = I_HEADER_ID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND HOOM.ORG_ID = I_ORG_ID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;AND HOOM.DOCUMENT_DESCRIPTION = I_TITLE;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; END IF; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; -- &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; IF O_MEDIA_ID IS NOT NULL AND T_EXISTS = &#39;N&#39; THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;INSERT INTO FND_DOCUMENTS_SHORT_TEXT&lt;/span&gt;(MEDIA_ID,SHORT_TEXT)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(O_MEDIA_ID,I_TEXT);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FND_ATTACHED_DOCUMENTS_S.NEXTVAL&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO O_ATTACHED_DOC_ID&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DUAL;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO FND_ATTACHED_DOCUMENTS(&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ATTACHED_DOCUMENT_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DOCUMENT_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATION_DATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATED_BY,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATE_DATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATED_BY,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SEQ_NUM,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ENTITY_NAME,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; PK1_VALUE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AUTOMATICALLY_ADDED_FLAG,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CATEGORY_ID)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; O_ATTACHED_DOC_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; O_DOCUMENT_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_SEQ_NUM,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;OE_ORDER_HEADERS&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; TO_CHAR(I_HEADER_ID),&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;N&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; T_CATEGORY_ID); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; ELSIF T_EXISTS = &#39;Y&#39; THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; UPDATE FND_DOCUMENTS_SHORT_TEXT FST&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET FST.SHORT_TEXT = I_TEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FST.MEDIA_ID = O_MEDIA_ID;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; UPDATE FND_DOCUMENTS FD&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET FD.USAGE_TYPE = &#39;O&#39; --O:可被修改 / S:不能修改&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE FD.MEDIA_ID = O_MEDIA_ID;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; END IF;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp; END; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/2345020398418176999/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-soshorttext-with.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/2345020398418176999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/2345020398418176999'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-soshorttext-with.html' title='Oracle ERP R12. Add SO_SHORTTEXT with FND_DOCUMENTS_PKG (API)'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-4537172238489478707</id><published>2013-01-07T17:11:00.007-08:00</published><updated>2013-01-31T00:22:21.157-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle PO"/><title type='text'>Oracle ERP R12. Add PO_SHORTTEXT with FND_DOCUMENTS_PKG (API)</title><content type='html'>以下程式碼範例是用來在PO (採購單)裡加入附件迴紋針說明的用法,分享給各位讀者:&lt;br /&gt;
&lt;br /&gt;
Create&amp;nbsp;PROCEDURE PO_SHORTTEXT(I_ORGANIZATION_ID IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_PO_HEADER_ID &amp;nbsp; &amp;nbsp;IN NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TITLE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN VARCHAR2, --PGM_NAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_DESCRIPTION &amp;nbsp; &amp;nbsp; IN VARCHAR2, --TITLE DESCRIPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IN VARCHAR2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_DOCUMENT_ID &amp;nbsp; &amp;nbsp; OUT NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_ATTACHED_DOC_ID OUT NUMBER,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_MEDIA_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OUT NUMBER)&lt;br /&gt;
&amp;nbsp; IS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_ROWID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROWID;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_SEQ_NUM NUMBER; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; T_FND_USER_ID NUMBER := 0; --DEFAULT SYSADMIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;T_SHORT_DATATYPE_ID NUMBER := 1; --SHORT_TEXT&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;T_CATEGORY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; NUMBER := 1000504; --Documents&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_PROFILE.GET(&#39;USER_ID&#39;,T_FND_USER_ID);&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT A.CATEGORY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_CATEGORY_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_DOCUMENT_CATEGORIES_TL A&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE A.&lt;span style=&quot;background-color: yellow;&quot;&gt;USER_NAME = &#39;Documents&#39;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF T_FND_USER_ID IS NULL THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID := 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT NVL(MAX(FAD.SEQ_NUM),0)+1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_SEQ_NUM&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_ATTACHED_DOCUMENTS FAD&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE 1=1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND &lt;span style=&quot;background-color: yellow;&quot;&gt;FAD.PK1_VALUE = TO_CHAR(I_PO_HEADER_ID); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_DOCUMENTS_PKG.INSERT_ROW&lt;/span&gt;(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_Rowid =&amp;gt; T_ROWID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_document_id =&amp;gt; O_DOCUMENT_ID, &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_creation_date =&amp;gt; SYSDATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_created_by =&amp;gt; T_FND_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_last_update_date =&amp;gt; SYSDATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_last_updated_by =&amp;gt; T_FND_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_datatype_id =&amp;gt; T_SHORT_DATATYPE_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_create_doc =&amp;gt; &#39;Y&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_category_id =&amp;gt; T_CATEGORY_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_security_type =&amp;gt; 1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_security_id =&amp;gt; I_ORGANIZATION_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_description =&amp;gt; I_DESCRIPTION,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_media_id =&amp;gt; O_MEDIA_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_title =&amp;gt; I_TITLE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_language =&amp;gt; &#39;US&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_publish_flag =&amp;gt; &#39;N&#39;, --This flag allow the file to share across multiple organization&lt;br /&gt;
&amp;nbsp; &amp;nbsp; X_usage_type =&amp;gt; &#39;S&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IF O_MEDIA_ID IS NOT NULL THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;INSERT INTO FND_DOCUMENTS_SHORT_TEXT&lt;/span&gt;(MEDIA_ID,SHORT_TEXT)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(O_MEDIA_ID,I_TEXT);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_ATTACHED_DOCUMENTS_S.NEXTVAL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO O_ATTACHED_DOC_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DUAL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;INSERT INTO FND_ATTACHED_DOCUMENTS&lt;/span&gt;(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ATTACHED_DOCUMENT_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DOCUMENT_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATION_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATED_BY,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATE_DATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATED_BY,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SEQ_NUM,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ENTITY_NAME,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; PK1_VALUE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; AUTOMATICALLY_ADDED_FLAG,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CATEGORY_ID)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O_ATTACHED_DOC_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O_DOCUMENT_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_SEQ_NUM,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;PO_HEADERS&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; TO_CHAR(I_PO_HEADER_ID),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;N&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_CATEGORY_ID); &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;br /&gt;
&amp;nbsp; END;</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/4537172238489478707/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-with-poshorttext.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4537172238489478707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/4537172238489478707'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-with-poshorttext.html' title='Oracle ERP R12. Add PO_SHORTTEXT with FND_DOCUMENTS_PKG (API)'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-7861350124889054459</id><published>2013-01-07T17:00:00.003-08:00</published><updated>2013-01-31T00:22:39.367-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle WIP"/><title type='text'>Oracle ERP R12. Add WIP_ENTITY ATTACHMENTS with FND_DOCUMENTS_PKG (API)</title><content type='html'>以下程式碼範例是用來在WIP_ENTITY (工單)裡加入附件迴紋針說明的用法,分享給各位讀者:&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&amp;nbsp;CREATE PROCEDURE WO_SHORTTEXT(I_ORGANIZATION_ID IN NUMBER,&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_WIP_ENTITY_ID &amp;nbsp; IN NUMBER,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TITLE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IN VARCHAR2, --PGM_NAME&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_DESCRIPTION &amp;nbsp; &amp;nbsp; IN VARCHAR2, --TITLE DESCRIPTION&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I_TEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IN VARCHAR2,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_DOCUMENT_ID &amp;nbsp; &amp;nbsp; OUT NUMBER,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_ATTACHED_DOC_ID OUT NUMBER,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;O_MEDIA_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OUT NUMBER)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; IS&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 說明 :&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 1. 輸入參數&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; I_ORGANIZATION_ID&amp;nbsp;==&amp;gt; ORGANIZATION_ID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I_WIP_ENTITY_ID &amp;nbsp;&amp;nbsp;==&amp;gt; 工單的WIP_ENTITY_ID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I_TITLE ==&amp;gt; 迴紋針的Title&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;I_DESCRIPTION &amp;nbsp; ==&amp;gt; 迴紋針的說明&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; I_TEXT ==&amp;gt; 欲附加的文字內容&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 2. 輸出變數&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O_DOCUMENT_ID /&amp;nbsp;O_ATTACHED_DOC_ID /&amp;nbsp;O_MEDIA_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; */&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; T_ROWID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ROWID;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; T_SEQ_NUM NUMBER; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; T_FND_USER_ID NUMBER := 0; --DEFAULT SYSADMIN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; T_SHORT_DATATYPE_ID NUMBER := 1; --SHORT_TEXT&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;T_CATEGORY_ID &amp;nbsp; &amp;nbsp; &amp;nbsp; NUMBER := 6; --WIP Job/Schedule Attachments&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; BEGIN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_PROFILE.GET(&#39;USER_ID&#39;,T_FND_USER_ID); --初始化環境變數&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; --找出工單的CATEGORY ID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; SELECT A.CATEGORY_ID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_CATEGORY_ID&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_DOCUMENT_CATEGORIES A&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE A.NAME =&lt;span style=&quot;background-color: yellow;&quot;&gt; &#39;WIP_ENTITY_ATTACHMENTS&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; --&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; IF T_FND_USER_ID IS NULL THEN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID := 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; --找出目前最後一個的文件序號再加一為新增的文件序號&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; SELECT NVL(MAX(FAD.SEQ_NUM),0)+1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INTO T_SEQ_NUM&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM FND_ATTACHED_DOCUMENTS FAD&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE 1=1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;AND FAD.PK1_VALUE = TO_CHAR(I_WIP_ENTITY_ID)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND FAD.PK2_VALUE = TO_CHAR(I_ORGANIZATION_ID)&lt;/span&gt;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; --呼叫API&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt; FND_DOCUMENTS_PKG.INSERT_ROW&lt;/span&gt;(&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_Rowid =&amp;gt; T_ROWID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_document_id =&amp;gt; O_DOCUMENT_ID, &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_creation_date =&amp;gt; SYSDATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_created_by =&amp;gt; T_FND_USER_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_last_update_date =&amp;gt; SYSDATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_last_updated_by =&amp;gt; T_FND_USER_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_datatype_id =&amp;gt; T_SHORT_DATATYPE_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_create_doc =&amp;gt; &#39;Y&#39;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_category_id =&amp;gt; T_CATEGORY_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_security_type =&amp;gt; 1,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_security_id =&amp;gt; I_ORGANIZATION_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_description =&amp;gt; I_DESCRIPTION,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_media_id =&amp;gt; O_MEDIA_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_title =&amp;gt; I_TITLE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_language =&amp;gt; &#39;US&#39;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_publish_flag =&amp;gt; &#39;N&#39;, --This flag allow the file to share across multiple organization&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; X_usage_type =&amp;gt; &#39;S&#39;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; --&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; IF O_MEDIA_ID IS NOT NULL THEN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --寫入內容&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_DOCUMENTS_SHORT_TEXT&lt;/span&gt;(MEDIA_ID,SHORT_TEXT)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(O_MEDIA_ID,I_TEXT);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT FND_ATTACHED_DOCUMENTS_S.NEXTVAL&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO O_ATTACHED_DOC_ID&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DUAL;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; --建立文件內容與迴紋針的關聯&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO &lt;span style=&quot;background-color: yellow;&quot;&gt;FND_ATTACHED_DOCUMENTS&lt;/span&gt;(&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ATTACHED_DOCUMENT_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DOCUMENT_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATION_DATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CREATED_BY,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATE_DATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LAST_UPDATED_BY,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SEQ_NUM,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ENTITY_NAME,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; PK1_VALUE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; PK2_VALUE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; AUTOMATICALLY_ADDED_FLAG,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CATEGORY_ID)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O_ATTACHED_DOC_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; O_DOCUMENT_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SYSDATE,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_FND_USER_ID,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_SEQ_NUM,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;WIP_DISCRETE_JOBS&#39;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; TO_CHAR(I_WIP_ENTITY_ID),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; TO_CHAR(I_ORGANIZATION_ID),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;N&#39;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; T_CATEGORY_ID); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; END IF;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; END;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/7861350124889054459/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-wipentity.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7861350124889054459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/7861350124889054459'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-add-wipentity.html' title='Oracle ERP R12. Add WIP_ENTITY ATTACHMENTS with FND_DOCUMENTS_PKG (API)'/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3014670900155818228.post-9081100827700798562</id><published>2013-01-04T00:46:00.004-08:00</published><updated>2013-01-31T00:23:01.061-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle ERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle FA"/><title type='text'>Oracle ERP R12. &lt;經驗分享&gt; FA Mass Transfer </title><content type='html'>當公司有同仁離職時,其所保管的固定資產常會用Mass Transfer功能進行大量移轉.&lt;br /&gt;
&lt;br /&gt;
請注意,若執行後出現移轉失敗的情況,請先檢查這二位(離職人員及接數人員)是否已失效.&lt;br /&gt;
&lt;br /&gt;
若&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;b&gt;&lt;u&gt;有任何一方失效都會造成移轉的失敗&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;. 請先將其生效,待其資產移轉完後再行失效.&lt;br /&gt;
&lt;br /&gt;
Ps : 一般常見的是,離職人員已失效所造成的.</content><link rel='replies' type='application/atom+xml' href='http://doggww.blogspot.com/feeds/9081100827700798562/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-fa-mass-transfer.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/9081100827700798562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3014670900155818228/posts/default/9081100827700798562'/><link rel='alternate' type='text/html' href='http://doggww.blogspot.com/2013/01/oracle-erp-r12-fa-mass-transfer.html' title='Oracle ERP R12. &lt;經驗分享&gt; FA Mass Transfer '/><author><name>DogFather</name><uri>http://www.blogger.com/profile/13015267353162671545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>