Sunday, 22 May 2011

Descriptive Flex Fields


    Descriptive Flex Fields

Most of the Oracle application screens come with a facility to expand the space to capture custom fields. This facility of adding new custom fields (without any programming) is called DFF or Descriptive Flex Fields. The advantage of DFF is that around 15 new custom fields can be captured on each of the database table based block or form without doing any programming. The availability of facility of DFF on a screen is shown by square bracket [ ] and is shown below in figure 1.


For using a DFF facility on a standard screen, it has to be activated first. The activation is done by system administrator responsibility and it includes deciding number of fields to be used, window title of the fields, valid values of the fields, context etc. Once activated, the DFF field is immediately available for use. It can be used by clicking on the [ ] field which pops up a screen to capture the enabled fields.


DFF Features
DFF is directly mapped to a table and each segment of DFF is mapped to an individual field of the table. These fields are often named as ATTRIBUTE1, ATTRIBUTE2, …, ATTRIBUTE15 (most of the time, we have maximum of 15 attribute fields available in each standard table). In addition to these 15 attribute fields, there is also one field called ATTRIBUTE_CATEGORY. This field is called Context field or Structure Field. How the structure field is used is explained below:

Some time there is a requirement to capture context sensitive information in DFF fields. Suppose in HR form, we want to capture some custom information. If we are entering record for an Employee, we want to capture certain information; on the other hand, if we are entering record for an Applicant, then we want to capture some other custom information. This can be achieved by defining different contexts. In the example, just given, we can define two contexts, Employee and Applicant. Depending upon what context is chosen, we will show the corresponding fields to the users for entry.



Uses
DFF is a very powerful feature of oracle applications which provides lot of extensibility to an implementation. Since Oracle Applications is implemented across diverse businesses and each business may need different kind of information to be captured (in addition to the standard information capturing which oracle provides), DFF comes in very handy to capture the custom information. Fields captured by DFF are stored in the database and are automatically queried whenever corresponding record is queried on the screen.


Examples
  1. A business ABC wants to capture additional supplier attributes like supplier turnover, supplier’s rating etc. These fields are not captured by standard oracle application screen and can be captured by activating DFF on supplier screen.
  2. A leasing company wants to capture maximum mileage allowed and mileage penalty imposed for extra miles for the trucks it leases. These fields are not provided in the standard oracle applications and can be captured by activating DFF on lease authoring screen.


How to enable DFF

Enabling a DFF can be best illustrated by an example. We will take GL Daily Rate Screen (Navigation: GL Super User => Setup => Rates => Daily) for this discussion.  
The screen is shown below. The screen has the DFF facility available but is not active currently.

We want to enable this DFF to capture two more fields:

 Exchange Rate Source
 Exchange Rate Time
  
  1. First step is to find out the corresponding table name for this screen. This can be found by querying the record and then going to Help => Diagnostics => Examine and checking the Last Query field in the System Block. This will provide us with the table name underlying the data.  In this example, our table name is GL_DAILY_RATES.  
  2. Now go to Application Developer Responsibility and Navigate to Flexfield => Descriptive => Register. Now do a query based on this table name (GL_DAILY_RATES).

We note down the Title (which is Daily Rates).

  1. Now, we know the title of the standard DFF available for the Daily Rate screen. This DFF needs to be now enabled. For doing this navigate to FlexField=>Descriptive=>Segments screen and do a query based on the DFF title (Daily Rates).

Global Data Elements context is always pre-populated. If we do not want any context, then we can just click on segments button and define the required segments. However, if we need to define different contexts, then those context can be entered here and the corresponding segments can be entered for each of chosen contexts.

  1. Click on the Segments button, and enter the values as shown below. We can associate value-set for each segment so that users can enter only valid values when entering a record.

  1. Save the changes and come back to the previous screen. Click on Freeze Flexfield definition check-box and save the changes.  

  1. Now, we are done with activating the DFF. Come back to the Daily Rate Screen and see that DFF is enabled and can be used to capture two new fields as shown below:
 

Defining a new DFF

DFF is implemented using the Attribute column fields in a table. For example, let us consider definition of a table GL_DAILY_RATES.

SQL> desc gl_daily_rates
 Name Null? Type
 ------------------------------- -------- ----
 FROM_CURRENCY NOT NULL VARCHAR2(15)
 TO_CURRENCY NOT NULL VARCHAR2(15)
 CONVERSION_DATE NOT NULL DATE
 CONVERSION_TYPE NOT NULL VARCHAR2(30)
CONVERSION_RATE NOT NULL NUMBER
STATUS_CODE NOT NULL VARCHAR2(1)
CREATION_DATE NOT NULL DATE
CREATED_BY NOT NULL NUMBER(15)
LAST_UPDATE_DATE NOT NULL DATE
LAST_UPDATED_BY NOT NULL NUMBER(15)
LAST_UPDATE_LOGIN NOT NULL NUMBER(15)
CONTEXT VARCHAR2(150)
ATTRIBUTE1 VARCHAR2(150)
ATTRIBUTE2 VARCHAR2(150)
ATTRIBUTE3 VARCHAR2(150)
ATTRIBUTE4 VARCHAR2(150)
ATTRIBUTE5 VARCHAR2(150)
ATTRIBUTE6 VARCHAR2(150)
ATTRIBUTE7 VARCHAR2(150)
ATTRIBUTE8 VARCHAR2(150)
ATTRIBUTE9 VARCHAR2(150)
ATTRIBUTE10 VARCHAR2(150)
ATTRIBUTE11 VARCHAR2(150)
ATTRIBUTE12 VARCHAR2(150)
ATTRIBUTE13 VARCHAR2(150)
ATTRIBUTE14 VARCHAR2(150)
ATTRIBUTE15 VARCHAR2(150)
RATE_SOURCE_CODE VARCHAR2(15)

This table contains a field called CONTEXT and 15 Attribute columns. The Context field stores the structure or content of the DFF and attribute columns store the actual values of the custom fields.

When we create a DFF definition (as shown below), we choose a Structure Column (CONTEXT in the below example) and also choose a prompt for the Context.
 
The fields to be used in the DFF design can be associated by clicking on the Columns button and checking the enabled button as shown below:

There is also a button called Reference Fields, which is used for defining the reference fields for DFF as shown below:


Reference fields are useful for automatically prompting user to enter required values. This can be explained by an example:

Suppose a manufacturing firm sells three kinds of items – Computer, Printers and Fax Machines. Depending upon the item type, we would like to capture different kind of custom information from the user. If ‘item type’ is a reference field in the DFF definition, then we can choose ‘item type’ in the reference field during DFF enabling. For each item type, we can define a context field (Computer, Printers, Fax Machines) and the corresponding segments. When user enters item information, depending upon the item type, the corresponding DFF structure appears automatically.

FAQ on DFF

  1. Can we create a custom DFF?
Ans. Yes, we can create a custom DFF. But the table to be used in the DFF should be registered with Oracle Applications.

  1. How do we use a custom DFF?
Ans. Custom DFF can be used only in a custom form. For details on how to use a custom DFF in custom form, please see Oracle Forms section.

  1. What is meant by Global Context?
Ans. When we need to capture same kind of information for all the records, then global context can be used. In this case, for all the records, the same structure appears for data entry.

  1. How do we use different Attribute columns during DFF activation?
Ans. If we are using two different contexts (say Printer and Fax) and not using Global Context, then we can re-use the attribute columns. That means, an attribute column associated with Printer context can also be associated with the Fax context. However, if we are using global context also, then the attributes used in global context cannot be re-used for any other context. For example, if we are using Attribute1 to Attribute3 in the global context, then we can use only Attribute4 to Attribute15 in the other contexts.

  1. What is the Difference between Reference Field and Context?
Ans: When we use multiple contexts, user has to manually select a context when entering values. Based on the context chosen, corresponding fields are shown to the user. However, when we use a reference field, a context is automatically defaulted to the user (which cannot be changed). A reference field is one of the fields from the same table.

  1. How do we use Reference Field?
Ans: Reference field is defined during the DFF definition. Reference field is one of the fields from the same table. Usually, reference field chosen should be quite selective. For example, a field having 500 distinct value is not a good reference field. However, a field having around 10 distinct values or less can be a good reference field. When reference field is used in the DFF activation, we need to define structure for each of the unique value of the reference field. Once defined properly, based on the reference field, a DFF structure is automatically displayed to the user during data entry.

Oracle Apps Standards in Reports Registration:


Oracle Apps Standards in Reports Registration:
==============================================

1)Define the Mandatroy parameter called P_CONC_REQUEST_ID

2)Call the Following User exit from the Before report Triggers

   SRW.USER_EXIT('FND SRWINIT');

3)Call another User Exit from After Report Trigger

   SRW.USR_EXIT('FND SRWEXIT');

User Exit: 
==========
It is one of the Oracle  Reports 6i Built In program which will be used to stop the
report execution and pass the control into some other 3GL and retrieves the data
then complete the remaining report execution Process.

We have 5 User Exits in Oracle Applications:
FND SRWINIT
FND SRWEXIT
FND FLEXSQL
FND FLEXIDVAL
FND FORMATCURRENCY

FND SRWINIT : This User Exit we will initialize user Profile values we will call this
    user exit from Before Report Trigger.

FND SRWEXIT: This User Exit will frees the Memory which is Occupied by the User Profile
             values in the server. we will call this from After Report Trigger.


We have Five types of Report Triggers :

Before Parameter Form
After Parameter Form
Before Report Trigger
Between Pages
After Report Trigger

We are using Before Report trigger before data is retrieving  from data base system 
will capture the user profiles data and as per that data will be retrieved from 
database.
Once Output is generated we do not reuire the Information in the system for that
we are using after Report Trigger call the another User Exit.


P_CONC_REQUEST_ID : This is One of the mandatory parameter we have to define for every
        concurrent Program.when we submit C.P from SRS window which will generate the
        REQUEST_ID that request ID will be passed into this variable.

 


Reports parameter (value sets, defaul types,token
Request group
Reponsibli
user
SRS
user exits.

FND_USER
FND_USER_REPS

Purchasing   = functionality  500
        Imp tables Join 

STEPS TO REGISTER XML REPORT IN APPS


STEPS TO REGISTER XML REPORT IN APPS
1)Develop the .rdf file and .rtf file
2)Register both .rdf and .rtf file

  .rdf File registration :
  =========================
  1)Move the .rdf file into CUS_TOP\11.5.0\Reports\US
  2)Create Execuiteable
           Concurrent Program  Output = XML
           Request Group
           Responsibility
           User
           SRS
  3)Copy the Concurrent Program Short name
  
  .rtf File Regitration:
 =======================

1)Goto the XML Publisher Administrator Responsibility
2)Select Data Definations form
  Enter Data Defination Name = Enter Any Name 
  Code               = Concurrent Program Short Name
  Application              = Any application
  startdate       = Current Date

3)Copy the DataDefination name we have to add this to the Templete
4)Open the Templete Form
  Enter Templete Name : Any Name
  DataDefination      : enter data defination whatever we have created
  Code                : Concurrent Program Short Name
  Type                : rtf
  application         : any Application
  File                : Upload the .rtf file
  Laguage             : English
  Territory           : United States

5)Select Apply button

After register the .rtf file submit concurrent Program from SRS window system will 
automatically pick the .rtf file and generates  the Output.

If we want to customze the .rtf file we have to download by using templete , Customize then
upload the .rtf templete










STEPS FOR XML REPORT


STEPS FOR XML REPORT
1)Develop the Report(.rdf) Only  DataModel
2)Save the report and Compoile and Generate the data in .xml Format
  File=>Generate to File => XML
3)Open the Ms-WOrd document  Design the Layout 
  include the follwing Tool Bar options called Form  and Templete builder

4)Define the Table and Specify the Titles and Labels whatever we would like to print

5)Include 'Text Form Field' Double CLick => Add Help Text button enter the following 
  syntax
  <?for-each:G_USER_ID?>  : Here G_USER_ID is Group name from .rdf Data Model
 Note: It means Indirectley Repeating Frame starting

6)Define the Fields which we would like to display
  
  Include 'Text Form Field' Double CLick => Add Help Text button enter the following 
  syntax  
  <?Column Name>?

Note: Define all the fields like this 

7)We have to close the Repeating Frame (For each Loop)
  Include 'Text Form Field' Double CLick => Add Help Text button enter the following 
  syntax  
<?end for-each?>

8)Save the document in .rtf(Rich Text File format)

9)Load the .xml file data and generate the Output in pdf Format
  Data=>Load XMl Data=>Load the .xml File=>Once Data is Loaded succesfully

10)Generate the Preview as per this Preview=>PDF








Sunday, 15 May 2011

AP: Invoice Aging Report


AP: Invoice Aging Report


Let’s see what the term Invoice Aging means? Why is it called Aging report? Where is the Aging report used? How does the Aging report work?
Why called Aging Report?: Aging comes from the word Age. “Age” is the chronological representation of any phenomenon. Be it a person, an organization. Invoice Aging is the calculation of Unpaid or Outstanding Invoice’s Age.In Oracle Payables this calculation is done using the Invoice Aging standard report.The calculation is represented inDays.
Where is the Aging report used?: It is used to calculate the Due and Overdue days of any outstanding supplier’s or invoice’s payment. Using this aging information the cash outflow is determined. And many other decision can be taken.
How does the Aging report works?: Oracle Payables uses the Invoice DatePayment Terms and Term Date attached to it for calculating the invoice’s age. GL Date has no effect on the aging.
Following are the setup steps required to implement Invoice Aging report:
  1. Define Aging Period
    • Aging Period is a user defined slabs of days. User can define one to many aging calendars.
  2. Run the Standard Request using the defined aging period.
Let’s take a scenario to define the Aging Period. Suppose I want to know the payments Overdue by 30 days and payments Due in 30 days i.e. if Today is 1-April then this aging period will display the payments due from 2-March to 1-May. So here is how to define such periods.
Step 1:
Navigation: AP>Setup>Calendar>Aging Period
  1. Enter the Name, let’s suppose “Monthly Aging Period”.
  2. Enter the Description(optional), like “30 days due and overdue aging period”.
  3. The Column Order will be by default 1, let it be.
  4. Enter 16 in Days From and 30 in Days To. (Yes, number of days in positive will pick the past due payments)
  5. Give the First Column Heading as 30 – 16 and Overdue in Second Column Heading, though it is optional. These column headings will appear on the aging report.
  6. Go to next row, the column order will be automatically generated.
  7. Enter 0 in Days From and 15 in Days To.
  8. Give the First Column Heading as 15-0 and Overdue in Second Column Heading.
  9. Go to next row.
  10. Enter -15 in the Days From and 1 in Days To.
  11. Give the First Column Heading as Due In and give 1-15 Days in Second Column Heading.
  12. Go to next row i.e 4th or the last row, as the aging report has only four columns.
  13. Enter -16 and -30 respectively in both columns.
  14. Give the First Column Heading as Due In and give 16-30 Days in Second Column Heading.
  15. Save the period.
Step 2: Now you have run the standard request name Invoice Aging Report. Give the following parameters
  • Sort Invoice By:
    • Trading Partner: All invoices will be sorted and grouped by Supplier’s Name
    • Invoice Type: All the invoices will be sorted by the Invoice Type, like Standard, Prepayments, Credit Memos etc.
  • Include Invoice Detail:
    • Yes: The invoice information will be displayed in detail like Invoice Number, Due Date, Unpaid%, Amount Remaining.
    • No: A summarized view of the
  • Include Site Details:
    • Yes: The invoices will be categorized supplier site wise.
    • No: There will be no site information.
  • Minimum Amount Due: There is no need to define this parameter. I think the name says it all :)
  • Maximum Amount Due: There is no need to define this parameter. I think the name says it all :)
  • Invoice Type: There is no need to define this parameter. I think the name says it all :)
  • Trading Partner: Due to this parameter I also call this report as Supplier Aging Report.
  • Aging Period Name: Give the name of the period of which you want to have the due calculate.
So with this you can have either Invoice wise or Supplier wise Aging analysis of your payables dues.

Key Flexfields


Oracle EBS: Key Flexfields


First let’s break the term to define it in more detail. “Key” means important, For Example somebody says General Ledger is the key module in Oracle EBS or he played the key role in winning this game, etc. So “Key” means important. The term “Flexfield” is composed of two words, “Flex” and “Field”, Flex means flexible. Field is self explanatory term and is referring to the input field in any software.
Key Flexfields are used by some modules like for example Oracle General Ledger uses Accounting Flexfields, OracleAssets uses LocationCategory and Asset Key Flexfield, etc. To see which application uses which use the Segment Setup Window. In General Ledger the navigation is
GL>Setup>Financials>Flexfields>Key>Segment
On Application field click (B)Torch and press the initial letter of the application, Like “i” for Inventory.
Now what or how can any field is flexible? Well there are Three types of flexibilities you get from KFF.
  1. Every KFF needs segments. The number of segment depends on the requirement. This segment is one form of flexibility. For Example: One organization decides the COA Structure or Accounting Flexfields as Company-Branch-Department-Natural Account. Another organization decides it COA as Company-Branch-Department-Product-Account.
  2. Each segment has a value set. This value set is another form of flexibility. Both of these flexibilities are ONE TIME. Once you have decided the segments and value sets of any KFF structure, it is freeze.
  3. The third type of Flexibility in KFF is related to Security. You can define multiple security rules on segment values for multiple responsibilities. How? We will find out later.
So this is the flexibility Oracle has in Key Flexfield. Or what I understand from the term key flexfields.
In General Ledger Segment provides the flexibility to define particular information to level of details required by the user/organization. Technically, it is column divided into further columns, those further columns are called segments.There can be 30 Segments in General Ledger, each can have 25 character length, but in actual the length supported by the application is of 240 characters.

Oracle EBS: Key Flexfield Segment Value Set


Oracle EBS: Key Flexfield Segment Value Set


The basic definition of a Value Set (VS) is the “Validation of values” for a particular segment. Now if I further simplify Validation it means the type of value a segment can have.
For Example: Take an example of Multinational Company (MNC) say SydWerkz International having multiple branches in different countries. Now if SydWerkz decides to implement Oracle EBS Financials then the COA structure would definately have a Branch Segment. The heirarchy of the branches decided by SydWerkz International was
  • Continent(1)
    • Country(2)
      • City(3)
        • Branch(2)
The number written in front of each branch category is the character length. For example Country has a character length of 2, which means there can be 100 countries or at least 99 countries. The total charachter length of Branch segment will be 8 and code of the branch segment will be 10000000.
Now if we list down the above mentioned categories with the code, it will be
Regions:
1- Asia
2-Europe
Country:
01-Pakistan
01-Germany
02-India
City:
001-Karachi
001-Mumbai
Branch:
01-Branch A
02-Branch B
See the beauty of the heirarchy this code character will have:
10000000 – Asia
10100000 – Pakistan
10100100 – Karachi
10100102 – Branch B
20000000 – Europe
20100000 – Germany
So you see that the branch codes are the identifiers of Branch category. You can even identify which code is a parent and which one is the child. If the last two digits of the branch codes are 00 then the code is of City and it is a parent, if the last 5 codes are 0 then the code is of Country and it is a parent.
A branch value set in this case will have a “Char” format and “Numbers Only” Check Box enabled and the length of the Value Set will be 8.
The Button of Usage shows where the selected Value Set is used, in DFF or KFF in which Structure and in which Segment.
Validation can be done on the following attributes
  • Type of segment list
    • List of Values: It displays Searching Criteria and Values. Useful if the quantity of value is from 50-500
    • Long List of Values: It only displays the searching criteria. Useful if the quantity of value is from 500 – 10000
    • Pop List: It is a dropdown for the value set. It is useful if the quantity of the value is from 1-15
  • Type of Security that applies on that particular segment
    • Hierarchical Security: if applied to parent then child also has the same security rules. Likewise Non-Hierarchical security is applied only to that specific segment value has the security rule.
    • It for restricting segment values among Responsibilities. When you define security rules for any segment then you have to re-compile the COA Structure.
    • To define security you have to specify the segment, first include all the values then exclude the particular value.Save the rule. Assign the rule to particular responsibility.
  • Format of the value set
    • Char is used for financial and other values.
    • Date & Time is specific to Purchasing & Order Management.
  • Numbers Only: If this option is checked then the value set will only have numbers. To enable Alphabets keep this box uncheck.
  • Upper Case Only: Only Capital letters will be allowed.
  • Right Justify Zero fill: This option will automatically fill the zero on the right side. For Example if the character length of a value set is 4 and during entering a value, if “65″ is entered, the system will automatically insert 0 on the right and code will become “0065″
  • Maximum Size of the value set:The total length of a value.
  • Minimum Value: The minimum side of the range.
  • Maximum Value: The maximum size of the value. Like in the above example of the Branch Segment, the maximum size can set to 7999999. as there are only 7 continent and cannot exceed this value at the moment.
  • Value Validation: This needs more explanation and it will be discussed later. For now the definition of this attribute is “if the value of this segment depends on another segment or the values should be picked from a Table” then this validation defined. Generally we use the following
    • Independent
    • Dependent
    • Table