{"id":1057,"date":"2013-10-07T08:55:25","date_gmt":"2013-10-07T06:55:25","guid":{"rendered":"http:\/\/oracle.malin.pl\/?p=1057"},"modified":"2013-10-07T08:55:36","modified_gmt":"2013-10-07T06:55:36","slug":"ustawianie-wartosci-profili-przez-plsql","status":"publish","type":"post","link":"https:\/\/oracle.malin.pl\/?p=1057","title":{"rendered":"Ustawianie profilu przez pl\/sql"},"content":{"rendered":"<p>Witam,<\/p>\n<p>\u017br\u00f3d\u0142o 943710.1 http:\/\/appsdbastuff.blogspot.com\/2012\/10\/how-to-change-profile-option-value.html<br \/>\n<!--more--><br \/>\nPlease use the API:  FND_PROFILE<br \/>\nThe package FND_PROFILE  can be found in file AFPFPROS.pls<\/p>\n<p>FND_PROFILE.SAVE &#8211; sets the value of a profile option permanently to the database,<br \/>\nat any level. This routine can be used at runtime or during patching.<br \/>\nThis routine will not actually commit the changes; the caller must commit.<br \/>\nThe levels are: 'SITE&#8217;, 'APPL&#8217;, 'RESP&#8217;, or 'USER&#8217;.<\/p>\n<p>Examples of use:<br \/>\nFND_PROFILE.SAVE(&#8217;P_NAME&#8217;, 'P_VAL&#8217;, 'SITE&#8217;);<br \/>\nFND_PROFILE.SAVE(&#8217;P_NAME&#8217;, 'P_VAL&#8217;, 'APPL&#8217;, 321532);<br \/>\nFND_PROFILE.SAVE(&#8217;P_NAME&#8217;, 'P_VAL&#8217;, 'RESP&#8217;, 321532, 345234);<br \/>\nFND_PROFILE.SAVE(&#8217;P_NAME&#8217;, 'P_VAL&#8217;, 'USER&#8217;, 123321);<\/p>\n<p>returns: TRUE if successful, FALSE if failure.<\/p>\n<p>To update a Profile Option value at Site level, you need to run the SQL Script below:<br \/>\nDeclare<br \/>\nvalue Boolean;<br \/>\nBegin<br \/>\nvalue := fnd_profile.save(&#8217;APPS_DATABASE_ID&#8217;,&#8221;,&#8217;SITE&#8217;);<br \/>\nEnd;<\/p>\n<p>Example:<br \/>\n===========<br \/>\nSample Code<br \/>\n===========<br \/>\nDECLARE<br \/>\nstat boolean;<br \/>\nBEGIN<br \/>\ndbms_output.disable;<br \/>\ndbms_output.enable(100000);<br \/>\nstat := FND_PROFILE.SAVE(&#8217;GUEST_USER_PWD&#8217;, 'GUEST\/ORACLE&#8217;, 'SITE&#8217;);<br \/>\nIF stat THEN<br \/>\n    dbms_output.put_line( 'Stat = TRUE &#8211; profile updated&#8217; );<br \/>\nELSE<br \/>\n    dbms_output.put_line( 'Stat = FALSE &#8211; profile NOT updated&#8217; );<br \/>\nEND IF;<br \/>\ncommit;<br \/>\nEND;<br \/>\n===============<br \/>\nEnd of Sample Code<br \/>\n===============<\/p>\n<p>Description of the FND_PROFILE.SAVE function parameters:<br \/>\nFunction SAVE(<br \/>\nX_NAME in varchar2,             \/* Profile name you are setting *\/<br \/>\nX_VALUE in varchar2,            \/* Profile value you are setting *\/<br \/>\nX_LEVEL_NAME in varchar2,       \/* Level that you&#8217;re setting at:<br \/>\n                                   'SITE&#8217;,&#8217;APPL&#8217;,&#8217;RESP&#8217;,&#8217;USER&#8217;, etc. *\/<br \/>\nX_LEVEL_VALUE in varchar2 default NULL,<br \/>\n                                \/* Level value that you are setting at,<br \/>\n                                   e.g. user id for 'USER&#8217; level.<br \/>\n                                   X_LEVEL_VALUE is not used at site level. *\/<br \/>\nX_LEVEL_VALUE_APP_ID in varchar2 default NULL,<br \/>\n                                \/* Used for 'RESP&#8217; and 'SERVRESP&#8217; level;<br \/>\n                                   Resp Application_Id. *\/<br \/>\nX_LEVEL_VALUE2 in varchar2 default NULL<br \/>\n                                \/* 2nd Level value that you are setting at.<br \/>\n                                   This is for the 'SERVRESP&#8217; hierarchy. *\/<br \/>\n) return boolean;<\/p>\n<p>Luko<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Witam, \u017br\u00f3d\u0142o 943710.1 http:\/\/appsdbastuff.blogspot.com\/2012\/10\/how-to-change-profile-option-value.html<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[203],"tags":[204],"_links":{"self":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1057"}],"collection":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1057"}],"version-history":[{"count":2,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1057\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1057\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}