Sunday, August 21, 2011

HOW TO DEFINE TRANSACTION TYPES IN ORACLE RECEIVABLES

Oracle Receivables use transaction types to default payment term, account, tax, freight, creation sign, posting, and receivables information.
Oracle Receivable provides two predefined transaction types:


  1. Invoice
  2. Credit Memo.

We can create receivable transaction type by using following steps

  1. Sign on to the application using Receivables Super user Responsibility.

  1. Navigate to the Transaction Types Form
Setup / Transactions / Transaction Types

  1. In operating Unit field by default current operating unit is populated Vision Operations

  1. Enter a Name and Description for this transaction type.

Name: = XX Credit Memo
Description:-This is a Sample Credit Memo

  1. Enter a Class for this transaction type.

Following are the seeded classes provided by oracle
  1. Invoice
  2. Chargeback
  3. Credit Memo
  4. Debit Memo
  5. Deposit
  6. Guarantee

In credit memo case I select Credit Memo

  1. Open Receivable is set to Yes,
Receivables updates customer balances each time we create a complete debit memo, credit memo, chargeback,
or on-account credit with this transaction type. Receivables also include these transactions in the standard aging and collection processes.

  1. Check the Post to GL box
To be able to post transactions with this type to general ledger.
The default is the value specified for the Open Receivables option. This box must be checked if the class is Deposit or Guarantee.




  1. Choose Print. We can override this value when entering transactions in transaction window.

  1. Choose Transaction Status of Open from open, Closed, Pending, or Void.
Use these statuses to implement our own invoice approval system. Enter 'Void' to void debit memos, on-account
credits or invoices to which we want to assign this transaction type.

  1. Check the Allow Freight box.
Allow freight to be entered for transactions with this transaction type

  1. Check the Tax Calculation box.
Receivables calculate tax for transactions with this transaction type.
If we do not check this box, the Tax Code field in the Lines window will not be required and Receivables
will not perform tax calculations or create tax accounting entries for transactions with this
transaction type (this is also applicable for transactions in Oracle Order Management).

  1. Choose Creation Sign Negative.
The default is Positive Sign for transaction types with a class of either Guarantee or Deposit.
If we are using the Cash Basis accounting method, Transaction's creation sign must be Positive Sign, Negative Sign, or Any Sign.
We cannot update this field after entering transactions with this type.
  1. Select the Natural Application Only check box. We cannot update this option after save this transaction type.
  1. Enter the Receivable Account for transactions with this transaction type.
    Receivables use this information, along with Auto Accounting definition, to determine the receivable accounts
    for transactions with these types.
    Receivables creates a receivables transaction record using this account so we can transfer to general ledger and
    create a journal entry if Post To GL is Yes for this transaction type.

  1. Enter receivable account “Accounts Receivable” .
    Receivables does not require entering a Receivable account for Credit Memo transaction types if the profile option Use
    Invoice Accounting for Credit Memos is set to YES otherwise, must enter a Receivable Account.

  1. Enter a Freight Account for transactions with this transaction type.
    Receivable uses this information, along with Auto Accounting definition, to determine the freight account for transactions with this transaction type.

  1. Enter Revenue Account Receivables does not require to enter a Revenue Account for Credit Memo transaction
    types if the profile option Use Invoice Accounting for Credit Memos is set to YES. Otherwise, must enter a Revenue Account.

  1. As this is a credit memo so we need to define UNBILLED RECEIVABLE ACCOUNT.
    Receivable uses this information, along with Auto Accounting definition, to determine the Unbilled Receivable
    account for transactions with this transaction type.
    Receivable only uses the Unbilled Account field to determine the Unbilled Receivable account for invoices with the rule Bill in Arrears.

  1. Enter an Unearned Revenue Account. Receivable uses this information, along with Auto Accounting
    definition, to determine the unearned revenue account for transactions with this transaction type.
    Receivable only uses this account when transaction's invoicing rule is Bill In Advance.

  1. Enter a Tax Account. Receivable uses this information along with Auto Accounting
    definition to determine the tax account for transactions with this transaction type.

  1. Save this credit memo transaction type now.

  1. Navigate to the Transaction Form
Transaction  Transactions



Look in above screen shot I have select XX Credit Memo Type

Sunday, August 14, 2011

To find the parameters of the concurrent program from back end



      SELECT  *
  FROM  fnd_descr_flex_col_usage_vl ds,
        fnd_flex_value_sets         vs,
        (SELECT  meaning,
                 lookup_code
          FROM   fnd_lookup_values
         WHERE   lookup_type  =  'FLEX_DEFAULT_TYPE') lookup      
 WHERE  ds.descriptive_flexfield_name  LIKE '%'||'XXCAS_PRJ_PROJ%' ---Package name
   AND  ds.flex_value_set_id           =     vs.flex_value_set_id
   AND  ds.DEFAULT_TYPE                =     lookup.lookup_code (+)
ORDER BY ds.column_seq_num;

Saturday, August 13, 2011

Create Oracle FND_USER with System Administrator

f you have the Apps Password, its quite easy to create a FND_USER for yourself by using the API.
I find this script very useful when development environment gets cloned from Production(that is when i do not have FND_USER in Production.
Please note that:-
1. You will be allocated System Administrator by this script. Hence you can assign whatever responsibilities that you desire latter, after logging in.
2. The password will be set to oracle
3. You need apps password to run this script. Alternately you need execute permission on fnd_user_pkg from the user where this script will be run. If using some other user, please use apps.fnd_user_pkg.createuser
4. You need to do a COMMIT after this script has run. I have not included the commit within this script.
5. When running this script, you will be prompted to enter a user name.

--------Beging of script--------------
DECLARE
--By: Anil Passi
--When Jun-2001
  v_session_id INTEGER := userenv('sessionid');
  v_user_name  VARCHAR2(30) := upper('&Enter_User_Name');
BEGIN
  --Note, can be executed only when you have apps password.
  -- Call the procedure to Creaet FND User
  fnd_user_pkg.createuser(x_user_name                  => v_user_name
    ,x_owner                      => ''
    ,x_unencrypted_password       => 'oracle'
    ,x_session_number             => v_session_id
    ,x_start_date                 => SYSDATE - 10
    ,x_end_date                   => SYSDATE + 100
    ,x_last_logon_date            => SYSDATE - 10
    ,x_description                => 'appstechnical.blogspot.com'
    ,x_password_date              => SYSDATE - 10
    ,x_password_accesses_left     => 10000
    ,x_password_lifespan_accesses => 10000
    ,x_password_lifespan_days     => 10000
    ,x_employee_id                => 30 /*Change this id by running below SQL*/
     /*  
     SELECT person_id
           ,full_name
     FROM   per_all_people_f
     WHERE  upper(full_name) LIKE '%' || upper('<ampersand>full_name') || '%'
     GROUP  BY person_id
              ,full_name
     */
    ,x_email_address => 'appstechnical.blogspot@gmail.com'
    ,x_fax           => ''
    ,x_customer_id   => ''
    ,x_supplier_id   => '');
  fnd_user_pkg.addresp(username       => v_user_name
                      ,resp_app       => 'SYSADMIN'
                      ,resp_key       => 'SYSTEM_ADMINISTRATOR'
                      ,security_group => 'STANDARD'
                      ,description    => 'Auto Assignment'
                      ,start_date     => SYSDATE - 10
                      ,end_date       => SYSDATE + 1000);
END;
/

Find Request Group for Concurrent Programs



I have created a concurrent program, and I now wish to know which request group must this program be added to?

Step 1. Ensure that profile option "Utilities:Diagnostics" is set to Yes at your user level.
Note:- This step can be skipped in case you have the apps password.
Step 2. Navigate to the responsibility from where you will submit the concurrent program.
Step 3. Navigate to the "Submit New Request" screen, where you will enter the name of the concurrent program to run.
Step 4. Now you must do examine using the help menu as shown below.
Step 5. In the block field, enter PARAMETER, and in the field name enter REQUEST_GROUP_CODE
Note down this value
Step 6. Now in the value field 
enter REQUEST_GROUP_APPL_SHORT_NAME


Note down the two values from Step 5 and Step 6. 
These will indicate the request group to which you must add your concurrent program.


Question: In the submit request screen, REQUEST_GROUP_CODE is blank??
In this case use the Request group specified in "Define Responsibility Screen"

The rule is :-
If request group code is being passed in as parameter to Submit Request form function, then use that request group. Or else use the request group at responsibility level.

Context Sensitive Descriptive Flexfields


A training article on Context Sensitive Descriptive flexfields.
IMPORTANT:- You must read Basics Flexfield article . This article is an extension to the work that we did for a simple flexfields. 

First some basic Question and answers, and then we will do screenshots detailing how flexfields are configured.


Question: I want these Flex fields to appear in screen only when certain conditions are met. Is it possible?
Answer: Yes, you can. Lets take an Example. You have a "Bank Branch" screen where you enter the Bank names and their branches . There is a field named Branch Type in that screen. You wish to show & capture following new fields:-
a.    Banks Country of Origin Field ( regardless of bank branch type, we must show this new field). As we configured in earlier training chapter.
b.    If user entered a value of SWIFT in Branch type, then display a new DFF segment "SWIFT Partner field".
c.    If Branch type CHIPS is selected by the user, then display a DFF segment "Chip ID" field.


In Order to do this, we will follow the below steps(screenshots will follow) :-
1.    Navigate to the DFF Registration screen in Oracle Apps and query on Table AP_BANK_BRANCES. Now click on Reference Field, and ensure that “BANK_BRANCH_TYPE” field can be used as a context switch. In our case we add this field as a reference field.
2.    Navigate to DFF Segments screen and query on the Title of the “Bank Branch” and Unfreeze the Flexfield and add segments as in screenshot below. Register the BANK_BRANCH_TYPE field as a reference item.
3. Create the contexts for each possible value of Bank Branch Type field(for which you want conditional display of fields)....
Hmmmm not clear yet, see the the screenshots and you will surely understand......

Find out the table name for Bank Branch screen, this will enable us to find the DFF that is available for Bank Branch Image
The Bank Branch can have one of the following values.
Image
Given that our DFF will be sensitive to what we enter in Bank Branch, we must find out name of the field(not the display name). This can be done by using examine as shown
Image
We can see that internal name of the Branch Type is "BANK_BRANCH_TYPE". We need to ensure that a DFF can be made sensitive to the value in BANK_BRANCH_TYPE
Image
Lets navigate to DFF registration screen, and using the table name, we query DFF for AP_BANK_BRANCHES.
Image
Alternately you can query using DFF title too.
Image

Image
Now lets add BANK_BRANCH_TYPE as a REFERENCE Field, by clicking on Button Reference
Image
Now we need to define the new fields(segments). This screen is accessed via menu /Descriptive/Segments . In this screen, lets make BANK_BRANCH_TYPE as the context/reference. This means that DFF will become sensitive to values in Branch Type field
Image
IMPORTANT: If your requirement is not to have any conditiional logic, then no need for all the "Reference Field" blaaa. All you need to do is to add your segment to Global Data Elements
Image
Image
Image
Image
Image
When the user selects Type=SWIFT, we see the relevant SWIFT field appear in Flexfield window
Image

When user selects Type=CHIPS, we see CHIP Id field appearing in Flexfield window.
Image
Here we now see that value entered in DFF field gets stored in the database column,
Image 

Descriptive Flexfield Basics in Oracle Apps



A training article on Descriptive flexfields, also refered as DFF

First some basic Question and answers, and then we will do screenshots detailing how flexfields are configured.

Question: What does DFF mean?
Answer: DFF is a mechanism that lets us create new fields in screens that are delivered by Oracle.

Question: Oh good, but can these new fields be added without modifying/customization of the screen?.
Answer: Yes, certainly. Only some setup is needed, but no programmatic change is needed to setup DFF.

Question: Why the word Descriptive in Name DFF?
Answer: I think Oracle used this terminology because by means of setup...you are describing the structure of these new fields. Or may be Oracle simply used a silly word to distinguish DFF from KFF(discussed in latter training lesson).

Question: Are these DFF's flexible?
Answer: A little flexible, for example, depending upon the value in a field, we can make  either Field1 or Field2  to appear in DFF.

Question: So we create new fields in existing screen, but why the need of doing so?
Answer: Oracle delivers a standard set of fields for each screen, but different customers have different needs, hence Oracle lets us create new fields to the screen.

Question: Are these new fields that get created as a result of DFF free text?
I mean, can end user enter any junk into the new fields that are added via DFF?
Answer: If you attach a value set to the field(at time of setup of dff), then field will no longer be free text. The entered value in the field will be validated, also a list of valid values will be provided in LOV.

Question : Will the values that get entered by the user in dff fields be updated to database?
Answer: Indeed, this happens because for each field that you create using DFF will be mapped to  a column in Oracle Applications.

Question: Can I create a DFF on any database column?
Answer: Not really. Oracle delivers a predefined list of columns for each table that are meant for DFF usage. Only those columns can be mapped to DFF segments. These columns are named similar to ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3 ETC. Usually Oracle provides upto 15 columns, but this number can vary. 

Question: Can I add hundreds of fields to a given screen?
Answer: This depends on the number of attribute columns in the table that screen uses. Also, those columns must be flagged as DFF enabled in DFF Registration screen. Don't need to worry much about this because all the ATTRIBUTE columns are by default flagged for their DFF usage.

Question: Hmmm, I can see that DFFs are related to table and columns...
Answer: Yes correct. Each DFF is mapped to one table. And also each segment(or call it field) is mapped to one of the attribute columns in that table.

Question: I want these fields to appear in screen only when certain conditions are met. Is it possible?
Answer: Yes, we have something known as Context Sensitive Descriptive Flexfields.

In Order to do this, we will follow the below steps(screenshots will follow) :-
1.    Navigate to the DFF Registration screen in Oracle Apps and query on Table AP_BANK_BRANCES. Now click on Reference Field
2.    Navigate to DFF Segments screen and query on the Title of the “Bank Branch” and Unfreeze the Flexfield and add segments as to Section "GLOBAL Data Elements" as shown in screenshots.
Here are the screenshots......The descriptions are embedded within the screenshots.

We are in "Bank Branches screen" below, that is available in Payables responsibility. We need to add a new field as below.
Image

Once having noted down the table, we try to find the Title of the DFF for that Table. We go to Flexfield/Register
Image

Here we pick the Title of the respective DFF
Image

Query on that DFF Title from Descriptive Flexfield Segment Screen
Image

Add a new segment under "Global Data Elements"
Image

The options for making mandatory or enabling validations for the new field.
Image
Once you finalize the changes, you will be prompted to Freeze the DFF definition. Click on OK
Image

Now, we see the fruits of our configuration
Image

Difference between Lookups and Value Sets


Difference between Lookups and Value Sets

I hope you have read the previous articles on Value Sets and also on Lookups.

It is important for the learners to read things in Sequence. Hence you may decide to browse through the Training Index Page.

Difference 1
Value sets can be attached to parameters of a concurrent program, whereas Lookups can't.

Difference 2
Certain types of Lookups are maintainable by the users too, for example HR Users will maintain "Ethnic Minority" lookups. Value Sets are almost never maintained by end users, with the exception of GL Flexfield codes. Value sets are usually maintained by System Administrators.

Difference 3
Value sets can contain values that are a result of an SQL Statement.
Hence it is possible to make Value Set list of values dynamic.
On the contrary, Lookup Codes are Static list of values.

Value sets in oracle apps


Value Sets
Value Set is a collection of values. It validates the values entered by the user for a flex-field, report parameters or a concurrent.
The navigation path: Application :- Validation :- Sets
Value Set is associated with the following validations which holds the key to the value sets.
Types of Validations:
  1. None :- Validation is minimal.
  1. Independent :- The data input is based on previously defined list of values.
  1. Dependent :- The data input is checked against a defined set of values.
  1. Table :- The data input is checked against values in a table.

  1. Special :- The data input is checked against a flex-field.
  1. Pair :- The data input is checked against two flex-field specified range of values.
  1. Translatable independent :- The data input is checked against previously defined list of values.
  1. Translatable dependent :- The data input is checked against defined set of values.
Significance of $FLEX$
$FLEX$: enables to match the prior segment with either value set name or segment name.
Let v2 be the value set definition of 2nd parameter and v1 be the value set definition for the first parameter then
In the value set definition of v2 = value $FLEX$.v1
Note:
Changes You Should Never Make
You should never make these types of changes (old value set to new value set) because you will corrupt your existing key flex-field combinations data:
. Independent to Dependent
. Dependent to Independent
. None to Dependent
. Dependent to Table
. Table to Dependent
. Translatable Independent to Translatable Dependent
. Translatable Dependent to Translatable Independent
. None to Translatable Dependent
. Translatable Dependent to Table
. Table to Translatable Dependent

Sunday, August 7, 2011

AR Technical foundation

This post is more on basic table structure of Oracle Account Receivable.
1.Table that holds AR Invoice data
The following tables can give most of the invoice information.
  • RA_CUSTOMER_TRX_ALL stores invoice header information. RA_CUSTOMER_TRX_LINES_ALL stores information about invoice, debit memo, credit memo, bills receivable, and commitment lines.
  • The AR_PAYMENT_SCHEDULES_ALL table stores all transactions except adjustments and miscellaneous cash receipts.
  • RA_CUST_TRX_LINE_GL_DIST_ALL stores accounting distribution records for all transaction lines except bills receivable.The RA_CUST_TRX_LINE_GL_DIST_ALL table stores the accounting records for revenue, unearned revenue, and unbilled receivables for each invoice or credit memo line.
  • RA_CUSTOMERS - Customer information
  • RA_CUST_TRX_TYPES_ALL - Customer Transaction Type
  • AR_PAYMENT_SCHEDULES_ALL
  • RA_CUSTOMER_TRX_LINES_ALL - Transaction Line information
  • MTL_SYSTEM_ITEMS - Base table for item
The ER Diagram for a customer Transaction can be easily understood as:
CustomerInvoice

2.Customer Payment
These are the main tables which holds Customer Payment information

    • AR_CASH_RECEIPTS_ALL stores one record for each receipt entry.
    • AR_CASH_RECEIPT_HISTORY_ALL stores all of the activity that is contained for the life cycle of a receipt.
    • Each row represents one step., Possible statuses are Approved, Cleared,Confirmed, Remitted, and Reversed.
    • AR_MISC_CASH_DISTRIBUTIONS_ALL stores all accounting entries for miscellaneous cash applications.
    • AR_DISTRIBUTIONS_ALL stores the accounting distributions for cash receipts, miscellaneous receipts, adjustments,credit memo applications, cash receipt applications, and bills receivable transactions.
    • AR_RECEIVABLE_APPLICATIONS_ALL stores all accounting entries for cash and credit memo applications.
    • Each row includes the amount applied, status, and accounting flexfield information.
    The ER Diagram for a customer Payment can be easily understood as:
    Customerpayment
    3. Accounting Link between the tables
    • For Invoice:
    ra_customers (This is for capturing customers information)
    ra_customer_trx_all,
    ra_cust_trx_types_all,
    ar_payment_schedules_all,
    ra_customer_trx_lines_all
    and joins are customer_trx_id for ar_payment_schedules_all & ra_customer_trx_all & ra_customer_trx_lines_all .
    ra_cust_trx_types_all.type IN ('INV')
    • For the Receipts:
    ar_receivable_applications_all,
    ra_customer_trx_all,
    ra_customer_trx_lines_all,
    ar_cash_receipts_all
    ar_receivable_applications_all.application_type = 'CASH',
    ar_receivable_applications_all.cash_receipt_id = ar_cash_receipts_all.cash_receipt_id,
    ar_receivable_applications_all.applied_customer_trx_id = ra_customer_trx_all.customer_trx_id