Infolinks

Showing posts with label FNDLOAD. Show all posts
Showing posts with label FNDLOAD. Show all posts

Saturday, 21 July 2012

extract-trace-file-in-oracle-apps

How to extract the trace file of a concurrent program?
Following steps need to be performed:
1. Setup the profile value at user level with the following value
Profile name: “Initialization SQL Statement – Custom”
User: abc
Profile value:
BEGIN FND_CTL.FND_SESS_CTL(”,”,’TRUE’,'TRUE’,”,’ALTER SESSION SET TRACEFILE_IDENTIFIER = abc MAX_DUMP_FILE_SIZE = 5000000 EVENTS =’||””||’ 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12′||””);END;
2. Now on ward all the trace will be tracked in the .trc file. Find out where the trace file resides in the DB.
Go to Help -> Diagnosics -> Trace. enable trace. After doing so, a pop up will show the server path where the trace will get create..
usually .trc file will get created in DB server. The file path may be say “/u01/app/oracle/admin/RAC11D/udump/RAC11D_ora_17181_abc.trc”. the path will be stored along with the trc file name. usually the value in the profile value TRACEFILE_IDENTIFIER=AKONDURU is used in the trace file naming
3. Now we have enabled trace for your user login. So what ever you do. say run a concurrent program. how the concurrent program is executed? the sql queries executed. how the control is going… every thing is tracked in the trace file.
4. Log in to the DB server. extract the file and convert to readable format.
Go to the following path in the DB server -> ‘/u01/app/oracle/admin/RAC11D/udump/’. Identify the file name which is prompted while enabling the trace (look point 2).
the .trc file is not readable. You have to convert it (tkprof) to make it readable. use the following command to do so.
tkprof (input).trc output.txt EXPLAIN=()
where input.trc is the trace file and output.txt is in readable format
5. After you get the trace file. make sure to remove the profile value that you have set for the profile : “Initialization SQL Statement – Custom”.. else the system will go on creating a huge trace file.

ii-printers-and-print-drivers-overview

Oracle Applications can print reports on any printer that can accept requests
from the operating system command line.  That is, if a document can be printed
from the operating system command line, the same print command or program can
be used in the Oracle Applications driver.
Nearly all printers employ either a hardware and/or a software method of
controlling printing attributes like paper size, paper orientation, font size,
vertical spacing, and so on.  However, most modern printers rely on a printer
programming language for initializing or changing printing attributes as needed.
Some laser printers use the Hewlett Packer Printer Command Language (PCL) to
initialize the printer or to setup certain printing attributes.  This printing
language typically consists of sequenced commands that are concatenated together
into a string and pre-appended to the ASCII text document before it is sent to
the printer. These initialization or setup strings are utilized in the Oracle
Applications printer driver for ASCII text report printing.  Postscript
printing, on the other hand, embeds printer control information within the
document. Some printers are equipped to perform both PCL and postscript
printing.
Printer drivers defined in Oracle Applications are used to initialize the
printer with pre-selected printing attributes and to specify which operating
system command or program will handle printing.  Unlike common file drivers,
the Oracle Applications Print Drivers are typically defined via forms and the
necessary printer dependent information is stored in the system’s database.  The
majority of reports in Oracle Applications call for one of three basic printer
drivers that specify a commonly used set of printing attributes.  The driver
names typically include the word Portrait, Landscape, and Landwide that
emphasize the paper orientation and size.
A SQL* Report Write (SRW) driver is associated with each Oracle Application
printer driver.  This driver is a printer definition file that is used with
Oracle Reports at runtime.  This file is an ASCII character file that can be
copied and edited as needed.  The Oracle Applications System Administrator’s
Guide sums up both drivers quite well: “SRW drivers only pertain to Oracle
Reports output files.  An SRW driver is used during the generation of a report.
A printer driver is used when the completed output file is sent to the printer.”
Oracle predefines a handful of generic print drivers and SRW driver for certain
popular printers.  However, outside of this initial set, a custom print driver
needs to be defined within Oracle Applications. The initialization or setup
string needs to be obtained from the printer’s manufacturer. Often, such
printer-specific information can be found in the printer’s technical reference
manual or user’s guide.
IV. ORACLE APPLICATIONS POSTSCRIPT PRINTING SETUP
Postscript printing in Oracle Applications requires: a registered postscript
printer, registered postscript RDF files, predefined Oracle Applications and
Oracle Report postscript drivers, defined system environment variables, and on
some platforms, an updated Oracle Reports printer configuration file
(uiprint.txt). The following steps are for all platforms; however, any operating
system (OS) specific instruction will be denoted by the platform’s name.
On a three-tier NCA configuration, the concurrent processing server typically
resides on the database tier. Nonetheless, the concurrent processing server can
alternately resides on the middle tier. In a mixed platform installation with
both Unix and Windows servers installed, the postscript printing setup and
testing should be performed on the platform where the concurrent processing
server resides.

oracle-applications-postscript-printing-setup

Postscript printing in Oracle Applications requires: a registered postscript
printer, registered postscript RDF files, predefined Oracle Applications and
Oracle Report postscript drivers, defined system environment variables, and on
some platforms, an updated Oracle Reports printer configuration file
(uiprint.txt). The following steps are for all platforms; however, any operating
system (OS) specific instruction will be denoted by the platform’s name.
On a three-tier NCA configuration, the concurrent processing server typically
resides on the database tier. Nonetheless, the concurrent processing server can
alternately resides on the middle tier. In a mixed platform installation with
both Unix and Windows servers installed, the postscript printing setup and
testing should be performed on the platform where the concurrent processing
server resides.
a. INSTALL & CONFIGURE THE POSTSCRIPT PRINTER AT THE OS LEVEL.
   Before attempting to setup a printer in Oracle Applications, it is essential
   that printing is possible from the command line.
   On some mixed platform or networked environments, additional software tools
   or programs may be required to establish a working network or local printer.
   Please reference your printer or operating system manuals for specific
   information on setting up printers and printer drivers at the OS level.
   1.  On Unix, a printer / print queue needs to be defined as postscript at the
       OS level.(Set printer-type and content-type to PS when adding the printer
       with lpadmin.)
   2.  On Windows NT, install the Windows postscript driver supplied by the
       printer manufacturer on the server where the concurrent manager resides.
       Under the Windows printer “Properties” dialog box, verify the postscript
       driver has been set as the default driver.
   3.  On the Concurrent Processing Server node, please verify a postscript
       document can be successfully printed from the command line:
       lp  -d  <printer_name>   <file_name>                     or
       lp  -d  <printer_name> -T postscript  <file_name>   for Unix
       print  /d:\\<server_name>\<printer_name>  <file_name>     for Windows NT
Note:  On Windows NT, remote printers must be managed locally on the server
       where the concurrent manager resides. Otherwise, a “REP-0826: Invalid
       printer ‘<name>’ specified by parameter desformat” error may occur.
b. DEFINE ENVIRONMENT VARIABLES.
Environment variables are used to specify which printer and executable may be
used for printing. The variables LPDEST and PRINTER identify default printers
available to Oracle Reports. However, the APPLORC variable is set to the
executable used for character-mode printing and the APPLORB variable is set to
the executable used for bitmap-mode printing.
On the Unix platform, the ar25runb executable is used for postscript printing.
This executable resides in the $FND_TOP/bin directory.  If the executable is
not present, it can be recreated manually with the Oracle Applications utility
adrelink.
On the Windows NT platform, the r25run32.exe executable is used for both
postscript and ASCII text printing.
1.  On Unix, set the following variables in the APPLSYS.env file:
       APPLORB=ar25runb; export APPLORB
       APPLORC=ar25run; export APPLORC
       LPDEST=  <Actual Printer Name> ; export LPDEST
       PRINTER= <Actual Printer Name> ; export PRINTER
2.  On NT, set the following registry entries under \HKEY_LOCAL_MACHINE\
    SOFTWARE\ORACLE\APPLICATIONS\<Release Version>\<Value of APPL_CONFIG>:
       APPLORB = r25run32
       PRINTER = default
c. CREATE OR LOCATE A PRINTER DEFINITION FILE (SRW) – ON UNIX ONLY.
An SRW driver acts like a translator. It tells the printer how to handle
bolding, underlining, printing graphical characters used in lines/boxes, etc.
Printer definition files are defined for both postscript and character printing.
However, these drivers are used exclusively by Oracle Reports for formatting
the output file.  It is an ASCII text file with a file extension of PRT that can
be copied and edited as needed.
Postscript printer definition files are required only on character-mode
platforms like Unix. In a bitmap platform, like Windows NT, the SRW driver is
not used for printing postscript reports; however, the driver is used for ASCII
text reports.
SRW driver file are present in the $FND_TOP directory, specifically, $FND_TOP/
srw for Oracle Applications Release10.7 and $FND_TOP/reports for Release 11.
Additional drivers can be found in Oracle_Home/reports25/printers for NT and
Oracle_Home/reports25/admin/printers for Unix. Some generic postscript drivers
are psport.prt for portrait, psl132.prt for landscape, and psl180.prt for
landwide.
   1. Select a SRW driver that is compatible with your printer and report.
   2. Make sure the driver is present in the appropriate $FND_TOP subdirectory.
d. SETUP PRINTER CONFIGURATION FILES – ON UNIX ONLY
Oracle Reports’ Toolkit component uses the Postscript Printer Definition (PPD)
files to determine postscript printer capabilities and font availability.  Any
fonts listed in the PPD file must have a corresponding Adobe Font Matrics (AFM)
file in the $ORACLE_HOME/guicommon/tk23/admin/PPD directory. Oracle delivers a
generic set of PPD and ATM files.  If additional PPD and ATM files are required
or desired, please check with your printer manufacturer or with Adobe
Corporation.
Another configuration file that needs to be updated is the uiprint.txt file.
This printer resource file lists every available printer and its associated PPD
file.  It can be found in the $ORACLE_HOME/guicommon2/tk23/admin/ directory. The
file has a line entry for each printer as follow:
Printer_Name:Driver_Type:Driver_Version:Description:PPD_Name
Printer_Name is the printer’s name used at the Unix OS level.
Driver_Type is one of three driver types currently supported by the Oracle
Reports Toolkit: Postscript, ASCII, and PCL.
Driver_Version is one of three driver versions currently supported by Oracle
Reports Toolkit:1 for ASCII or Postscript level one, 2 for Postscript level two,
and 5 for HP PCL.
Description is any helpful free form description.
PPD_Name is any PPD file name found in the
$ORACLE_HOME/guicommon2/tk23/admin/ directory.
   1.  Examine and select a suitable PPD file.
       The default PPD should be appropriate for most printers.
   2.  Edit the uiprint.txt file and make a similar entry as follows:
       SitePr3:Postscript:1:Site Printer on 3rd Floor:default.ppd:
e. DEFINE A NEW PRINT DRIVER
The print driver defines how Oracle Applications printing will be accomplished.
That is, what printing programs, commands, or arguments are needed to submit an
output file to a printer via the operating system.
   1.  Log on to Oracle Applications and select the SYSADMIN responsibility.
   2.  Navigate to Install/Printers/Drivers and create a new print driver
       record.
   3.  Enter a driver name and a user driver name.  The user driver is the name
       that will appear in the LOV window.
   4.  On Unix only, select a postscript SRW driver like PSL132 for landscape
       printing.
   5.  Platform should be left blank<null>.
   6.  Set the driver method to command and all driver method parameters options
       should remain blank/unchecked.
   7.  Enter a corresponding argument for Windows or Unix:
       PRINT /D:$PROFILES$.PRINTER $PROFILES$.FILENAME
       lp -c -d$PROFILES$.PRINTER -n$PROFILES$.CONC_COPIES -t
       “$PROFILES$.TITLE” $PROFILES$.FILENAME
   8.  The initialization and reset field must be blank<null> for postscript
       printing.
Note: Since printer information is cached, the concurrent manager needs to be
      bounced or restarted after making any printer information changes.
f. DEFINE A NEW PRINT STYLE
A print style is a description of how your report should be printed.  It
specifies the SRW driver to be used and a layout area. The layout area defines
the report’s columns, rows, orientation, and if a header should be suppressed.
Create a new style with similar layout property as defined in the report.
Both the print style and the print driver contain a field for an SRW driver. The
SRW driver listed in the print style is used when the report is not being
printed (copies = 0). The SRW driver listed in the print driver is used when the
report is being printed(copies > 0). Unless there is a specific printing need,
the SRW driver should be the same in the print style and the print driver.
   1. Navigate to Install/Printers/Styles and create a new print style record.
   2. Enter a style name and a user style name.
      The user style is the name that will appear it the LOV window.
   3. Enter a sequence number.
      It organizes the displayed styles by sequence number when a query is
      performed.
   4. On Unix only, select a postscript SRW driver like PSL132 for landscape
      printing
   5. Complete the layout block with the same properties defined in the report.
Hint: In the style or driver name, include the letters PS and the paper
      orientation like landscape to quickly help identify the new style or
      driver.
g. DEFINE OR SELECT A PRINTER TYPE
The printer type is used to list every suitable matched set of printer style and
printer driver for a specific printer.  A registered printer can be associated
with only one type. However, several printers can utilize a defined type.  An
existing type can be used or a new type can be created.
   1. Navigate to Install/Printers/Type
   2. Query the desired type and select any supporting style or drivers.
Note: If an existing type is selected for the newly registered printer, do not
      alter the existing styles and drivers entries; it may be in use by other
      printers.  Instead, make additional print style and print driver entries.
h. REGISTER THE PRINTER WITH ORACLE APPLICATIONS
The printer name needs to be the same name used at the command line.
On NT, a network printer name is registered with the share name utilizing the
Universal Naming Convention (UNC).  The format is \\Server Name\Printer Share
Name.
   1. Navigate to Install/Printers/Register
   2. Make a new record entry.

Sample FNDLOAD Scripts for AOL Objects

Sample FNDLOAD Scripts for AOL Objects

1 - Printer Styles
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME=”printer style name”
2 - Lookups
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=”prod” LOOKUP_TYPE=”lookup name”
3 - Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=?COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME=”prod” DESCRIPTIVE_FLEXFIELD_NAME=”desc flex name” P_CONTEXT_CODE=”context name”
4 - Key Flexfield Structures
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=?COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL? APPLICATION_SHORT_NAME=”prod” ID_FLEX_CODE=”key flex code” P_STRUCTURE_CODE=”structure name”
5 - Concurrent Programs
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME=”prod” CONCURRENT_PROGRAM_NAME=”concurrent name”
6 - Value Sets
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME=”value set name”
7 - Value Sets with values
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME=”value set name”
8 - Profile Options
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME=”profile option” APPLICATION_SHORT_NAME=”prod”
9 - Requset Group
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”request group” APPLICATION_SHORT_NAME=”prod”
10 - Request Sets
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SET APPLICATION_SHORT_NAME=”prod” REQUEST_SET_NAME=”request set”
11 - Responsibilities
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY=”responsibility
12 - Menus
FNDLOAD apps/apps@seed115 O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME=”menu_name”
13 – Forms/Functions
FNDLOAD apps/apps@seed115 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct file_name.ldt FND_FORM_CUSTOM_RULES The Upload syntax for all styles: FNDLOAD apps/apps@seed115 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct file_name.ldt
14. User/Responsibilities
FNDLOAD apps/apps@seed115 0 Y DOWNLOAD @FND:patch/115/import/afscursp.lct file_name.ldt FND_USER Then UPLOAD FNDLOAD apps/apps@seed115 0 Y UPLOAD [UPLOAD_PARTIAL] @FND:patch/115/import/afscursp.lct file_name.ldt FND_USER [<USER>]