Thursday, December 10, 2015

FNDLOAD UPLOAD / DOWNLOAD

Printer Styles:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct xxaoa_file_name.ldt STYLE PRINTER_STYLE_NAME="printer style name"

Lookups:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct xxaoa_file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="prod" LOOKUP_TYPE="lookup name"

Descriptive Flexfield with all of specific Contexts:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct xxaoa_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"

Multiple Flexfields:

Use a combination of APPLICATION_SHORT_NAME and DESCRIPTIVE_FLEXFIELD_NAME names ie. APPLICATION_SHORT_NAME=PER >> will download all PER flexfields DESCRIPTIVE_FLEXFIELD_NAME=PER_% >> will download all flexfields that start with ‘PER_’.
   
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct xxaoa_file_name.ldt DESC_FLEX DESCRIPTIVE_FLEXFIELD_NAME="PER_%"

Key Flexfield Structures:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct xxaoa_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"

Concurrent Programs:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxaoa_file_name.ldt PROGRAM APPLICATION_SHORT_NAME="prod" CONCURRENT_PROGRAM_NAME="concurrent name"

Value Sets:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct xxaoa_file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME="value set name"

Value Sets with values:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct xxaoa_file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME="value set name"

Profile Options:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct xxaoa_file_name.ldt PROFILE PROxxaoa_file_name="profile option" APPLICATION_SHORT_NAME="prod"

Request Group:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxaoa_file_name.ldt REQUEST_GROUP REQUEST_GROUP_NAME="request group" APPLICATION_SHORT_NAME="prod"

Request Sets:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct xxaoa_file_name.ldt REQ_SET APPLICATION_SHORT_NAME="prod" REQUEST_SET_NAME="request set"

DOWNLOAD   
-- Request set Def    --
FNDLOAD apps/$apps_pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct REQ_SET REQUEST_SET_NAME=
-- Request set link    --
FNDLOAD apps/$apps_pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct REQ_SET_LINKS REQUEST_SET_NAME=

 UPLOAD   
FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct
FNDLOAD apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct

Responsibilities:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct xxaoa_file_name.ldt FND_RESPONSIBILITY RESP_KEY="responsibility"

Responsibilities with all Security Groups:
FNDLOAD apps/ 0 Y DOWNLOAD FND_TOP/patch/115/import/afscursp.lct .ldt
FND_USER USER_NAME="" SECURITY_GROUP=% DATA_GROUP_NAME=%

Notes for using FNDLOAD against FND_USER:-
1. After uploading using FNDLOAD, user will be promoted to change their password again during their next signon attempt.
2. All the responsibilities will be extracted by FNDLOAD alongwith User Definition in FND_USER
3. In the Target Environment , make sure that you have done FNDLOAD for new responsibilities prior to running FNDLOAD on users.

Menus:
FNDLOAD apps/ apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct xxaoa_file_name.ldt MENU MENU_NAME="menu_name"

Forms/Functions/Personalizations:
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct FND_FORM_CUSTOM_RULES form_name=

OR
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct xxaoa_file_name.ldt FUNCTION FUNCTION_NAME=
OR
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct xxaoa_file_name.ldt FORM FORM_NAME=
OR
FNDLOAD / 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct FND_FORM_CUSTOM_RULES function_name=

User/Responsibilities:
FNDLOAD apps/ apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct xxaoa_file_name.ldt FND_USER

Alert:
FNDLOAD apps/pwd 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct my_file.ldt ALR_ALERTS APPLICATION_SHORT_NAME=FND ALERT_NAME=Alert name to downloa

Blob:
With Release 12.1.1, FNDLOAD supports BLOB data (upload / download ) to better serve content-rich applications.
FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param ... ]

Overwrite custom definitions:
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/.lct $XX_TOP/import/.ldt CUSTOM_MODE=FORCE

Load an NLS Language:
FNDLOAD / 0 Y UPLOAD \
- UPLOAD_MODE=NLS CUSTOM_MODE=FORCE WARNINGS=TRUE

Migrate the role registration process from one instance to another:
a. Please navigate to the path: $FND_TOP /patch/115/import/US/umxrgsvc.ldt

b. The following command can be used to download:
FNDLOAD apps/@(instance name) O Y DOWNLOAD $FND_TOP/patch/115/import/umxrgsvc.lct umxrgsvc.ldt UMX_REG_SERVICES REG_SERVICE_CODE UMX

c. The following command can be used to upload:
FNDLOAD apps/@(instance name) O Y UPLOAD $FND_TOP/patch/115/import/umxrgsvc.lct umxrgsvc.ldt UMX_REG_SERVICES REG_SERVICE_CODE UMX

Transfer Custom Messages to another Instance:
a. Download the message from the source instance.
FNDLOAD apps/apps 0 Y DOWNLOAD @FND:patch/115/import/afmdmsg.lct password.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=FND MESSAGE_NAME=PASSWORD-INVALID-NO-SPEC-CHAR

b. Move the custom LDT file (password.ldt) over to the destination instance.

c. Upload the custom message to the destination instance.
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afmdmsg.lct password.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME=FND CUSTOM_MODE=FORCE

Download UMX Roles and Role Assignment data from one instance and upload to another:
To download from one instance:

FNDLOAD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afrole.lct
umxroles.ldt WF_ROLE ORIG_SYSTEM=UMX%

To upload to another instance:

FNDLOAD 0 Y UPLOAD $FND_TOP/patch/115/import/afrole.lct
umxroles.ldt

Notes:
    Give special attention when downloading Menus or Responsibilities.  In the case for several developers modifying Responsibilities and Menus, then be very careful.  Not being careful will mean that untested Forms, Functions, and Menus will become available in the clients Production environment besides the tested Forms, Functions, and Menus.
    Be very careful when downloading flexfields that reference value sets with independent values for GL Segment Codes.  By doing so, downloading and extracting all the test data in GL Codes that might not be applicable for production.
    There are several variations possible for FNDLOAD.  For example, restricting the download and upload to specific segments within Descriptive Flexfields.
    FNDLOAD is very reliable and stable, if used properly.
    Please test the FNDLOAD properly, so as to ensure that no unexpected data occurs.
    As the name suggests, FNDLOAD is useful for FND related objects.  However, in any implementation,
    its required to migrate the Setups in Financials and Oracle HRMS from one environment to another.
    Oracle iSetup can be used for this.  Some of the things that can be migrated using Oracle iSetup are GL Set of Books,
    HR Organization Structures, HRMS Employees, Profile Options Setup, Suppliers, Customers, Tax Codes & Tax Rates, Financials Setup,
    Accounting Calendars, Chart of Accounts, GL Currencies.

XML DATA DEFINITION:
DOWNLOAD   
FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD  $XDO_TOP/patch/115/import/xdotmpl.lct XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=DATA_SOURCE_CODE= TMPL_APP_SHORT_NAME=

FNDLOAD

FNDLOAD

These are the extensive list which can be done through FNDLOAD.

    Concurrent Programs, Executables
    Request Groups, Request Sets
    Profile Options
    Key and Descriptive Flexfields
    Menus and Responsibilities
    Forms and Form Functions/Personalizations
    Attachments
    Messages
    Value Sets and Values
    Lookup Types
    User Responsibilities
    Printer Definitions
    FND Dictionary
    Help Configuration
    Document Sequences
    Alerts
    Concurrent Manager Schedules
    AME Setups
    Web ADI
    Post Accounting Programs SLA

The FNDLOAD: Concurrent Program – FNDLOAD can be executed as a concurrent program.

Some advantages when using FNDLOAD:

    Because downloaded data is stored in a text file, version administration is possible.
    There is nothing to worry to go to purchase because Investment = 0$.
    No learning curve. this is relief for developer and dba.
    Fully supported and recommended by Oracle.
    Capture the migrations in a file and use it during installations, clones etc. to migrate in batch.
    Pin-point when something happened and where (database) easily.
    Your AOL data migration process is now simplified and streamlined goal attained.

Some disadvantages when using FNDLOAD:

    Applications patching mechanisms use FNDLOAD heavily possibility of negative impact is not zero.
    UPLOAD_MODE=REPLACE only for menus.
    No validation against migrating database/instance sensitive data.

Syntax:

The Generic Loader is a concurrent program named FNDLOAD. The concurrent executable takes the following parameters:

FNDLOAD apps/pwd 0 Y mode configfile datafile entity [ param …]
where


The APPS schema and password in the form username/password[@connect_string]. If
connect_string is omitted, it is taken in a platform-specific manner from the environment
using the name TWO_TASK.

< 0 Y >
Concurrent program flags.

mode
UPLOAD or DOWNLOAD. UPLOAD causes the datafile to be uploaded to the database. DOWNLOAD causes the loader to fetch rows and write them to the datafile.


The configuration file to use (usually with a suffix of .lct, but not enforced or supplied by the loader).


The data file to write (usually with a suffix of .ldt, but not enforced or supplied by the loader). If the data file already exists, it will be overwritten.


The entity(ies) to upload or download. When uploading, always upload all entities, so specify a “-” to upload all entities.

< [param] >
Zero or more additional parameters are used to provide bind values in the access SQL (both UPLOAD and DOWNLOAD). Each parameter is in the form NAME=VALUE. NAME should not conflict with an attribute name for the entities being loaded.

Modes of Operation
This is important because it would drive the whole flow, and it always be either Upload or Download.

Example of download
FNDLOAD apps/pwd 0 Y DOWNLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt \ PROGRAM CONCURRENT_PROGRAM_NAME= concurrent_program_short_name> APPLICATION_SHORT_NAME=

Example of Upload
FNDLOAD apps/pwd 0 Y UPLOAD ${FND_TOP}/patch/115/import/afcpprog.lct myfile.ldt – CUSTOM_MODE=FORCE undocumented parameter

What are FNDLOAD Options?

    Application level OR single entity level download
    (Example) Download all the profile options of Inventory or just the INV: Default Primary UOM
    Entire OR Partial upload of a data file
    (Example) Upload the entire myfile.ldt or just a single entity indicated by – and mode UPLOAD or  UPLOAD_PARTIAL
    Entity name required for UPLOAD_PARTIAL mode
    Custom mode force update
    To override Oracle’s upload algorithm and update the custom AOL data regardless, use CUSTOM_MODE= FORCE
    UPLOAD_MODE= REPLACE (only for menus)
    Support for NLS uploads
    NLS data uploads for translated columns are supported, use UPLOAD_MODE= NLS

Where is Configuration File Located
By default Oracle delivers most of configuration files that can be used to download certain entities.

    Configuration files with extension .lct
    On Unix – all the configuration files are in $FND_TOP/patch/115/import directory
    On Unix Oracle also places the original configuration files in $FND_TOP/admin/import directory
    Data files with extension .ldt

FNDLOAD File Structure

      The configuration files (.lct) are delivered and maintained by Oracle.
      It has entity definitions, parent-child relationships and user input parameters identified by :NAME.
    Downloading a parent automatically downloads all children – (Example) Concurrent Program download.
    The data files (.ldt) have both entity definition and the data.
    It also shows the version and the location of the configuration file (.lct) that was used.
    Without the configuration file, a data file is useless.
    Without the data file, a configuration file is meaningless.

FNDLOAD Files

    Key files: .lct and .ldt
    FNDLOAD must be run as the apps user not as applsys or any other user, otherwise an Ora-6550 error will be received.
    Both are easily readable, editable and portable.
    Do not modify Oracle .lct files.
    Use a favorite editor to manipulate only the .ldt files but be cautious about data type, length, delimiter placements etc.
    Use the log file outputs or .ldt file contents creatively for quick file comparisons and answer questions as: (Why can this be accessed? What is that profile option name, value and level? What is the value set used for that DFF segment attribute10 etc.)
    Partial string searches (which value set has Priority something in its where clause, etc)



Custom.pll Compilation

Copy the CUSTOM.pll to the path $AU_TOP/resource and use the below command to compile.

frmcmp_batch module=CUSTOM.pll userid=apps/ output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special

Copy Table Data from One Database to Another Database

Here we are using TOAD to  copy Table data from one DB (Instance) to another DB (Instance).
Step1: Go to Schema where your table data exists

How to copy Table data from one DB to another DB, askhareesh blog for Oracle Apps

Step2:  Go to the Describe Objects Window (Place your cursor on Table and click F4 button)
How to copy Table data from one DB to another DB, askhareesh blog for Oracle Apps

Click on Copy data to another schema.
Step3: Give the Destination Connection and Schema and click on Run button(Begin Copying Data). You should have same table name with the same columns in the destination schema.
How to copy Table data from one DB to another DB, askhareesh blog for Oracle Apps 
How to copy Table data from one DB to another DB, askhareesh blog for Oracle Apps



How to copy Table data from one DB to another DB, askhareesh blog for Oracle Apps

FND_PROFILE and FND_GLOBAL Functions Usage

FND_PROFILE values:

fnd_profile.value('PROFILEOPTION');
fnd_profile.value'MFG_ORGANIZATION_ID');
fnd_profile.value('ORG_ID');
fnd_profile.value('LOGIN_ID');
fnd_profile.value('USER_ID');
fnd_profile.value('USERNAME');
fnd_profile.value('CONCURRENT_REQUEST_ID');
fnd_profile.value('GL_SET_OF_BKS_ID');
fnd_profile.value('SO_ORGANIZATION_ID');
fnd_profile.value('APPL_SHRT_NAME');
fnd_profile.value('RESP_NAME');
fnd_profile.value('RESP_ID');

FND_GLOBAL values:

FND_GLOBAL.USER_ID;
FND_GLOBAL.APPS_INTIALIZE;
FND_GLOBAL.LOGIN_ID;
FND_GLOBAL.CONC_LOGIN_ID;
FND_GLOBAL.PROG_APPL_ID;
FND_GLOBAL.CONC_PROGRAM_ID;
FND_GLOBAL.CONC_REQUEST_ID;

Examples to initialize the application environment:

v_user_id      PLS_INTEGER  :=  fnd_global.user_id;
v_login_id     PLS_INTEGER  :=  fnd_global.login_id;
v_conc_req_id  PLS_INTEGER  :=  fnd_global.conc_request_id;
v_org_id       PLS_INTEGER  :=  fnd_profile.value('ORG_ID');
v_sob_id       PLS_INTEGER  :=  fnd_profile.value('GL_SET_OF_BKS_ID');

v_resp_appl_id  := fnd_global.resp_appl_id;
v_resp_id       := fnd_global.resp_id;
v_user_id       := fnd_global.user_id;
     
FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id, v_resp_appl_id);

Run Concurrent program without Using SRS Window


We can run concurrent program with out adding it to request group or using SRS window by adding it to Menu.

Step1:

    Create a concurrent program or choose which concurrent program that you want to run and choose from which responsibility.
     Find the concurrent program short name.


Step2:

Navigation:
System Administrator --> Application --> Function
Create a function.


We can run concurrent program with out adding it to request group or using SRS window by adding it to Menu.

Step1:

    Create a concurrent program or choose which concurrent program that you want to run and choose from which responsibility.
     Find the concurrent program short name.

Run Concurrent program without Using SRS Window, askhareesh blog for Oracle Apps



Step2:
Navigation:
System Administrator --> Application --> Function
Create a function.


Move to Form tab there choose  form as “ Run Reports ”.
This Run Reports form is nothing but SRS Window form.
Here we will pass the parameters to “Run Reports“ form.


Parameters:
USE_ORG="N" CONCURRENT_PROGRAM_NAME="XXCCP_NAME"       PROGRAM_APPL_SHORT_NAME="XX"

USER_ORG : Determines whether the organization ID must be set up before the request is run.If this is set to “ Y ” then following four ORG parameters will be used.

    ORG_ID  Specifies a particular organization  ID.
    ORG_NAME Specifies a particular organization name.
    ORG_CODE specifies a particular organization code.
    CHART_OF_ACCOUNTS_ID Specifies a particular chart of accounts ID


CONCURRENT_PROGRAM_NAME  : Concurrent program short name
PROGRAM_APPL_SHORT_NAME : Program registered application name

Step3:
Add the function to Menu.
Copy the User Function Name and open the Menu’s form and attach the function to menu.


 Save your changes and navigate to the responsibility.



Double click on the prompt then SRS window with your concurrent program will pop up directly.