Tuesday, 19 April 2011

Profiles


Profile :
Profile is one of the changable option it will change the way of
application execution.

When User Log in to the application and select the the resp or Appl 
system will automatically captures all the profile value as per the
profile values application will run.

Ex: If client have three Organizations 1)Hyd
           2)Ban
           3)Chn
If "hyd" users connect to the Application system will retrive the
data from database which is related to the Hyderabad branch.
If user is working for 'CHN' brnach then chennai branch setups or data
will be retrieved.

For every user we will assign the Profile value

Ex: Operation  

Position - Profile Name
Profile Values
--------------
Manager
Supervisior
Clerk
Operator
Trainess

When we want assign any profile value we have four levels 
we have to select any one of the level.


Profile Level   Profile  Profile Value
-------------   -------  --------------
User  - OPERATIONS -  Print  - 10(This is for for Operations)  
Responsibility  - 22Responsi -  Print  -  5(This is for 22resp users)
Application     - GL Applica -  Print  -  4(This is for GL App Users)
Site  - ---        -  Print  -  2(This is for ALL Users)

Site : this is lowest level to assign the Profile values site values
are applicable for all the users.when we install Application by default
site level values will be assigned.

Application: These values are applicable for the users who are having 
the access for the application. If user is eligible for both 
application and site level values then application level value will
override the site level value.

Responsibility:We will select the responsibility name assign the value
which is applicalbe only for the users who are having the access for 
specified responsibility.

Responsibility level value will override both application and site
level values.

User: This is highest level in the profile option.
we will select the user name and assign the profile value which is
applicable only for this user.
User level value will override all other profile level values.

Diff between Application and Responsibility:
============================================
Both are Group of Forms(Menu)
         Group of ConcurrentPrograms(Request Group)
         Group of Users (Data group)
But Application as per the Business functionality requirement
Responsibility will group as per the position requirement.

Some of the Imp Profile Names:

GL:Set Of Books
MO:Operating Unit
Hr:Business Groups
MFG_ORGANIZATION_ID
USER_ID
RESP_ID
USERNAME
RESP_NAME and so on..........



                                                                     
                                             
note: In the Projects most of the profile values will be assigned at the Responsibility
level.


Diff Between Application and Responsibility:
      ===========     ===============

Applciation is nothing Colletion of Forms,Reports and Program which are related for 
specific business functionality.

Responsibility is nothing but Colletion of Forms,Reports and Program which are related for 
specific Position in the Organization.

For Ex : We have to create One Responsibility For the Clerk. Which is accesable by all 
         the Clerks.
     It Contains the Forms and Reports which are required for the Clerk.

We have to Create new Responsibility for the Manager,Which is accesable by all the 
Managers.
It COntains the Forms and Reports which are required for the manager.

Where as Application includes all the Forms,Reports and Programs.If we assign the 
application to the user he will access all the forms and Reports.
Intead of that we will create the responsibility and we will assign to the User.          
          
Common Profiles:
================

Gl:Set of Books: Which is Financial Profile option will be uset to assin SetofBooks
HR:Business Group : Which will used to assign the Business Group
MO:Operating Unit : To assign the Operating Unit (Branch) to the users.
MFG_ORGANIZATION_ID: Will Be used to assign the Manufacturing Organization ID.

USER_ID
USERNAME
RESP_NAME   and so on.........

We can find all the Profile details in Application Developer Responsibility.
We can assign the Profile values in System Administrator Responsibility.

Application Developer=>Profile =>Press CTRL+F11 we can find all the profiles.

System administrator=>profile=>System=> Select Profilename,Level =>Find button
then assign the Profile value.

Set Of Books :SOB is nothing but collection of Currency
             Calendar
             Chart of Accounts.
We will assign the SOB as a profile value to the user as per the Profile value system
will automatically change the application running.

Base on the SOB  name we can find the change in the currency and calendar and accounts

SELECT     NAME,
    CURRENCY_CODE,
    PERIOD_SET_NAME,
    CHART_OF_ACCOUNTS_ID 
FROM GL_SETS_OF_BOOKS

SELECT * FROM GLFV_CHARTS_OF_ACCOUNTS  WHERE CHART_OF_ACCOUNTS_ID = 50713

22USER   GL:Set Of Books   Vision Operations (USA)   USD
23USER   GL:Set Of Books   Vision Korea       KRW
24USER   GL:Set Of Books   Vision Italy       ITL

Create Three users
Assign Profile values from System administrator (Profile=>System)
open the GL Form and verify the curency values  (GL=>Journal=>Enter=>new Journal)

Note: Most of the profile values will be assigned  at Responsibility Level.


Retrieve the Profile Value from Backend:(SQL,PL/SQL,Forms6i,Reports6i)
======================================

Fnd_Profile.Get('ProfileName',
  local Variable);

local Variable:= Fnd_Profile.Value('Profile Name');

Both API's will be used to retrieve the Profile value frombackend

Get()   is Procedure
Value() is Function

Oracle Has provided both Procedure and Function becuase in some of the areas we can not
use procedure then we can use function.

For Ex: in SELECT clause we can not use procedure we have to go for using the Function.




1)We would like to display the Set of Books name 
          User name
          Respname     in the first page of the report.

22USER
23USER
24USER

Ans)

1)Define the Local Variable
2)Goto before Report Trigger write the follwoing API
  

  :P_SOBNAME:= Fnd_Profile.value('GL_SET_OF_BKS_NAME');
  :USERNAME := Fnd_Profile.value('USERNAME');
  Fnd_Profile.Get('RESP_NAME',
       :RESPNAME);
3)Goto Layout model Header section and Display the Variable Name.
4)Submit from Diff Users and test the Output we can find the Difference.



2)Develop the PL/SQL Program for vendor Name updation. Vendor name should be updated
  if "OPERATIONS" user submit the Program for other users should not get update.

Parameters are    VendorID
    VendorName   

Create Or Replace Procedure ven_update(Errbuf  OUT varchar2,
               Retcode OUT varchar2,
          v_id    IN number,
          v_name  IN varchar2)  as
l_name   varchar2(100);
begin
l_name:=Fnd_Profile.value('USERNAME');
If l_name = 'OPERATIONS' then
UPDATE PO_VENDORS
SET VENDOR_NAME = v_name
WHERE VENDOR_ID =v_id;
commit;
Fnd_File.Put_line(Fnd_File.Output,'vendorname has updated succesfully');
Else
Fnd_File.Put_line(Fnd_File.Output,'Access Denied for updateion');
End If;
End;

Note: We can pass the profile value as default value by using Profile default type.
 Select Default type = profile
        Default Value= Profile Name
When we are passing Profile value  as default we are suppose to hide the Parameter 
because profile is confidential Information we are not suppose to give permission for
modifications.

Procedure Registration Steps In APPS


Procedure Registration Steps:


1)Develop the procedure and compile  at SQL prompt
2)Connect application select system administrator Responsbility create
  Executable by selecting the Execution Method as 'PL/SQL Stored Procedure'
3)Create Concurrent Program and attach Executable to the Program and add the
  Parameters and  incompatible programs.
4)Create Request group attach concurrent Progrtam
5)Attach Request group to the reponsibility   
6)Responsiboility  will be added to the user.
 User will submit the request from SRS Window.

Syntax:
Create Or Replace Procedure <ProcedureName> (Errbuf OUT varchar2,
          Retcode OUT varchar2,
          P1    IN NUMBER,
          P2    IN VARCHAR2,
          P3    IN DATE) AS
Local variable,Cursor,Collections Declare;
Begin

If statement
For Loop 
Procedure Calling            
DBMS_OUTPUT.Put_Line - This will not be used instead of this Fnd_File API will be used

FND_FILE.PUT_LINE(Fnd_File.Log   ,'Message'||Variable Name);
FND_FILE.PUT_LINE(Fnd_File.Output,'Message'||Variable Name);
Exception
When Other then
-Exception Statements;
End <Procedure Name>;

PL/SQL Procedure with Parameter:
================================
If we have any user defined Parameters then we have to register these parameters at the
time of Creating the COncurrent Program by selecting the Parameter button
enter the Seqno
   Parameter Name
   Value Set
Note : Token Field will be disabled. 
Here First Parameter value will be passed to the first variable
Second Parameter will be passed to the second variable and so on........

When we are registering the report as C.P then only we required TOKEN field.
Because report builder bind variables may or may not be in the sequence that's why 
we have to map with Token field.

Where as in Procedure variables position is fixed then TOKEN field will be disabled.






















PURCHASE ORDER USE FULL INFORMATION


                   PURCHASE ORDER USE FULL INFORMATION                                                  
                                                                     
                                             
PO Application will be used to capture the purchasing information.
Oracle is developed pre defined forms and as well as Concurrent Programs and other
related programs.Client Directley can use those forms and Programs or client 
can customize the existing objects(Forms,Reports,Programs)

During the PO application flow we can find the three types of people 
1)Requestor : Employee who require the materials
2)Preparer  : Employee who is going to prepare the Document 
3)Buyer     : Employee who is having the authority to purchase the materials from the
              Suppliers.

Requisition: is one of the purchasing document will be prepared by the employee when
   ever he required the materials or Services or Training and so on.
we have two types of Requisitions 1)Internal
     2)Purchase

Internal requisition will be created if materials are receiving from another Inventory
inside of the organization.
Purchase requisition will be created while purchasing the materials from the Suppliers.

Requisitions=>Requisitions

We will enter the Requisition at three level 1)Header
          2)Line
          3)Distributions.

Open the Requisition form enter the Reqno and select the type at Header level
 Enter the Items information at line level like Item name,qty,unitprice,tax and so on
select Distributions button enter the Distributions details.
Save
Select the Button called Approve button to go for approving the Requisition Document
Open the Requisition summary form.
Enter the Reqno select find button we can find the Requisition status wether it is 
approved or not.
select Tools menu => View Action History to find the history details
Select Tools Menu  =>Control option to Cancel the requisition.

RFQ Document:(Request For Quotation)
=============

Once the Requisition is Approved Buyer will prepare thre RFQ document which will be 
delivered to the supplier. Supplier will respond for that with quotation.
we have Three types of RFQ documents

BID RFQ:This will be prepared for the secific fixed quantity and there won't be any 
        PriceBraeaks(Discounts).

catalog RFQ: This will be create for te materials which we will purchase from the 
        suppliers regularley , and large number of quantity. Here we can specify the 
        Price Breaks.

Standard RFQ:  This will be prepared for the Items which we will purchase only once
        not very often,Here we can include the Discounts information at different
        auantity levels.
RFQ Information will be entered at 3 Level
  1)Headers
  2)Lines
  3)Price Breaks(CATALOG,STANDARD) or Shippments (Only for Bid RFQ)

Terms And Conditions:
While creation of the RFQ documents we will select the Terms button and we will enter
the terms abd condition details.

Payment Terms: When Organization is going to make the payment and Interest rates 
Fright  Terms: Who is going to Bear the Tansportation chargers wether Buyer or Supplier
FOB(FreeOnBoard): If any materials damage or any missing quantity is there then the
             the responsiboility of those materials.
Carrier     : In which Transportation Company Organization Required Materials 
              Transportation company Name.

Open the RFQ Form

RFQ and Quotations=>RFQ's 
select TYpe and Dates and so on
enter the Items details at line level
select terms button enter the Terms and Condition Details
Select the Price Braks button enter the Price break details
Save
Select the suppliers button enter the suplier details (Who are receiving this Document)
Select the Button called Add from List to Include the supplier list automatically.

 Buyer Name     : TABLE (Internally buyer ID should pass)  - Optional
     


RFQNo               Shipto
Type         Billto
Due   date        Curr
Close date        Total
creation date       User(created_by)

Lineno    Item     UOM  Price   Shipno   Qty   Price  Discount   
-----     





















Quotations:
===========
Quotation is another purchasing document we will receive from the Supplier which 
contains the supplier quote details , Price, Payment terms and so on.

Whatever the quotations we have received from the supplier we will enter in the system
through form.

We have three types of Quotations 1)Bid 2)Catalog 3)Standard

For Bid RFQ      we will  receive Bid      quotation from the Supplier 
For Catalog RFQ  we will  receive Catalog  quotation from the Supplier 
For Standard RFQ we will  receive Standard quotation from the Supplier.

After enter all the quotations in the system management will do quote analysis as per
that one best quotation will be elected as Purchase Order.

    Quotation Report
    
    Item Name   (Table Value set MTL_SYSTEM_ITEMS_B   Segment1)
    
QuoteNo Type  Cdate Supplier Site ContactPerson Buyer   Created(UserName) 



po_headers_all
po_lines_all
mtl_system_items_b
po_vendors
po_vendor_sites_all
po_vendor_contacts
per_all_people_f
fnd_user


Auto Create:
============
It is one of the Purchasing feature to create the RFQ and  PO documents automatically
by using requisition lines.

1)Create Requisition and approve
2)Open the AutoCreate form
3)Select Clear button enter the RequisitionNO
4)Select find button which will shows all the requisition lines 
  select the lines whatever we want to include into the RFQ
5)select Action = Create to create new RFQ
    AddTo  to add lines to exisiting to RFQ
6)Select DocumentType = RFQ    
7)select Automatic button which will create RFQ document automatically .

Purchase Order : 
================ 
PO is one of the Main document which will be prepared and approved by the buyer and
send it to the supplier. which contains the following information
terms and Conditions
Items deails
Qty,Price
Distiribution and Shipment Details and so on.

We have four types of Purchase Order 1)STANDARD
         2)PLANNED 
         3)BLANKET
         4)CONTRACT  

Purchase Orders=> Purchase Orders
Open the PO form enter the Inforamtion at header level select line level inforamtion
enter the items and quantity,price details
select shippments button enter the shippment details select the Distributions button 
enter the Distribution Detauils.
Save
Select the Button called Approve (Uncheck Email Check Box) , Document will be submitted
for approval.
open the Purchase Order summary form  enter PO number Select Find button we can find
the status of the Purchase order.
Goto Tools menu 
Action History => We can find who hs submitted for Approve /Reject /Cancel details
Copy Document  => To Create Another PO based on this PO
Control        => To Close the Purchase Order or to cancel the Purchase Order.

  Purchase Order Report
  =====================

POno :   Buyer:
Potype :   Supplier:
ShipTo :   Supplier  Site:
BillTo :   Contact :
Cdate :   Status :             POTotal  :

payment Terms:            Fright Charges:        FOB:    Carrier:

Lineno  Item  Desc  Qty  price  Shipno  ShiptoLoc  ShipToOrg Qty Distno Distqty Requestor
-----   ----  ----  ---  -----  ------   --------  --------- ---  -----  ------ ------  


    






















KFF AND KFF vs. DFF: Comparison


KFF (Key fLex Fields)
=====================

KFF will be used to Capture the Key Information in code language for every code
there will be specific meaning in the application.

For Ex: we can find some of the fileds like follows

Code Combination  01-001-1540-1234-0000

  01-Operations
 001-HRMS
1540-Furniture
1234-Sales Account
0000-No Product

 Description     : Operations-HRMS-Furniture-Sales Account-No Prodcut

like this we can find the meaning in the application for every code.

We will use the Segment Columns to Capture the KFF Data.
We can find the Segment coumns in most of the Tables like 
SEGMENT1,SEGMENT2,SEGMENT3,..........SEGMENT30.

Diff Between DFF and KFF

DFF     KFF
-----     ---
1)DFF Will be used to capture the Extra 1)KFF will be used to Capture the Key 
  Information.                            Information

2)ATTRIBUTE Columns will be used         2)SEGMENT columns will be used

3)We can have max DFF in the Application 3)We have 30KFF already defined by Oracle 
  there is no Limit       we can customize existing KFF. We are not
        suppose to define the new KFF. We will not
        get support from Oracle.
4)In DFF we will Context Field to define  4)In KFF we will define Structure Column 
  Multiple Strutures      to define the Multiple Structures.
P_FLEXDATA: Is a Lexical parameter will be used to store the default
 value as concatenation of all the segment columns.
This is required because if client changes the segment structure 
from front end again we have to change all the structure.
instead of that we can concatenate all the segments.

lexical parameter means datatype :char width : min 600

p_struct_num:
It will be used to store the  kff structure number which is required
if KFF is having the multiple structures.
Ex: 101 default value

FNDFLEXSQL: 
----------
This is One of the User exit will be used to retrive the segment 
values from database and will be used in the before report trigger
Parameters:
CODE              -KFF Code
num               -KFF structure Number
appl_short_name   -KFF Application ShortName
OutpuT            -Lexical parameter Name
Display           -Display all the segments
Mode              -'SELECT'


FNDFLEXIDVAL:
-----------
This user exit we will define inside of the formuls column to display
the data in the layout.
define the formula column call the user exit with follwoing parameters
Parameters:
CODE              -KFF Code
num               -KFF structure Number
appl_short_name   -KFF Application ShortName
OutpuT            -Lexical parameter Name
Display           -Display all the segments
Mode              -'SELECT'
data    -Lexical Parameter Name
Value             -Formula Column Name

Note :
To Display the KFF description we will define one more formula column
and we will call again 'FND FLEXIDVAL' user exit with parameter called
'Description' instead of 'Value' Parameter.

Interfaces


Interfaces:
   -------------


Interface is one of the Program which will be used to transfer the data from Oracle
database tables in to flat file   (or)
Flat files      into  Database tables

We have two types of Interfaces.

1)Inbound Interface
2)outbound Interface

Outbound Interface will be used to extract the data from oracle Database tables into 
the flat files.

Inbound Interface will be used to upload the data from legacy system (Flat files) into
Oracle Applications base tables.

While developing the outbound Interface we will use UTL_File to Extract the data.
While Developing the Inbound interface  we will use SQL * loader to import the data 
into base taqbles.
Converstion Vs Interfaces

Interfaces:
It is schedule concurrent Process which will be executed multiple times
We will not be knowing flat file Volume
We need to handle all the expected exceptions
Error Reports and sending mail alerts, If any error occurs
Only in Enhancement or customization projects

Conversion:
One time data transfer
We will be know exact falt file Volume
No need to know the exceptions
Not required to upload all records
Only in Implementation,Migration or up-gradation projects
UTL_FILE Package :
==================

this is One of the PL/SQL Package which will be used to transfer the data
from table to files
from files to tables

But when we are working for file to table we will use SQl *Loader
to transfer from table to file we have no alternative we have to use UTL_FILE.

We will use following three functions to generate the file.

1)Utl_File.fopen     = To open (or) Create the file
2)Utl_File.Put_line  = To Transfer the data into the File.
3)Utl_File.fclose    = To close the File after Data transfer.



outbound Interface Process:
=============================

1)Develop the PL/SQL Program (Either Procedure or Package)
2)Write the Cursor to retrieve the data from database tables.
3)Create file or Open the File by using UTL_File.fopen().
4)Open the Cursor
5)If any validations are there write the validations
6)Transfer the Data into File by using UTL_File.Put_Line().
7)Close the Cursor.
8)Close the File by using UTL_File.fclose();
9)Register the Procedure or Package as Concurrent Program and submit from SRS Window.



For Ex : We required the flat file with following Format.

Supplierno,Supliername,Cdate,Sitename


Develop the Program to Transfer Supplier Purchase orders datainto file


Supplier No from
Supplier No To  

PoNumber,POtype,Amount,Cdate,No,Name,Site


Validations:

1)If Parameters are null select all the supplier details
2)If 'from' is given  'To' is not given take till Last Supplier
3)If 'To' is given and 'from' is not given take from first.
4)If Purchase order amount is more then 3500 then only transfer into file.
 

   




























FLEXFIELDS


FLEXFIELDS:
===========
 Flexfield are made up with Attribute columns or Segment columns . 
which are more flexible than the normal fields.
we have two type of flexfields
1)DFF (Descriptive Flex Field)
2)KFF (Key Flex Field)

DFF: It will be used to capture the Extra information from the end user 
without change the code in the form and without Alter the DB object.
     ATTRIBUTE Columns will be used to Capture the DFF data.

KFF: it will be used to Capture the Key information from the User 
     in code language for every code there will be a specific meaning.
     SEGMENT Columns will be used Capture the KFF Data

We can find all the flexfield details in Application Developer 
Responsibility

Flexfield=>Descriptive=>register=> CTRL+F11 for all DFF
Flexfield=>Key        =>register=> CTRL+F11 for all KFF

We will Use the Segment form to Customize the DFF.

DFF CUSTOMIZATION STEPS


DFF CUSTOMIZATION:
1)Open the form where DFF is Implemented. and Query the Data

2)find the DFF name from Help Menu =>Diagnastcs =>Examine
    Select  $DESCRIPTIVE_FLEXFIELD$ in the Block field
    select  DFF name in the "Field"
    we will get the DFF Title in the Value field.
 Copy the DFF title 

3)goto Application Developer Responsibility.
 flexfield=>Descriptive=>register

4)Query the records by using the  DFF Title.
 Select columns button and find wether Attribute
  columns are enabled or disabled.

5)Goto Segments form and Query the records by using Title.

6)Uncheck the Check box called "freeze Flexfield Defination"

7)Select Segents button and enter the new fields and save transactions.

8)Check the check box called "freeze Flexfield Defination" 
and click the Compile Button.

9)System will change the DFF structure and creates 
a descriptive flexfield View.