Monday, October 18, 2010
How to incorporate the logic of viewing the concurrent request output from the custom form?
1. Attach FNDCONC.pll file to the custom form.
2. In the WHEN-BUTTON-PRESS trigger of the object in the custom form call the following package
EDITOR_PKG.REPORT(req_id, save_output_flag);
Tuesday, October 5, 2010
Vendors with no Invoices
vendor_name NAME,
vendor_site_code SITE_CODE,
end_date_active VEND_INACTIVE,
inactive_date SITE_INACTIVE
from po_vendors vend,
po_vendor_sites_all sites,
ap_invoices_all inv
where vend.vendor_id = sites.vendor_id
and sites.vendor_site_id = inv.vendor_site_id(+)
and inv.vendor_site_id is null;
Fetch Profile values at different levels
SELECT user_profile_option_name,SUBSTR(e.profile_option_name,1,25) PROFILE
,DECODE(a.level_id,10001,'Site',10002,'Application',10003,'Resp',10004,'User') "Level"
,DECODE(a.level_id,10001,'Site',10002,c.application_short_name,10003,b.responsibility_name,10004,d.user_name) LValue
,NVL(a.profile_option_value,'Is Null') Value
,SUBSTR(a.last_update_date,1,25) UPDATED_DATE
FROM fnd_profile_option_values a
, fnd_responsibility_tl b
, fnd_application c
,fnd_user d
, fnd_profile_options e
, fnd_profile_options_tl f
WHERE 1=1
AND f.user_profile_option_name in ('&User_Profile_Name')
AND e.profile_option_id = a.profile_option_id AND a.level_value = b.responsibility_id (+)
AND a.level_value = c.application_id (+) AND a.level_value = d.user_id (+)
AND f.PROFILE_OPTION_NAME(+)=e.profile_option_name
ORDER BY e.profile_option_name;
Reference
Wednesday, September 29, 2010
Adding New Processing constraint in Order Management
Entity : Choose the entity on which the constraint needs to be applied.
Constraints Block : Define the action or the constraint.
Condition Block : Define the condition upon which the Constraint needs to be fired.
Applicable To Block : Define the responsibilities to which the constrain is applicable.
Validation Template : New template needs to be defined in the Validation template form before attaching the same to the Processing constraint. (Setup : Rules : Security)
Validation Template Type can be of 3 types : API, Workflow or Table
1. API - Type the custom PLSQL package in the Package field and the procedure within the package in the procedure field. The procedure needs to be declared as below
Procedure xx_procedure_name ( p_application_id IN NUMBER,
p_entity_short_name in VARCHAR2,
p_validation_entity_short_name in VARCHAR2,
p_validation_tmplt_short_name in VARCHAR2,
p_record_set_tmplt_short_name in VARCHAR2,
p_scope in VARCHAR2,
p_result OUT NOCOPY NUMBER ) IS
All the IN parameters are passed by the system internally. The OUT parameter accepts two results 1 (TRUE) or 0 (FALSE). Based on the result from the validation Template, the condition is true or false.
2. Workflow : Enter the Item Type, Process Name, Status and the Result expected for the condition to be TRUE.
3. Table Type : Specify the Column Name, the Validation Operator and the string to which the column value needs to be compared to.
Tuesday, July 27, 2010
Wrapping PL/SQL Source Code
You can wrap PL/SQL source code with either the wrap utility or DBMS_DDL subprograms.
Guidelines for Wrapping
Wrap only the body of a package or object type, not the specification
Wrap code only after you have finished editing it.
Wrapped code cannot be unwrapped. To change wrapped PL/SQL code, edit the original source file and then wrap it again.
Limitations of Wrapping
Wrapping does not hide the source code for triggers
Wrapping is not a secure method for hiding passwords
Wrapping does not detect syntax or semantic errors
1. To run the wrap utility
wrap iname=input_file [ oname=output_file ]
2. DBMS_DDL.WRAP
Friday, June 25, 2010
Generating report using Java Concurrent Program
Program Name : CLE: AP Purchasing Ledger Report
Short Name : CLEF224PVR
Java code called : JCP4XDODataEngine.java
Data template attached in Data Definition : CLEF224PVR.xml
RTF Template representing the design : CLEF224PVR.rtf
The java program calls the data template which has the main SQL query. This file is a xml file and it internally also refers to database package. Later this is processed with RTF template to generate the output. Besides check out the java program to know how to write into log file and access concurrent program parameters and other context values.
Wednesday, June 23, 2010
How to create a VPD (Virtual Private Database) Policy on a table or view in 10g
dbms_rls.add_policy('APPS','PO_HEADERS_V','accesscontrol_PO_HEADERS','system','f_policy_po,sec_relevant_cols=>'ORDER_AMOUNT',sec_relevant_cols_opt => dbms_rls.ALL_ROWS);
Parameter 1 - object owner
parameter 2 - Object Table/ View Name
Parameter 3 - Policy Name
parameter 4 - schema of the policy function
Parameter 5 - database function which returns a where clause as string (the function will have the logic to restrict the records to be fetched)
sec_relevant_cols - the column of which the data is restricted from viewing to the user
sec_relevant_cols - setting it to dbms_rls.ALL_ROWS would display all the rows to a user with blank data shown for the restricted column for the records which are non viewable.
Friday, June 18, 2010
How to add a column to LOV in OA Framework?
B. Using personalizations, add a new field to the specific LOV Page. This can be done by using "create new item" in OA Framework Personalizations.
C. Map the new field that was created above to view object column, by specifying the source view object and souce column.
To know more how to Extend VO in OAF click here
How to remove substitution/extension to a VO object in OAF
Option A. Delete personalization, using jdr_util.delete_documents
Alternately use "Functional Administrator" responsibility to delete the personalization
Option B. Disable personalization that corresponds to substitution, again using Functional Administrator
Option C. Set profile "Disable personalization" to Yes at site level
The common thing about all three options above is that they all pertain to removal of personalizations that were created as result of view object substitution in OA Framework.
Wednesday, June 16, 2010
How to check standard VO Object has any extension?
SELECT JA.* FROM JDR_PATHS JP, JDR_ATTRIBUTES JA
WHERE JP.PATH_DOCID = JA.ATT_COMP_DOCID
AND JP.PATH_NAME = 'VO_OBJECT_NAME'
In the attribute name column against customize column you would find the extensions.
Monday, June 14, 2010
Wednesday, May 12, 2010
How to extend OAF Controller
2. Create a new class file by righclicking on the project.
3. Mention the name of the new extended class in Name. The new extended class package in the package. And the original controller class file package in the Extends.
4. After the custom logic is added in the newly extended controller, move the java file to the server, compile the file to generate the class file for the same.
javac
5. Bounce the server.
6. Unlike VO and EO extensions, CO extension will not be called unless the same is mentioned in the OAF personalization. Enable the personalization.
7. Select "Complete View" and "Expand All" Option in personalization page.
8. Mention the extended controller file name in the personalization link of the component. Test now if the extended logic is reflected.
Friday, May 7, 2010
Kool Technology Syntax link
Wednesday, April 28, 2010
XML Publisher - Developing reports printed on Pre-Printed Stationary
Thursday, April 22, 2010
Oracle Apps Query - List of Users to whom a given responsibility is assigned
where sysdate between fur.start_date and nvl(fur.end_date,sysdate)
and sysdate between fu.start_date and nvl(fu.end_date,sysdate)
and fu.user_id = fur.user_id
and fur.responsibility_id = fr.responsibility_id
and fur.responsibility_application_id = fr.application_id
and upper(fr.responsibility_name) = :resp_name
Oracle Apps Query - List the Employees assigned to a given organization
from PER_ALL_PEOPLE_f ppf
, PER_ALL_ASSIGNMENTS_f ppa
, PER_ALL_ORGANIZATION_UNITS ppo
, PER_PERSON_TYPES ppt
, GL_SETS_OF_BOOKS GSB
, PER_ADDRESSES PA
, PER_JOBS PJ
, PAY_PEOPLE_GROUPS PPG
, HR_LOCATIONS HL
, PER_ALL_PEOPLE_f ppf2
, GL_CODE_COMBINATIONS_KFV GCC
where ppa.person_id = ppf.person_id
and ppf2.person_id(+) = ppa.supervisor_id
and sysdate between ppf2.EFFECTIVE_START_DATE(+) and nvl(ppf2.EFFECTIVE_END_DATE(+),sysdate)
AND GCC.CODE_COMBINATION_ID(+) = PPA.DEFAULT_CODE_COMB_ID
and ppt.PERSON_TYPE_ID = ppf.PERSON_TYPE_ID
and sysdate between ppf.EFFECTIVE_START_DATE and nvl(ppf.EFFECTIVE_END_DATE,sysdate)
and sysdate between ppa.EFFECTIVE_START_DATE and nvl(ppa.EFFECTIVE_END_DATE,sysdate)
and ppo.organization_id(+) = ppa.organization_id
and gsb.set_of_books_id(+) = ppa.set_of_books_id
and pa.person_id = ppf.person_id
AND PPG.PEOPLE_GROUP_ID = PPA.PEOPLE_GROUP_ID
AND PPA.LOCATION_ID = HL.LOCATION_ID(+)
AND PPA.JOB_ID = PJ.JOB_ID(+)
AND ppo.name in (:org_name);
Oracle Apps Query - Lists the Responsibilities to which a CP is attached
SELECT RESPONSIBILITY_NAME FROM FND_RESPONSIBILITY_VL FR, FND_REQUEST_GROUPS FRG
WHERE FR.REQUEST_GROUP_ID = FRG.REQUEST_GROUP_ID
AND FR.REQUEST_GROUP_ID IN (SELECT REQUEST_GROUP_ID FROM FND_REQUEST_GROUP_UNITS FRU, FND_CONCURRENT_PROGRAMS_VL FC
WHERE FRU.REQUEST_UNIT_ID =FC.CONCURRENT_PROGRAM_ID
AND FC.USER_CONCURRENT_PROGRAM_NAME = :ConProgram_Name)
Thursday, March 25, 2010
Workflow Notification Template Customization
Item Key Name : System mailer
Purpose : Message templates which will be used by other workflow notifications.
Create a custom version of the Standard System Mailer Workflow
1. Open the System: Mailer
2. Save it as XXSYSML
3. Open its wft in textpad and search and repace WFMAIL by XXSYSML
4. Now open this XXSYSML.wft file and change the Name of Workflow from "System: Mailer" to "XX System: Mailer"
5. Now you can modify the templates within this workflow as desired.
6. Now, go back to your PO Approval Workflow and attach a new attribute of name for FYI, #WFM_OPEN_MAIL_FYI
7. Make the value of this attribute point to custom version of "System: Mailer" template
Friday, March 19, 2010
Thursday, February 25, 2010
How does one enable trace for all actions that occur for a user?
a. First enable trace for a specific user:
- Bring up the Core application - System Administrator responsibility
- Move to Profile/System
- Check off the USER box - and enter your username that you are using when getting the error
- Search on the following profile option - 'Initialization SQL Statement - Custom'
Please set this at the user level with the following string:
BEGIN FND_CTL.FND_SESS_CTL('','', '', 'TRUE','','ALTER SESSION SET
TRACEFILE_IDENTIFIER='||''''|| '4269824.999' || '''' || ' EVENTS =' || '''' || ' 10046 TRACE NAME
CONTEXT FOREVER, LEVEL 12 '|| ''''); END;
(Cut and paste the above sql statement into the User Level profile option: "Initialization SQL - Custom")
This must be one complete line of text - so may be best to copy the string into notepad prior to putting it into the profile.
b. Once the profile is set, please change responsibilities and directly go and reproduce the problem.
To locate the trace file, use the following sql in sqlplus:
SQL> select name, value from v$parameter where name like 'user_dump_dest';
c. Note that a similar technique can be used for enabling trace with binds for a user in SQL*Plus. The commands would look like the following:
SQL> ALTER SESSION SET TRACEFILE_IDENTIFIER='577' EVENTS ='10046 TRACE NAME CONTEXT FOREVER,LEVEL 12';
SQL> select 'x' from dual; -- or any SQL that you want to trace
SQL> alter session set sql_trace = false;
Embed Oracle Applications Framework regions in a notification message
The message attribute representing the region must be of type document and must have a source of Send. You can assign the attribute any appropriate internal name, display name, and description.
Specify the value for the attribute in the following format:
"JSP:/OA_HTML/OA.jsp?OAFunc=
Click here to know further
Wednesday, February 17, 2010
Useful list of scripts for OA Framework
Click here to know more
Thursday, February 11, 2010
OAF Page Deploy Commands
adjava -ms128m -mx256m -nojit oracle.jrad.tools.xml.importer.XMLImporter XxnchZhsNotifExpLinesRN.xml -username apps -password appspassword -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host = hostname)(port =1529)))(connect_data = (sid = dev4)))" -rootdir /u01/dev4/comn/java/oracle/apps/ap/oie/workflow/apexp/webui -rootPackage /oracle/apps/ap/oie/workflow/apexp/webui
To load a page from file into MDS from windows platform.
c:\9ijdeveloper\11i_generic\jdevbin\jdev\bin\import.bat c:\9ijdeveloper\11i_generic\jdevhome\jdev\myprojects\oracle\apps\xxtpc\cbt\webui\page1.xml -rootdir c:\9ijdeveloper\11i_generic\jdevhome\jdev\myprojects -userId 1 --username un -password pwd -dbconnection "(description = (address_list = (address = (community=tcp.world)(protocol = tcp)(host =hostname)(port = 1531)))(connect_data = (sid = sidname)))"
Friday, January 29, 2010
Oracle Workflow in Multiple Languages
Oracle Workflow uses a view called WF_LANGUAGES that identifies the languages defined in your Oracle installation. Oracle Workflow uses the WF_LANGUAGES view to create, in its translatable tables, a row for each language that maps to a row found in the corresponding non-translated base table. Installed_Flag column is the Flag to indicate if the language is installed and available for use. Ref Oracle Database Globalization Support Guide
Display Oracle Workflow Web Pages in Other Languages
For Oracle Workflow embedded in Oracle Applications, you select and install additional languages as part of the Oracle Applications installation. Users can set their language preference to an installed language through the Personal Homepage in order to view Oracle Applications screens in that language. See: Selecting NLS Settings, Installing Oracle Applications and Set Preferences, Oracle Applications User's Guide.
For the standalone version of Oracle Workflow, the server installation and upgrade are available only in English. To support access to Oracle Workflow web pages in another language, you must load that language after the installation using the Oracle Workflow Configuration Assistant. See the installation documentation for your release and platform.
The Oracle Workflow Configuration Assistant performs the following tasks to set up a language:
1. Runs the script wfnlena.sql to enable the language.
2. Runs the script WFNLADD.sql to create rows for the enabled language in each workflow object translation table.
3. Loads translated resource files for the user interface using the Workflow Resource Generator, translated versions of the standard and demonstration workflow definitions using the Workflow Definitions Loader, and translated Business Event System object definitions using the Workflow XML Loader.
Note: To display Oracle Workflow web pages properly, the character sets on the database tier and middle tier must match.
To Create and View Workflow Definitions in Other Languages using Oracle Workflow Builder
1. Set the NLS_LANG environment variable for the new language, territory, and encoded character set that you want to use for the workflow definition. For example, for Windows NT, run the regedit32 command and locate the NLS_LANG setting under the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE hierarchy. Double click on NLS_LANG. Then set the variable to the new value and save your work. Specify the value for NLS_LANG in the following format:
LANGUAGE_TERRITORY.CHARSET
For more information about setting NLS_LANG, see: Globalization Support, Oracle Database Installation Guide.
2. Start Oracle Workflow Builder. Create a translated version of your workflow definition and save it as a flat file (.wft), or open and view a workflow definition that is already translated.
Note: Although you can enter and view property values for your workflow definitions in other languages, the Oracle Workflow Builder user interface is still displayed in English.
To Load Workflow Definitions in Other Languages to a Database
1. Ensure that the WF_LANGUAGES view has been created in your workflow server. This view is automatically created during installation.
2. Ensure that the language you want is set up in the database.
For Oracle Workflow embedded in Oracle Applications, you select and install additional languages as part of the Oracle Applications installation. See: Selecting NLS Settings, Installing Oracle Applications.
For standalone Oracle Workflow, the server installation automatically adds all available languages to your workflow database. See the installation documentation for your release and platform.
For standalone Oracle Workflow, the server installation and upgrade are available only in English. To support access to workflow definitions in another language, you must load that language after the installation using the Oracle Workflow Configuration Assistant. See the installation documentation for your release and platform.
3. Load the translated workflow definition to your workflow database using either the Workflow Definitions Loader or the Workflow Builder.
Before running the Workflow Definitions Loader program, you must set the NLS_LANG environment variable to the appropriate territory and character set for the workflow definition you want to load. The character set must match the character set encoding used to create the workflow definition file, which is determined by the NLS_LANG value that was set on the client PC before the .wft file was created in the Workflow Builder. For example, if the .wft file was created in the Japanese native character set encoding JA16SJIS, then you must specify JA16SJIS in the character set portion of NLS_LANG before loading the file, and you cannot specify a different character set such as UTF8.
To set NLS_LANG before running the Workflow Definitions Loader, use the following format:
_TERRITORY.CHARSET
Note that it is important to include the underscore (_) before the territory name and the period (.) between the territory name and the character set name in the NLS_LANG value. For example, if the .wft file was created in the Japanese native character set encoding JA16SJIS, set NLS_LANG to the following value:
_JAPAN.JA16SJIS.
You do not need to include the language in this NLS_LANG value because the Workflow Definitions Loader uses the language specified within the .wft file to determine the language to load.
Note: If you create all your translated workflow definition files in Unicode encoding, you can simply set NLS_LANG to .UTF8 before loading these files. In this case you will not need to reset NLS_LANG for translated files in different languages, because the .UTF8 character set applies to all the files in Unicode encoding.
Before using the Workflow Builder to save a translated workflow definition to the database, you must set the NLS_LANG environment variable to the appropriate language, territory, and character set. If you are saving several workflow definitions in different languages, you must reset NLS_LANG for each language. See: Opening and Saving Item Types, Oracle Workflow Developer's Guide.
Note: The translated versions of Oracle Workflow's standard and demonstration workflow definitions are provided in native character set encoding, not in UTF8.
To Send E-mail Notifications in Other Languages
1. Determine whether Oracle has translated the e-mail notification templates to the language you wish to set by checking for the file containing the templates in the appropriate language subdirectory, $ORACLE_HOME/wf/res/
2. If the e-mail templates are available for the desired language, Oracle Workflow uses the language preference for the notification recipient to determine the language for an e-mail notification.
Oracle Applications users can set their language preference in the Preferences page. This preference is also stored in the ICX: Language profile option. See: Set Preferences, Oracle Applications User's Guide.
Note: In Oracle Applications, users can select a session-level language in the login window, which overrides their user-level language preference for that session. However, Oracle Workflow still uses the user-level language preference to determine the language in which e-mail notifications are sent.
For standalone Oracle Workflow, as the workflow administrator, you can specify the default language setting in the Global Preferences page. Individual users can override the default language setting by specifying their own preferred language in the User Preferences page. See: Setting Global User Preferences and Setting User Preferences, Oracle Workflow User's Guide.
Further reference Clcik here
Tuesday, January 12, 2010
XML Publisher Configuration File
•The configuration file is optional.
• No default configuration file is provided.
•The file is primarily used for: Setting properties for PDF, RTF, and HTML o/pSetting PDF security propertiesSetting font locations and substitutions Setting translation properties
Filename: xdo.cfg.
Location:
XML Publisher Tags
2. Row Column Highlighting :> "if@row:position() mod 2=0"
3. Creation of page total Elements : "add-page-total:TotalFieldName;'element'"
4. Displaying Page Total: "show-page-total:TotalFieldName;'Oracle-number-format'"
5. Re grouping: "for-each-group:BASE Group;Grouping Element" , "for-each:current-group(); GROUPING-ELEMENT"
6. Last Page Only : "start@last-page:body" "end body"
7. Variable Declaration : :variable name="lpp" select="number(5)"
8. Assigning Value to Variable : "xdoxslt:set_variable($_XDOCTX, 'variable name', value)"
9. Get Value from Variable : "xdoxslt:get_variable($_XDOCTX, 'variable name')"
10. MICR font can be linked by moving it to a UNIX directory and referencing the location in the Template
11. Extended SQL and XSL Functions : xdofx:expression
12. Dynamic Data Column header : split-column-header:group element name
13 Dynamic Data Column Data : split-column-data:group element name
For reference go through link
http://blogs.oracle.com/xmlpublisher/
http://www.scribd.com/doc/210892/XML-Publisher-17th-July-07
Monday, January 11, 2010
How to switch on Diagnostics for Trace in OAF Pages?
- Using System Administrator responsibility, set profile options at the user level:
FND: Debug Log Enabled : Yes
FND: Debug Log Filename : leave it as null
FND: Debug Log Level : Statement
FND: Debug Log Module : %
FND: Diagnostics = Yes
Click on Diagnostics Link on the top of the page and then select the option : set trace level , and then click