29 May 2009

Subject: How to Control the Name and the Application that Opens the Concurrent Request Output File on the Client?

Doc ID: 316752.1 Type: HOWTO
Modified Date : 29-MAY-2008 Status: PUBLISHED


Applies to:
Oracle Application Object Library - Version: 11.5.7 to 11.5.10
Information in this document applies to any platform.



Checked for relevance on 29-May-2008
Applications Install 11.5.7 to 11.5.10
Goal
How to control the name and the application that opens the concurrent request output file on the client?

Solution
The following output formats are possible for the output files created by any concurrent request in Oracle Applications Release 11i

- Text
- HTML
- PDF
- PCL
- Postscript
- XML

The following profile options are available in Oracle Applications Release 11i

Viewer: Text
Viewer: PostScript
Viewer: Default Font Size
Viewer: HTML
Viewer: PDF
Viewer: HTML
Viewer: PDF
Viewer: PostScript

The 'Viewer: Text' profile option allows you to send report output directly to a browser window rather than using the default Report Viewer. Enter "browser" in this profile option to enable this feature.
Users can see and update the Viewer:Text profile option.
This profile option is both visible and updatable at all four levels.

The internal name for this profile option is EDITOR_CHAR.

Viewer: Application for HTML
Viewer: Application for PCL
Viewer: Application for PDF
Viewer: Application for PostScript
Viewer: Application for Text
Viewer: Application for XML

These profile options determine the applications a user will use to view reports in the given output formats. For example, you could set Viewer: Application for Text to ’application/word’ to view a Text report in Microsoft Word.

Valid values are defined by the system administrator in the Viewer Options form.
Users can see and update these profile options. The internal names for these profile options are FS_MIME_HTML, FS_MIME_PCL, FS_MIME_PDF, FS_MIME_PS, and FS_MIME_TEXT.

In Applications 11i , use the System Administrator Responsibility and navigate to

Install -> Viewer Options

to open the Form Viewer Options.

The column File Format can take one of the following possible values

- Text
- HTML
- PDF
- PCL
- Postscript
- XML

Corresponding to one specific File Format a number of Mime Types can be associated , there is no restriction on which Mime Type can be associated with a particular File Format . The possible values of Mime Types can be known by opening up the Registry on the Windows Client machine using the command regedit , then following the paths in the registry tree as given below :-

HKEY_CLASSES_ROOT->MIME->Database->Content Type
HKEY_LOCAL_MACHINE->Software->Classes->MIME->Database->Content Type

When a particular Mime Type is clicked under Content Type in the registry (for example the registry key HKEY_LOCAL_MACHINE->Software->Classes->MIME->Database->Content Type/(application/pdf)), the Value data corresponding to Value name : Extension gives the file extension for that Mime Type.

On the Windows client machine (Windows Explorer Tools->Folder Options ->File Types) there is a mapping of file extension with Application, so in short the Mime Type (Mime Type is required in transferring the output file from the Concurrent Processing Server to the Windows client machine using http protocol ) decides the output file extension, which in turn decides the application with which the output file is opened on the Windows client machine

Suppose a user submits a Concurrent Request, the request gets completed successfully to generate an output file in a particular format say PDF. Now the user wants to view or download the output file on his client machine, to transfer the output file from the Concurrent Processing Server to the client machine using http protocol, association of Mime Type with the output file is required. Now the question comes which Mime Type is to be associated?

The decision is based on the following things:

(i) Value of the profile options: Viewer: PDF and Viewer: Application for PDF effective for that Applications User.

(ii) Mime Types defined in Applications, as described earlier, for the output format PDF.

If there are multiple Mime Types defined for PDF File Format and the values of the profile options Viewer: PDF and Viewer: Application for PDF effective for the user do not determine any particular Mime Type then the user is presented with a list of Applications. Application names being seen in the list is the Description column for those combinations of PDF File Format and the corresponding Mime Types in the Viewer Options Form. When a particular application from the list is chosen, the output file is transferred from the Concurrent Processing Server to the Windows client machine using http protocol with Mime Type, as that is there for that particular Application and PDF File Format in the Viewer Options Form. Mime Type used in the transmission of the output file, decides the file extension as described earlier, which in turn decides the application on Windows to be used for opening the file .

The name of the output file being saved is derived from the name of the Concurrent Program. The output file name is obtained by procedure
fnd_webfilepub.req_outfile_name (AFCPWFPB.pls) in the following way:

select substrb(p.user_concurrent_program_name,1,30) || '_' ||
&; to_char(r.Actual_Start_Date,'ddmmrr'),
NVL(r.output_file_type, 'TEXT')
into temp_name, file_type
from fnd_concurrent_programs_vl p,
fnd_concurrent_requests r,
fnd_file_temp t and p.application_id = r.program_application_id
and t.request_id = r.request_id
and t.file_id = id;
.
if ( file_type = 'TEXT' ) then
file_ext := 'txt';
elsif ( file_type = 'HTML') then
file_ext := 'html';
elsif ( file_type = 'PDF' ) then
file_ext := 'pdf';
elsif ( file_type = 'PS' ) then
file_ext := 'ps';
elsif ( file_type = 'PCL' ) then
file_ext := 'pcl';
elsif ( file_type = 'XML' ) then
file_ext := 'xml';

end if;

outfile_name := temp_name || '.' || file_ext;

If there is any special character in the name of the Concurrent Program it may create problems in opening or saving the output file unless the default applications corresponding to the Output File Formats are used on the Windows client machine.

For example create a Concurrent Program with the name as "PROLDAN - ñáéíóúäëiöü - Active Users". Execute the Concurrent Program to generate all the supported output formats. All the output files could be saved on the Windows Client machine. Here are the names under with the different output files were saved as:
.
For Text: PROLDAN - ñáéíóúäëiö _060705.txt
For HTML: PROLDAN - ñáéíóúäëiö _060705.html
For PDF: PROLDAN - ñáéíóúäëiö _060705.pdf
For PCL: PROLDAN - ñáéíóúäëiö _060705.pcl
For Postscript: PROLDAN - ñáéíóúäëiö _060705.ps
For XML: PROLDAN - ñáéíóúäëiö _060705.xml
.

Text Files should be opened using Notepad on the Windows Client machine.

HTML Files should be opened using IE browser on the Windows Client machine.

PDF Files should be opened using Acrobat Reader on the Windows Client machine.

PCL Files should be opened using Swift View on the Windows Client machine.

Postscript Files should be opened using Ghost View on the Windows Client machine.

XML Files should be opened using IE browser on the Windows Client machine.


All of the above files were successfully saved and opened using the default applications such as Notepad, IE browser, Acrobat Reader, Swift View, Ghost View and again IE browser respectively. This means that Oracle Applications provides output file names for all its supported output formats that are correctly used to open and save these files across all the main applications used to view them.

If there is any issue in saving the output file on the client due to any other reason than the name of the output file, the following can be checked:

NOTE: Be VERY careful when using regedit you may disable your system permanently.
3.1. Open up regedit and search for Temporary Internet Files
3.2. Look for the entry in the
mycomputer\hkey_current_user\software\microsoft\windows\
currentversion\explorer\shell folders
3.3. Click on the cache subkey and rename the directory to one that has
no spaces. This directory must also exist.
For example, change to c:\iecache
3.4. Search again for Temporary Internet Files and you should find the
next subkey my computer\hkey_current_user\software\microsoft\
windows\currentversion\explorer\user shell folders
3.5. Change the value for the cache key to c:\iecache.



One Example

---------------

Logon to Oracle Applications, use the System Administrator Responsibility and Navigate to:
Install -> Viewer Options to open the Form "Viewer Options".

Then do the entry as shown below:

File Format Mime Type Description
Text application/msword Microsoft Word(.doc)
Text application/vnd.ms-excel Excel (.xls)
Text text/plain Notepad(.txt)

Then ensure that the profile option 'Viewer: Application for Text' is set to BLANK at the Site Level.

Then ensure that the profile option 'Viewer: Text' is set to 'browser' at the Site Level.

Then restart the Concurrent Processing Server.

Submit a Concurrent Request that generates Text Output File.
Click on View Output button. You will see an LOV showing:
Microsoft Word(.doc)
Excel (.xls)
Notepad(.txt)

When you choose Microsoft Word(.doc), the text file will be transferred using the Mime Type application/msword, so the browser will open the text file in Word.

When you choose Excel (.xls) , the text file will be transferred using the Mime Type application/vnd.ms-excel, so the browser will open the text file in Excel.

When you choose Notepad(.txt), the text file will be transferred using the Mime Type text/plain,
so the browser will open the text file in Notepad.

13 May 2009

Sales Orders: How to find total cost of Sales Order

Using following function to find the cost of a Sales ORDER.

select
TO_CHAR(oe_oe_totals_summary.prt_order_total (header_id),
fnd_currency.safe_get_format_mask (transactional_curr_code, 30)
) order_total
from OE_ORDER_HEADERS_ALL

30 April 2009

Oracle Contracts and iStore Useful SQLS

-- Find MyAgreements Users Created

select fu.user_name
from applsys.fnd_user FU
where fu.user_name like '%_EXT'
AND FU.CUSTOMER_ID IS NOT NULL

-- Find MyAgreements Users who have logged in and Used MyAgreements


select FU.USER_NAME ,
COUNT(ICS.SESSION_ID)
from icx.icx_sessions ics,
applsys.fnd_user fu
where fu.user_name like '%_EXT'
AND FU.CUSTOMER_ID IS NOT NULL
AND FU.USER_ID = ICS.USER_ID
GROUP BY FU.USER_NAME
ORDER BY 2 DESC

-- Find Oracle Contract Agreements accepted through MyAgreements

SELECT DISTINCT
oebh.order_number,
fu4.user_name CREATED_BY,
FU.USER_NAME USER_ID,
SUBSTR(fu2.user_name, 1,INSTR(fu2.user_name,'_EXT')-1),
fu3.user_name,
oebh.last_update_date,
oebh.customer_signature_date
FROM applsys.fnd_lobs lob,
applsys.fnd_documents_tl docs,
applsys.fnd_document_categories_tl doccat,
applsys.fnd_attached_documents adocs,
ont.oe_blanket_headers_all oebh,
applsys.fnd_user fu,
applsys.fnd_user fu2,
applsys.fnd_user fu3,
applsys.fnd_user fu4
WHERE oebh.header_id = TO_NUMBER (adocs.pk1_value)
AND adocs.category_id = doccat.category_id
AND adocs.entity_name = 'OE_ORDER_HEADERS'
AND adocs.document_id = docs.document_id
AND docs.media_id = lob.file_id
and docs.created_by = fu.user_id
and fu.USER_ID = 4400
and UPPER(oebh.cust_po_number) = 'MANUAL'
and oebh.SOLD_TO_ORG_ID <> 715182
and to_number(oebh.attribute19) = fu2.customer_id
and oebh.LAST_UPDATED_BY = fu3.user_id
and oebh.created_by = fu4.user_id


-- Find Oracle Contract Agreements rejected today


select OEBH.order_number,
SUBSTR(FU.user_name, 1,INSTR(FU.user_name,'_EXT')-1) SIGNATORY,
SUBSTR(FU2.user_name, 1,INSTR(FU2.user_name,'_EXT')-1) UPDATED_BY
from ont.oe_blanket_headers_all oebh,
applsys.fnd_user fu,
applsys.fnd_user fu2
where oebh.flow_status_code = 'DRAFT_CUSTOMER_REJECTED'
AND TO_NUMBER(OEBH.ATTRIBUTE19) = FU.CUSTOMER_ID
AND OEBH.LAST_UPDATED_BY = FU2.USER_ID
AND FU.USER_ID = FU2.USER_ID
AND TRUNC(OEBH.LAST_UPDATE_DATE ) = TRUNC (SYSDATE)


-- Find the Template Names for a particular jsp file name

SELECT
b.item_id,
b.access_name,
t.item_name,
t.description,
b.applicable_to_code,
key.keyword,
map.lgl_phys_map_id,
map.msite_id,
map.default_site,
map.language_code,
map.default_language,
att.file_name
FROM
jtf.jtf_amv_items_b b,
jtf.jtf_amv_items_tl t,
ibe.ibe_dsp_lgl_phys_map map,
jtf.jtf_amv_attachments att,
jtf.jtf_amv_item_keywords key
WHERE
att.file_name like '%xxul%Landing%.jsp%' and
b.item_id = t.item_id AND
t.language = userenv('LANG') AND
b.application_id = 671 AND
b.deliverable_type_code = 'TEMPLATE' AND
b.item_id = map.item_id (+) AND
map.attachment_id = att.attachment_id (+) AND
b.item_id = key.item_id (+)

How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12

Subject: How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12
Doc ID: 787209.1 Type: REFERENCE
Modified Date : 16-MAR-2009 Status: PUBLISHED
Finding the Correct Version of Jdev with Oracle Application Framework (OAF)

Applies to:

Oracle Applications Framework - Version: 11.5.10 to 12+
Information in this document applies to any platform.
Overview

When you create extensions to eBusiness OA Framework pages, you must use the version of JDeveloper shipped by the eBusiness product team.

The version of JDeveloper is specific to the ATG patch level, so there is a new version of JDeveloper for each release of ATG patchset

This note gives the instruction on how to find right JDeveloper patch for creating OA Extensions with eBusiness Release 11i and Release 12

Solution

To determine which patch to use, you can check the framework version in your instance by using http://host:port/OA_HTML/OAInfo.jsp, then choose the matched JDeveloper patch.

Release 11i

OA Framework 5.10 patch JDeveloper 9i Patch
ATG.PF.H (patch 3438354 or Oracle Applications 11.5.10) Patch 4045639 9IJDEVELOPER WITH OA EXTENSION ARU FOR FWK.H
ATG PF CU1 (patch 4017300) Patch 4141787 9IJDEVELOPER WITH OA EXTENSION ARU FOR CU1
ATG PF CU2 (patch 4125550) Patch 4573517 Oracle9i JDeveloper with OA Extension for 11.5.10 CU2
11i.ATG_PF.H RUP3 (patch 4334965) Patch 4725670 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP3
11i.ATG_PF.H RUP4 (patch 4676589) Patch 5455514 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP4
11i.ATG_PF.H RUP5 (patch 5473858) Patch 6012619 9IJDeveloper With OA Extension ARU FOR 11i10 RUP5
11i.ATG_PF.H.RUP6 (patch 5903765)

Patch 6739235 9IJDeveloper With OA Extension ARU FOR 11i10 RUP6
Patch 6469392 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11I10 RUP6
Release 12

ATG Release 12 Version

JDeveloper 10g Patch
12.0.0 Patch 5856648 10g Jdev with OA Extension
12.0.1 (patch 5907545) Patch 5856648 10g Jdev with OA Extension
12.0.2 (patch 5484000 or 5917344) Patch 6491398 10g Jdev with OA Extension ARU for R12 RUP2 (replaces 6197418)
12.0.3 (patch 6141000 or 6077669) Patch 6509325 10g Jdev with OA Extension ARU for R12 RUP3
12.0.4 (patch 6435000 or 6272680) Patch 6908968 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12 RUP4
12.0.5 (No new ATG code released) No new JDev patch required
12.0.6 (patch 6728000 or patch 7237006) Patch 7523554 10G Jdeveloper With OA Extension ARU for R12 RUP6
12.1 (Controlled Release - only included for completeness) Patch 7315332 10G Jdev with OA Extension ARU for R12.1 (Controlled Release)
References

NOTE:275846.1 - Oracle Application Framework Support Guidelines for Customers
NOTE:275880.1 - Oracle Application Framework Release 11i Documentation Roadmap
NOTE:283158.1 - Using OA Extensions to extend existing Apps 11i OA Framework pages (step by step)
NOTE:391554.1 - Oracle Application Framework Documentation Resources, Release 12

iStore Debuging option

IBE:Enable Debug --Generates two logs Database and Application
$COMMON_TOP/tmp --Application Tier
/usr/tmp --Database error

&log=t --Generates Application log
$COMMON_TOP/tmp --Application Tier