Wednesday, 28 December 2011

How to delete a DFF Context

How to delete a DFF Context


Sometime I'm quite annoyed by the typo mistake when creating a DFF context. The DFF segment screen doesn't allow deletion of context. Fortunately, Oracle has internal API to do such thing. Following is a sample.

--*******************************************
--* Delete a descriptive flexfield
--*******************************************
SET ECHO OFF
SET FEEDBACK OFF
SET SERVEROUTPUT ON SIZE 1000000
DECLARE
  l_application_id                NUMBER := 0;
  l_descriptive_flexfield_name    VARCHAR2(100) :=  'FND_COMMON_LOOKUPS' ;
  l_descriptive_flex_context_cod  VARCHAR2(100) :=  'XFND_CLWW_PURGE_FOLDER';
BEGIN
  --FND_DESCRIPTIVE_FLEXS_PKG --this package is for DFF
  --FND_DESCR_FLEX_CONTEXTS_PKG --this package is for DFF Context
  --FND_DESCR_FLEX_COL_USAGE_PKG --this package is for DFF Column useage
  --When creating a new DFF Context, it will check the DFF Column usage if the context is already used.
  --so when deleting a DFF Context, both the context and column usage should be deleted.
  FOR c IN (SELECT application_column_name
              FROM fnd_descr_flex_column_usages
             WHERE application_id = l_application_id
               AND descriptive_flexfield_name = l_descriptive_flexfield_name
               AND descriptive_flex_context_code = l_descriptive_flex_context_cod)
  LOOP
 
    fnd_descr_flex_col_usage_pkg.delete_row(
         x_application_id                => l_application_id
        ,x_descriptive_flexfield_name    => l_descriptive_flexfield_name
        ,x_descriptive_flex_context_cod  => l_descriptive_flex_context_cod
        ,x_application_column_name       => c.application_column_name
        );
  END LOOP;

  fnd_descr_flex_contexts_pkg.delete_row(
         x_application_id                => l_application_id,
        ,x_descriptive_flexfield_name    => l_descriptive_flexfield_name
        ,x_descriptive_flex_context_cod  => l_descriptive_flex_context_cod
         );
 
  --commit;
end;



--


Form Personalization - How to Change Field Name

Form Personalization - How to Change Field Name

Form Personalization feature allows us to alter the behavior of Forms-based screens, including changing properties, displaying messages etc.
For a single form-function
(a form running in a particular context based on parameters passed to it defined at function level) we can specify one or more Rules. Each Rule consists of an Event, an optional Condition, the Scope for which it applies, and one or more Actions to perform.

Here we will discuss about how can we change the field display name.

Basic Requirement
Our basic requirement is to change name the 'Latest Start Date' field to 'ABCD' in people Screen. Remember this name change should only be applicable for persons who are using 'UK HRMS Manager'.

Solution Approach
Form Personalization feature is declarative and any personalization to form may interfere with base code of a  form.
before we start personalization please ensure that the following security profiles are properly set
  1) FND_HIDE_DIAGNOSTICS (Hide Diagnostics menu entry)
  2) DIAGNOSTICS (Utilities:Diagnostics)


a) Now open the people & Assignment form from the navigator menu. Click on the 'Latest Start Date field'. Now go to  Help >> Diagnostics >>  Properties >>  Item.
    It will display the 'Object Properties' window. Note Down the  Object2 value (HIRE_DATE) which is nothing but the name of the item.





b) Now to personalize the screen, go to  Help >> Diagnostics >> Custom Code >> Personalize
 Set the following values

Condition Tab
Seq:- Next highest available number.
Description:-
Test Personalization
Level:-
Function
Trigger Event:- WHEN-NEW-FORM-INSTANCE
Trigger Object**:-
Condition:-
Processing Mode:- Both
Scope:- Site


** Depending on the Trigger Event, this field may be Disabled, or Enabled and Required in which case it will validate against a List of Values. For example, if Trigger Event WHEN-NEW-ITEM-INSTANCE is selected, then we must enter a specific block.field for that trigger to be processed.






Action Tab
Seq:- 10
Type:- Property
Description:-
Language***:- All
Object Type:- Item
Target Object:- PERSON.HIRE_DATE (Search with string that we copied from step a)
Property Name:- PROMPT_TEXT
Value:- ABCD


 ***  Select 'All' to have the action processed for any language, or select a specific language.Generally text-related personalizations are applied for a specific
       language
.


c) Validate the design and click on Apply Now.



Note:- 1) Since we have selected processing mode as 'Both', hence the field name 'ABCD' will appear under both the condition 'New form is open' and
             'Enter-Query Mode'.

                If we select the processing mode as 'Only in Enter-Query Mode', then we will see the original name of the field while opening the form.Where as  if we
            query the form it will execute the trigger event and change the name of the field.





      2) Each Rule consists of one or more Scope rows, and one or more Actions. If a Rule has no Scope rows or Action rows, it is not processed. Note that
         upon saving a Rule, if no Scope rows have been entered the form will automatically create a row at the Site level. If any scope matches the current
         runtime context then the Rule will be processed.



--


Sunday, 23 October 2011

USING UTL_FILE PACKAGE (OUT BOUND)

CREATE OR REPLACE procedure
APPS.xx_po_out(x_errbuf out varchar2
,p_retcode out varchar2
,p_file_path in varchar2
,p_file_name in varchar2
)
is
g_org_id number := fnd_profile.value('ORG_ID');
g_conc_request_id number := fnd_profile.value('CONC_REQUEST_ID');
cursor cur_podet
is
select vendor_name
,pov.segment1 vendor_number
,povs.VENDOR_SITE_CODE
,povs.ADDRESS_LINE1||' '||povs.ADDRESS_LINE2 address
,povs.country
,poh.SEGMENT1 po_number
from po_vendors pov,
po_headers_all poh,
po_vendor_sites_all povs
where pov.vendor_id = poh.vendor_id
and poh.vendor_site_id = povs.vendor_site_id
and poh.org_id = g_org_id;

v_file utl_file.file_type;
v_file_name varchar2(100) ;


begin
    fnd_file.put_line(fnd_file.log,'Concurrent Request Id => '||p_file_name||'_'||g_conc_request_id||'.txt');
    v_file_name  := p_file_name||'_'||g_conc_request_id||'.txt';
    v_file := utl_file.fopen(p_file_path,v_file_name ,'W');
    for rec_podet in cur_podet
    loop
        begin
        utl_file.PUT_LINE(v_file,
         rec_podet.vendor_name
        ||','||rec_podet.vendor_number
        ||','||rec_podet.VENDOR_SITE_CODE
        ||','||rec_podet.address
        ||','||rec_podet.country
        ||','||rec_podet.po_number
        );
    exception
        when utl_file.invalid_path then
            fnd_file.put_line(fnd_file.log,'Invalid Path');
        when utl_file.invalid_mode  then
            fnd_file.put_line(fnd_file.log,'Invalid Mode');
        when utl_file.invalid_filehandle then
            fnd_file.put_line(fnd_file.log,'Invalid file handle');
        when utl_file.invalid_operation  then
            fnd_file.put_line(fnd_file.log,'Invalid Operation');
        when utl_file.write_error        then
            fnd_file.put_line(fnd_file.log,'Write error');
        when others then
            fnd_file.put_line(fnd_file.log,'exception in loop => '||SQLERRM);
        end;   
    end loop;
    utl_file.FCLOSE(v_file);
exception
    when others then
        fnd_file.put_line(fnd_file.log,'exception in procedure => '||SQLERRM);   
end ;

USING UTL_FILE PACKAGE(LOAD THE DATA IN TO THE TABLE)

CREATE OR REPLACE package body APPS.xx_po_pu_det_pkg
is
/*
Procedure to read data from flat file
*/
    procedure pur_dat_prc(x_errbuf OUT VARCHAR2
                        ,X_RETCODE OUT VARCHAR2
                        ,P_FILE_PATH IN VARCHAR2
                        ,P_FIL_NAME IN VARCHAR2
                        )
is

v_file_type         utl_file.file_type;
v_data              varchar2(1000);

v_vendor_number         po_vendors.segment1%type;
v_vendor_name           po_vendors.vendor_name%type;
v_vendor_site_code      po_vendor_sites_all.vendor_site_code%type;
v_po_number             po_headers_all.segment1%type;

begin
    v_file_type := utl_file.fopen(P_FILE_PATH,P_FIL_NAME,'R');
    loop
        begin
 --       fnd_file.put_line(fnd_file.output,'Start Loop');
        utl_file.get_line(v_file_type,v_data);
        fnd_file.put_line(fnd_file.output,'Data => '||v_data);
    select substr(v_data,1,instr(v_data,',',1)-1)
    into v_vendor_number
    from dual;
   
    select substr(v_data,instr(v_data,',',1,1)+1,instr(v_data,',',1,2)-(instr(v_data,',',1,1)+1))
    into v_vendor_name
    from dual;

    select substr(v_data,instr(v_data,',',1,2)+1,instr(v_data,',',1,3)-(instr(v_data,',',1,2)+1))
    into v_vendor_site_code 
    from dual;

    select substr(v_data,instr(v_data,',',1,3)+1,length(v_data)-(instr(v_data,',',1,3)))
    into v_po_number
    from dual;

    insert into XX_PO_PUR_DET_STG
    values(
    v_vendor_number
    ,v_vendor_name
    ,v_vendor_site_code
    ,v_po_number
    );
   
    exception
        when utl_file.invalid_path then
            fnd_file.put_line(fnd_file.output,'Invalid file path');       
        when utl_file.invalid_mode then
            fnd_file.put_line(fnd_file.output,'Invalid Mode');
        when utl_file.invalid_filehandle then
            fnd_file.put_line(fnd_file.output,'Invalid file handle');
        when utl_file.invalid_operation then
            fnd_file.put_line(fnd_file.output,'Invalid file operation');
        when utl_file.read_error then
            fnd_file.put_line(fnd_file.output,'Read error');
        when no_data_found then
            exit;
        when others then
           fnd_file.put_line(fnd_file.output,'Others exception => '||SQLERRM);    
        end;
    end loop;
--    fnd_file.put_line(fnd_file.output,'after end loop');
    utl_file.fclose(v_file_type);
--    fnd_file.put_line(fnd_file.output,'after close');
exception
    when others then
        fnd_file.put_line(fnd_file.log,'Exception in procedure pur_dat_prc => '||SQLERRM);
end pur_dat_prc;           
end xx_po_pu_det_pkg;
/

APPS TABLES(PO,APS,GL,OM,INV,AR)

 Purchase Order : (PO)
----------------
1.po_requisition_headers_all -- requisition header info
2.po_requisition_lines_all   -- Requisition Lines info
3.po_req_distributions_all   -- Requisition Distribution info
4.po_headers_all             -- PO Header Info
5.po_lines_all               -- PO Line Info
6.po_line_locations_all      -- PO Line Shipment info
7.po_distributions_all       -- PO Distribution info
8.rcv_shipment_headers       -- Receiving header info
9.rcv_shipment_lines         -- Receiving Lines info
10.rcv_transactions          -- Receiving transationd info
11.po_vendors                -- Supplier Header info
12.po_vendor_sites_all       -- Supplier Site info
13.po_vendor_site_contacts   -- Supplier Site Contact info
14.hr_locations              -- Supplier Site Address

Order Management (OM) :
------------------------
1.oe_order_headers_all    -- Order Header info
2.oe_order_lines_all      -- Order line info
3.oe_transaction_types_tl -- Order type info
4.oe_order_holds          -- Order Hold info
4.oe_holds_all              -- Order Hold info
5.oe_hold_sources           -- Order Hold source info
6.oe_hold_releases        -- Hold Release info
7.wsh_delivery_details    -- Delivery Detial Info
8.wsh_new_deliveries      -- Delivery Header info
9.wsh_delivery_Assignments -- Delivery Assignments info
10.wsh_trip_stops          -- Delivery trips info
11.hz_cust_accounts        -- Customer info
12.hz_parties              -- Party info
13.hz_cust_site_uses_all   -- Customer site use info
14.hz_cust_acct_sites_all  -- Customer Site Acct info
15.hz_party_sites          -- Party site info
16.hz_locations            -- Customer Site Adderess
17.wsh_lookups             -- Shipping lookup info


Accounts Payable (AP):
---------------------
1.ap_invoices_all               -- Invoice Header info
2.ap_invoice_distributions_all  -- Invoice Line info
3.ap_checks_all                 -- Check info
4.ap_invoice_payments_all       -- Invoice Payment info
5.ap_payment_schedules_all      -- Payment Schedule info
6.ap_holds_all                  -- Invoice Holds info
7.ap_lookup_codes               -- Payable lookup info
8.po_vendors                -- Supplier Header info
9.po_vendor_sites_all       -- Supplier Site info
10.po_vendor_site_contacts   -- Supplier Site Contact info
11.hr_locations              -- Supplier Site Address
12.ap_banks                  -- Bank Info
13.ap_bank_branches          -- Bank Branch info
14.ap_ae_headers_all         -- Accounitng header info
15.ap_ae_lines_all           -- Accounting Lines info
16.ap_ae_accounting_evets    -- Accounting events info
17.ap_terms                  -- Payment Terms

Accounts Receivables (AR) :
--------------------------
1.ra_customer_trx_all     -- Receivable transaction info
2.ra_customer_trx_lines_all -- Transaction lines info
3.ra_cust_trx_line_gl_dist_all -- Transaction distribution info
4.ar_receivable_applications_all -- Receiving application info
5.ar_cash_Receipts_all           -- Cash Receipt info
6.ar_terms                       -- Receivable Terms
7.hz_cust_accounts        -- Customer info
8.hz_parties              -- Party info
9.hz_cust_site_uses_all   -- Customer site use info
10.hz_cust_acct_sites_all  -- Customer Site Acct info
11.hz_party_sites          -- Party site info
12.hz_locations            -- Customer Site Adderess

Invenvtory (INV) Module :
------------------------
1.mtl_System_items_b    -- Master item info
2.mtl_onhand_quanitties -- Item onhand qty info
3.mtl_reservations      -- Item Reservation info
4.mtl_material_transactions -- Item Transaction info
5.mtl_item_locations         -- Item location info
6,mtl_Categeries             -- Item Category info
7.mtl_item_categories        -- Invemtry Categry
8.mtl_secondary_inventories  -- Subinventories info
9.org_organization_definitions -- Organizaition info
10.mtl_transaction_Accounts    -- Item Transaction info
11.mtl_txn_source_types        -- Item Transaction sources
12.mtl_parameters              -- Inventory Parameters

General Ledger(GL) :
---------------------

1.gl_je_headers    -- Journal Header info
2.gl_je_lines      -- Journal Line info
3.gl_je_batches    -- Journal Batch info
4.gl_Sets_of_books -- set of books info
5.gl_chart_of_accoutns -- chart of accounts info
6.gl_code_combinations -- Code combination info
7.gl_je_sources        -- Journal Source info
8.gl_je_categories     -- Journal Cateogiy info
9.fnd_currencies       -- Currency info
10.gl_balances         -- Journal Balances

 

Friday, 26 August 2011

order to cash Process

In this article, we will go through the Order to Cash cycle. The below are the steps in short:



1.       Enter the Sales Order
2.       Book the Sales Order
3.       Launch Pick Release
4.       Ship Confirm
5.       Create Invoice
6.       Create the Receipts either manually or using Auto Lockbox ( In this article we will concentrate on Manual creation)
7.       Transfer to General Ledger
8.       Journal Import
9.       Posting
Let's get into the details of each step mentioned above.
1.       Enter the Sales Order:
Navigation:
Order Management Super User Operations (USA)>Orders Returns >Sales Orders
Enter the Customer details (Ship to and Bill to address), Order type.
click on Lines Tab. Enter the Item to be ordered and the quantity required.
Line is scheduled automatically when the Line Item is saved.
Scheduling/unscheduling can be done manually by selecting Schedule/Un schedule from the Actions Menu.
You can check if the item to be ordered is available in the Inventory by clicking on Availability Button.
Save the work.
Underlying Tables affected:
In Oracle, Order information is maintained at the header and line level.
The header information is stored in OE_ORDER_HEADERS_ALL and the line information in OE_ORDER_LINES_ALL when the order is entered. The column called FLOW_STATUS_CODE is available in both the headers and lines tables which tell us the status of the order at each stage.
At this stage, the FLOW_STATUS_CODE in OE_ORDER_HEADERS_ALL is 'Entered'
2.       Book the Sales Order:
Book the Order by clicking on the Book Order button.
Now that the Order is BOOKED, the status on the header is change accordingly.
Underlying tables affected:
At this stage:
The FLOW_STATUS_CODE in the table OE_ORDER_HEADERS_ALL would be
 'BOOKED'
The FLOW_STATUS_CODE in OE_ORDER_LINES_ALL will be
 'AWAITING_SHIPPING'.
Record(s) will be created in the table WSH_DELIVERY_DETAILS with
RELEASED_STATUS='R' (Ready to Release)
Also Record(s) will be inserted into WSH_DELIVERY_ASSIGNMENTS.
At the same time DEMAND INTERFACE PROGRAM runs in the background and inserts
into MTL_DEMAND
3.       Launch Pick Release:
Navigation:
Shipping > Release Sales Order > Release Sales Orders.
Key in Based on Rule and Order Number
In the Shipping Tab key in the below:
Auto Create Delivery: Yes
Auto Pick Confirm: Yes
Auto Pack Delivery: Yes
In the Inventory Tab:
Auto Allocate: Yes
Enter the Warehouse
Click on Execute Now Button.
On successful completion, the below message would pop up as shown below.
Pick Release process in turn will kick off several other requests like Pick Slip Report,
Shipping Exception Report and Auto Pack Report
Underlying Tables affected:
If Autocreate Delivery is set to 'Yes' then a new record is created in the table WSH_NEW_DELIVERIES.
DELIVERY_ID is populated in the table WSH_DELIVERY_ASSIGNMENTS.
The RELEASED_STATUS in WSH_DELIVERY_DETAILS would be now set to 'Y' (Pick Confirmed) if Auto Pick Confirm is set to Yes otherwise RELEASED_STATUS is 'S' (Release to Warehouse).
4.       Pick Confirm the Order:
IF Auto Pick Confirm in the above step is set to NO, then the following should be done.
Navigation:
Inventory Super User > Move Order> Transact Move Order
In the HEADER tab, enter the BATCH NUMBER (from the above step) of the order. Click FIND. Click on VIEW/UPDATE Allocation, then Click TRANSACT button. Then Transact button will be deactivated then just close it and go to next step.
5.       Ship Confirm the Order:
Navigation:Order Management Super User>Shipping >Transactions.
Query with the Order Number.
Click On Delivery Tab
Click on Ship Confirm.
The Status in Shipping Transaction screen will now be closed.
This will kick off concurrent programs like.INTERFACE TRIP Stop, Commercial Invoice, Packing Slip Report, Bill of Lading
Underlying tables affected:
RELEASED_STATUS in WSH_DELIVERY_DETAILS would be 'C' (Ship Confirmed)
FLOW_STATUS_CODE in OE_ORDER_HEADERS_ALL would be "BOOKED"
FLOW_STATUS_CODE in OE_ORDER_LINES_ALL would be "SHIPPED"
6.       Create Invoice:
Run workflow background Process.
Navigation:Order Management >view >Requests
Workflow Background Process inserts the records RA_INTERFACE_LINES_ALL with
INTERFACE_LINE_CONTEXT     =     'ORDER ENTRY'
INTERFACE_LINE_ATTRIBUTE1=     Order_number
INTERFACE_LINE_ATTRIBUTE3=     Delivery_id
and spawns Auto invoice Master Program and Auto invoice import program which creates Invoice for that particular Order.
The Invoice created can be seen using the Receivables responsibility
Navigation:Receivables Super User> Transactions> Transactions
Query with the Order Number as Reference.
Underlying tables:
RA_CUSTOMER_TRX_ALL will have the Invoice header information. The column INTERFACE_HEADER_ATTRIBUTE1 will have the Order Number.
RA_CUSTOMER_TRX_LINES_ALL will have the Invoice lines information. The column INTERFACE_LINE_ATTRIBUTE1 will have the Order Number.
7.       Create receipt:
Navigation:
Receivables> Receipts> Receipts
Enter the information.
Click on Apply Button to apply it to the Invoice.
Underlying tables:
AR_CASH_RECEIPTS_ALL

8.       Transfer to General Ledger:
To transfer the Receivables accounting information to general ledger, run General Ledger Transfer Program.
Navigation:
Receivables> View Requests
Parameters:
Give in the Start date and Post through date to specify the date range of the transactions to be transferred.
Specify the GL Posted Date, defaults to SYSDATE.
Post in summary: This controls how Receivables creates journal entries for your transactions in the interface table. If you select 'No', then the General Ledger Interface program creates at least one journal entry in the interface table for each transaction in your posting submission. If you select 'Yes', then the program creates one journal entry for each general ledger account.
If the Parameter Run Journal Import is set to 'Yes', the journal import program is kicked off automatically which transfers journal entries from the interface table to General Ledger, otherwise follow the topic Journal Import to import the journals to General Ledger manually.
Underlying tables:
This transfers data about your adjustments, chargeback, credit memos, commitments, debit memos, invoices, and receipts to the GL_INTERFACE table.
9.       Journal Import:

To transfer the data from General Ledger Interface table to General Ledger, run the Journal Import program from Oracle General Ledger.
Navigation: General Ledger > Journal> Import> Run
Parameters:
Select the appropriate Source.
Enter one of the following Selection Criteria:
No Group ID: To import all data for that source that has no group ID. Use this option if you specified a NULL group ID for this source.
All Group IDs: To import all data for that source that has a group ID. Use this option to import multiple journal batches for the same source with varying group IDs.
Specific Group ID: To import data for a specific source/group ID combination. Choose a specific group ID from the List of Values for the Specific Value field.
If you do not specify a Group ID, General Ledger imports all data from the specified journal entry source, where the Group_ID is null.
10.   Define the Journal Import Run Options (optional)
Choose Post Errors to Suspense if you have suspense posting enabled for your set of books to post the difference resulting from any unbalanced journals to your suspense account.
Choose Create Summary Journals to have journal import create the following:
• one journal line for all transactions that share the same account, period, and currency and that has a debit balance
• one journal line for all transactions that share the same account, period, and currency and that has a credit balance.
Enter a Date Range to have General Ledger import only journals with accounting dates in that range. If you do not specify a date range, General Ledger imports all journals data.
Choose whether to Import Descriptive Flexfields, and whether to import them with validation.

Click on Import button.
 Underlying tables:
GL_JE_BATCHES, GL_JE_HEADERS, GL_JE_LINES
11.   Posting:
We have to Post journal batches that we have imported previously to update the account balances in General Ledger.
Navigation:General Ledger> Journals > Enter
Query for the unposted journals for a specific period as shown below.
From the list of unposted journals displayed, select one journal at a time and click on Post button to post the journal.
If you know the batch name to be posted you can directly post using the Post window
Navigation:General Ledger> Journals> Post
Underlying tables:
GL_BALANCES.


--


Thursday, 25 August 2011

PLSQL FUNCTION script for converting rupees in words

PLSQL FUNCTION script for converting rupees in words

Function Script:

CREATE OR REPLACE FUNCTION ruppee_to_word (amount IN NUMBER)
   RETURN VARCHAR2
AS
   v_length   INTEGER         := 0;
   v_num2     VARCHAR2 (50)   := NULL;
   v_amount   VARCHAR2 (50)   := TO_CHAR (TRUNC (amount));
   v_word     VARCHAR2 (4000) := NULL;
   v_word1    VARCHAR2 (4000) := NULL;

   TYPE myarray IS TABLE OF VARCHAR2 (255);

   v_str      myarray         := myarray (' Thousand ', ' Lakh ', ' Crore ');
BEGIN
   IF ((amount = 0) OR (amount IS NULL))
   THEN
      v_word := 'zero';
   ELSIF (TO_CHAR (amount) LIKE '%.%')
   THEN
      IF (SUBSTR (amount, INSTR (amount, '.') + 1) > 0)
      THEN
         v_num2 := SUBSTR (amount, INSTR (amount, '.') + 1);

         IF (LENGTH (v_num2) < 2)
         THEN
            v_num2 := v_num2 * 10;
         END IF;

         v_word1 :=
               ' AND '
            || (TO_CHAR (TO_DATE (SUBSTR (v_num2, LENGTH (v_num2) - 1, 2),
                                  'J'),
                         'JSP'
                        )
               )
            || ' paise ';
         v_amount := SUBSTR (amount, 1, INSTR (amount, '.') - 1);
         v_word :=
               TO_CHAR (TO_DATE (SUBSTR (v_amount, LENGTH (v_amount) - 2, 3),
                                 'J'
                                ),
                        'Jsp'
                       )
            || v_word;
         v_amount := SUBSTR (v_amount, 1, LENGTH (v_amount) - 3);

         FOR i IN 1 .. v_str.COUNT
         LOOP
            EXIT WHEN (v_amount IS NULL);
            v_word :=
                  TO_CHAR (TO_DATE (SUBSTR (v_amount, LENGTH (v_amount) - 1,
                                            2),
                                    'J'
                                   ),
                           'Jsp'
                          )
               || v_str (i)
               || v_word;
            v_amount := SUBSTR (v_amount, 1, LENGTH (v_amount) - 2);
         END LOOP;
      END IF;
   ELSE
      v_word := TO_CHAR (TO_DATE (TO_CHAR (amount, '999999999'), 'J'), 'JSP');
   END IF;

   v_word := v_word || ' ' || v_word1 || ' only ';
   v_word := REPLACE (RTRIM (v_word), ' ', ' ');
   v_word := REPLACE (RTRIM (v_word), '-', ' ');
   RETURN INITCAP (v_word);
END ruppee_to_word;

TEST SCRIPT:

SET serveroutput on;

BEGIN
   DBMS_OUTPUT.put_line (ruppee_to_word (1455555));
END;

--


E-Business Suite Release 12.1.3 Now Available

E-Business Suite Release 12.1.3 Now Available

Announced early this week Oracle E-Business Suite 12.1.3 is now available for download.

R12.1.3 is a purly a maintenance patch (RUP) and can only be installed on top of an existing EBS 12.1 environment. which combines error corrections, statutory/regulatory updates, and functionality enhancements into a consolidated, suite-wide patch set.

On the Finance, Procurement and HRMS there is the usual small changes here and there, additional changes for different countries. Compare to 12.1.1 and 12.1.2 had a lot more functionality that we would be interested in all.

Refrence

  • Oracle E-Business Suite Release 12.1.3 Release Update Pack (Patch 9239090)
  • Oracle E-Business Suite Release 12.1.3 Readme (Note 1080973.1)
  • Oracle E-Business Suite Release 12.1.3: Release Content Documents (Note 561580.1)

Of interest to reader will keep updated with some new features in upcoming post.



--


Supplier Hub

Supplier Hub(This article is from oracleappshub.com)

Oracle Supplier Data Hub is part of a full suite of Master Data Management (MDM) tools unifies and shares critical information about an organization's supply base. It does this by enabling customers to centralize all supplier information from heterogeneous systems and thus creates a single view of supplier information that can be leveraged across all functional departments.

dgreybarrow Oracle Supplier Hub feature :

Oracle Supplier Hub can be broadly categorize into five major coverage area as per fig 1.

Oracle Supplier Hub

  1. Consolidate - Data Import Management, Source System , Cross Reference
  2. Cleanse - Matching, D & B Data Enrichment
    • Various Functionality Coverage are
      • Supplier Registration DQM and D&B
      • Supplier attribute classification
      • Merge, validate duplicates. Similar supplier names are checked.
    • Integrated with D&B out of box. Import data in real-time or batch mode
  3. Master - Supplier Classification & Relationship
  4. Share - Publication and Synchronization, Web Services, Security. This is also called as called OSN Integration.
  5. Govern -Classification Management, Hierarchy Management and Task Management

Typically data administrator functionalities are available from Supplier Data Librarian Super User application responsibility where the data librarian functionalities are available from Supplier Data Librarian application responsibility.

Take a note profile option POS:SM: Supplier Data Hub Configuration with a value Standalone at site level if you are deploying Supplier Hub as a centralized standalone MDM solution OR configure the profile option with a value Integrated EBS if you are deploying Supplier Hub as an Add-on for E-Business Suite to an existing EBS R12.1 application Installation after you purchase the application licenses.

dgreybarrow From R12.1.2 to R12.1.3

Oracle Supplier Hub was first added in EBS in R12.1.2. With recent version 12.1.3, there is slight enhancements as below:

  • Tasks and Notes , Contact points and Party Relationship
  • Bulk Import & Spreadsheet Import
  • Smart Search , Enable party as supplier , Supplier Creation De-duplication
  • Supplier Data Publications and supplier Profile Report

dgreybarrow Supplier Hub and TCA

Oracle Supplier Hub is built on top of Oracle Trading Community Architecture (TCA) of Oracle E-Business suite and leverage TCA implementations features like Data Quality, Batch Management, Source System Management, Adapters, Classifications, Relationships/Hierarchies, Tasks/Notes (available via Customer Data Hub (CDH)).

If you refer back to TCA and CDH documentations for the various profile options and implementations that are applicable at the party level for the functionalities exposed from Supplier Hub navigations.

You can take advantage of TCA DQM APIs to identify the potential duplicate Supplier parties in Supplier Master.

Customers can implement and use Supplier Lifecycle Management (SLM) to streamline the supplier relationship management processes through the trading lifecycle.

dgreybarrow License Requirement

Supplier HUB Data requires a separate license. Those who already using isupplier can requires a separate license

It is a new module introduced in Oracle Applications release 12.1.2, and it allows integration with other systems besides Oracle Applications.

Option 1: Oracle Supplier Life cycle Management can be deployed on an existing E-Business suite R12.1 application instance.
Oracle Supplier Hub Add-on for E-Business Suite which has the same features that of Oracle Supplier Hub can be deployed on an existing E-Business suite R12.1 application instance.

Option 2: Customers who want to deploy a standalone Supplier master data management system can implement Oracle Supplier Hub using Oracle E-Business suite R12.1 platform. They can implement Oracle Supplier Life cycle Management along with Oracle Supplier Hub or as a standalone E-Business Suite application like any other E-Business Suite application in a new instance.



--


Wednesday, 24 August 2011

how to navigate EBS

CLICK THIS LINK

HOW TO NAVIGATE EBS

--


Order Management(OM) Integration Options

Order Management(OM) Integration Options

OM is one of the most complex modules in EBS, and in typical complex business model, the integration of other product or third party can't be denied. Processing an Order requires integration with many other business areas. Most integration points with other Oracle products are implemented via PL/SQL-based APIs.Here is brief discussion for Order Management EBS Integration points.

OM Integration

double-arrowHow Order Management integrated with iStore?

OM records customer orders placed via iStore, Order Capture and other CRM applications. It validates setup for shipping and payment options along with providing order status and the shipping information to customers. Once the quote is converted into an order, you can only make changes to the order through Order Management, prior to booking.

double-arrowHow Order Management integrated with Telesales?

Telesales' eBusiness Center has several integrations with Order Management. There is an Order tab to view order history and create new orders.

double-arrowHow Order Management integrated with Cost Management?

OM call the the Cost Management CST_COST_API to obtain cost from cst_item_costs or cst_quantity_layers when the Gross Margin feature of OM is enabled.

double-arrowHow Order Management integrated with Field Service?

Field Service Report requires specifically that you setup Price Lists, Units of Measure (UOM), and two Inventory Item Attributes in Order Management. Price Lists contain the list price for an item. Items could be material, but also labor and expenses like units of driving distance. Once material, expense and labor transactions for a task have been taken down on the Field Service Debrief, this information is updated to Charges. In Charges the list price for the item is received from Order Management and is used to generate an invoice for a customer.

double-arrowHow Order Management integrated with Depot Repair?

This is used by Depot Repair to create RMA and Sales Orders, validate customer accounts, and invoice customers for repairs.

double-arrowHow Order Management integrated with Install Base?

Information about Install Base trackable items is interfaced to Install Base in the following ways:

  • Shippable Items: For both orders and returns, information is interfaced to Install Base via Inventory Interface.
  • Non-Shippable Items: For both order and returns, information is interfaced to Install Base via the Order Management Fulfillment workflow activity Install Base also supports Internal Sales Order transactions by appropriately creating /updating item instances as a result of transactions between internal organizations such as pick transactions, shipments, and receipts.

double-arrowHow Order Management integrated with Service Contracts?

Service Contracts need to pulls information from the Install Base newly created customer records and creates an ownership record.

  • Warranty: A Warranty contract is created when a Serviceable product is shipped.
  • Extended Warranty: An Extended Warranty contract is created when an Extended Warranty is sold on a sales order. Oracle EAM & OM integration
  • Subscription: Fulfillment starts after the contract approval process.
  • RMA: Service Contracts sends Order Management RMA information

double-arrowHow Order Management integrated with Advanced Planning System/Global Order Promising/ ASCP?

Order Management uses Advanced Supply Chain Planning's Global Order Promising functionality to check the availability of ordered items and to schedule order lines.Scheduled Order Lines are viewed as demand by the Advanced Planning System.

double-arrowHow Order Management integrated with Purchasing?

Order Management integrates with Oracle Purchasing in the following functional areas:

  • Return Receipts: Order Management uses the Oracle Purchasing Receipt functionality to handle Return receipts. When an item is received, Purchasing calls Order Management to indicate delivery and to get COGS information.
  • Internal Orders: Oracle Purchasing uses Order Import to create internal orders.
  • Drop-Ship Orders: Order Management integrates with Purchasing to fulfill drop-ship orders. It populates the PO requisitions interface table with information for order lines that need to be fulfilled via an external source.

double-arrowHow Order Management integrated with Bills of Material ?

This is integrated with BOM when models and kits are entered on sales orders.Normally OM uses the Bill of Material defined for the model or kit or explode the model into its components, for the purpose of the user selecting options and for shipping purposes.

double-arrowHow Order Management integrated with Workflow ?

Oracle Workflow is heavily used in EBS and specially to manage Order and Line processing. These PL/SQL based Workflow is a natural replacement for Order Cycles functionality. It provides a Graphical User Interfaces for defining activities, notifications, flows and viewing flow status.

double-arrowHow Order Management integrated with Advanced Pricing ?

OM is tightly integrated with Advance Pricing which includes price lists, modifiers, and agreements. Order Management, through its Sales Agreement functionality, creates price lists and pushes them into the Advanced Pricing tables. Order Management calls the Pricing Engine to make pricing requests during the processing of orders, and receives pricing information back from Advanced Pricing.

double-arrowHow Order Management integrated with Configurator ?

Order Management integrates with Oracle Configurator to support ordering and validation of configurations. The Configurator window is a Java Applet that can be launched from the Sales Order form.

double-arrowHow Order Management integrated with Oracle Payment ?

As we know Oracle payment is new product and OM accepts Credit Card information when entered on orders. It integrates with Oracle Payment to validate this information and get Credit Card authorizations. This information is then interfaced to Receivables.

double-arrowHow Order Management integrated with Receivables ?

Order Management integrates with Oracle Receivables in the following function areas:

  • Invoice Interface: Order Management sends invoices and credit memos to Receivables via the Invoice Interface workflow activity. The seeded Invoice Interface - Line workflow sub-process populates the Receivables interface table.
  • Receipts: Order Management calls Receivables' Receipt API to create receipts for prepaid credit card orders. Order Management receives a payment-set id from AR when the receipt is created, and then passes that id back to AR in the autoinvoice tables at invoicing time so that the invoice can be matched to the receipt.
  • Tax: Order Management calls the Global Tax Engine APIs to default the Tax Code (ARP_TAX.GET_DEFAULT_TAX_CODE) and to calculate estimated tax (ARP_PROCESS_TAX.SUMMARY) for the order Line. The estimated tax value is now stored on the line and re-calculated only when any of the attributes affecting tax change. Information about the tax value is also stored as Line Price Adjustments.
  • Credit Management: If the Credit Management product is installed, notifications are sent to it by Order Management when an order or line goes on credit hold, to initiate a credit review. If the credit review results in a decision to approve the order, a business event is posted which OM subscribes to and then releases the credit hold.

double-arrowHow Order Management integrated with Payables ?

OM accesses the AP Bank Accounts table to populate the Credit Card LOV when an order is being entered with a payment type of Credit Card. Additionally, if a new credit card number is entered and the authorization of that card through iPayment is successful, Order Management calls an AR API to create a new bank account record for the customer in the Bank Accounts table.

double-arrowHow Order Management integrated with Inventory Management ?

  • Order Management integrates with Oracle Inventory Management through Managing Reservations.
  • You can create reservations to on-hand quantities from the Sales Orders form.

double-arrowHow Order Management integrated with Trade Management ?

Order Management can receive RMA orders and lines from Oracle Trade Management as part of its dispute handling functionality.


--


Oracle General Ledger Integration

Oracle General Ledger Integration

Oracle General Ledger is one of the core product of EBS suite, and this is Integrated with almost every segment within EBS.Here is a list of just some of the Financial ,manufacturing and Human Resource Management products that integrate with General Ledger. Typically the integration of General ledger in EBS can be best understood as:

GL Integration

The integration data information can be best understood as below:

double-arrowOracle Financial

  • Oracle Payables sends invoices, payments, realized gain and loss on foreign currency, and invoice price variance to GL.
  • Oracle Receivables sends invoices, payments, adjustments, debit memos, credit memos, cash, chargebacks, and realized gain and loss on foreign currency to GL.
  • Oracle Assets sends capital and construction in process asset additions, cost adjustments, transfers, retirements, depreciation, and reclassifications to GL.
  • Oracle Purchasing sends accruals or receipts not invoiced, purchase orders, final closes, and cancellations to GL.
  • Oracle Projects sends cost distribution of labor and non-labor costs, and project revenue to GL.
  • Oracle Treasury sends revaluation and accrual entries to GL.
  • Oracle Property Manager sends revenues and expenses related to real estate to GL.
  • Oracle Lease Management sends accounting distributions related to leases, such as bookings of contracts, accruals, asset dispositions, terminations, and adjustments for multi-GAAP contracts to GL.

double-arrowOracle HRMS and Payroll

  • Oracle HR shares employee information with GL.
  • Oracle Payroll sends salary, deductions, and tax information to GL.

double-arrowOracle Manufacturing:

In terms of manufacturing this is Integrated as:

  • Oracle Inventory sends cycle counts, physical inventory adjustments, receiving transactions, delivery transactions, intercompany transfers, sales order issues, internal requisitions, sub-inventory transfers, and Cost of Goods Sold (COGS) to GL.
  • Work In Process(WIP) sends material issues or backflush from WIP to GL, along with completions, returns, resource and overhead transactions, and cost updates.
  • Oracle Labor Distribution normally sends salary costs to GL.

double-arrowOther Products

Oracle GL not only integrated with Application product, it does have capability to integrate with other products which is used for adhoc cum management Reporting, these tools are mostly.

  1. Business Intelligence/Analytic Solutions
  2. Enterprise Planning and Budgeting (EPB)
  3. Oracle Financial Services Applications (OFSA)
  4. Daily Business Intelligence (DBI)
  5. Activity-Based Management (OABM)
  • General Ledger's integration with Oracle Enterprise Planning and Budgeting (EPB)allows us to easily identify, analyze, model, budget, forecast, and report on information stored in our general ledger. Using Oracle GL to maintain and report on account balances throughout the accounting period, and use Financial Analyzer to analyze financial data, such as actual and budget balances, which is after closing the period. We can automatically transfer actual, budget, or encumbrance data, as well as functional, statistical, and foreign entered data from General Ledger to Financial Analyzer, which is on of requirement if company does have different management reporting approach. With financial Analyzer, we can perform sophisticated budgeting and modeling, make changes to budgets and write back budget data to a new budget in GL or to several budget versions for comparative reporting. We would also drill directly from EPB balances to balances and transactions in Oracle General Ledger. With this extended functionality your EPB users with immediate and direct access to GL data without having to run reports or account inquiries in GL, that makes process efficient without any extra step.
  • Oracle Financial Services Applications (OFSA) is a product suite that helps financial services institutions assess enterprise performance. This integration allows the transfer of General Ledger balances to OFSA to reconcile OFSA instrument tables, calculate transfer pricing of non-interest balance sheet items, or perform allocations. The results of OFSA allocation and transfer pricing results can then be transferred back to GL for posting and reporting.
  • The integration with Oracle Daily Business Intelligence (DBI) allows us to get a daily snapshot of company's financial picture through its E-Business Suite Portals. This is achieved by over 200 pre-inbuilt Portals provide every user in the enterprise with the right information that they need, about every aspect of their business. This makes a centralized place to see the information spans across multiple applications in real time basis.
  • The integration with Oracle Activity Based Management (OABM) allows you to perform complex analysis on costs that are collected in General Ledger in a separate analysis environmentâ€"apart from your GL data. OABM is optimized to support multi-layer complex cost assignment rules, activity hierarchies, and complex product and service definitions in terms of activities with complete activity definitions.
--


ORACLE APPS MIGRATION PROJECT :

ORACLE APPS MIGRATION PROJECT :

Things to take care in a migration project..
These are all my personal observations if any one has anything new to add plz put out a mail i will incorporate them also..

Now a days we are coming across many migration projects..comparitviely these are supposed to be easy and straight forward..
But if we take care of few more things..it would be even smoother...

What is a migration project.??
It is moving from a product of lower version to a product of higher version(the other way is also called migration only)

What will the customer expect??
He expects a higer performance from the system
Added new Functionality
Better support from oracle
The system is supposed to work the same way as it operates..But look and feel might be a bit different..Functionality should remain intact

What are the major challenges for it?
1.The amout of customization in the legacy system
2.Type of Customization--whether custom built modules /Standard process customised
3.Integration with other systems
4.Support of new environments
5.Amount of change in the product from old to new version
6.Whether Standards Followed while customising the standard obejcts like (standard reports,standard forms,workflow..)

What are different phases in it?
1.MIgration phase..First we will take a clone of the instance migrate the applications to the new version with the old data)
Oracle provide the scripts to migrate the data and the software will install the new application objects.
2.Optimised migration--We redo the migration phase again in short span of time to calculate the exact cut over time
3.MTP--Movement to production

What all we need to take care???

Environmental change: some time the old systems might be in a different environment and new system will be on a different environment.
like old one in AIX and new ones in red hat linux.
One of the problem to expect is some commands in AIX might not work in Linux environments.
So if we have shell scripts in or host script files..those need to be checked and changed for the new environment

Database Layer Change:As the product is migrated there might be a database change happend like new not null columns getting added up
so incase you have any direct inserts happening into the oracle tables even interfaces they might need to be corrected 
and values need to be populated to the new not null columns

Standard Report Modifications:Because the upgrade will get new application objects any modification done to the standard report objects will be lost. 
it is better to rename those objects and re-register them to keep intact the object for future migration

Custom reports migration :For reports we need to just open the report in the new version of the report builder in case the report builder version difference exists
use shift+cntrl+k to compile the objects and save it.This should make the reports work.
But from my personal experience we need to run all the reports and data validation should be done for all..
This might be tedious task if there are huge number of reports ,But it has to be done.
Project plan should include the testing of each and every report(Just data level validation)
One more important thing i heard the compilation of the report builder will not validate the query ..
so any column changes will not get reflected at migration time they can only be find out at run time 
Standard Form object migration: Migration will take care of the upgradation of standard objects. Hope that there are no customisation at 
the code level for the standard objects.In case if there are any try to redo the customisation using the new feautures 
like forms personalizations,custom.pll.One more important thing is before doing the customisation check whether those are really required 
in the new system also..Even the customer process also might have changed ..so check with the customer 
also before redoiing them . 

Custom Form Objects Migration:This is not as simple as the reports..There is a FLINT60(upto 11.5.10.2) or Corresponding utility available to 
upgrade the forms from the previous version to the new version.The major road block is if the forms are not developed 
as per oracle application standards.Like property paletter not defined,seperate button to popup lov's
and other..In that case the form has to migrated using the flint60 utility and manually changes need to be made to have 
the same look and feel of the new version. 
For detailed steps of using flint60 and custom form migration check my blog http://oracleappstechnicalworld.blogspot.com/ 

Legacy Sytem Integration:This will be one of the big task..The first step we need to do is figure out how the legacy systems are integrated
1.Through File system
2.Through DB Links 
3.Third party softwares 
1.For file system integration check the directory permission and UTL_DIR_PATH variables in the legacy and new system
2.For dblinks one check whether the dblinks can be created between the new database version and the database version of the legacy system.Better to confirm at the assesment stage itself in case not, time need to be allocated for alternative solution implementation
3.Check througthly the compatabilities in case some thing like this exists

Pro*c Programs : The pro*c files need to be recompiled on the new instance.Pro*C Environment need to be set on the new application .If there any custom pro*c programs Pro*c enviromental 
setup should be a task in the migration.process.


General Observations: One important thing to remember is the migration will get overwrite all the standard objects and standard application data ex:FND Messages.Suppose in the old instance you have changed the standard message text , then that change will be lost in the migration process.Those changes has to be redone.


--


Oracle E-Business Suite 12.1 available now

Oracle E-Business Suite 12.1 available now

Oracle announced today the general availability of Oracle E-Business Suite 12.1. Since the the press release link on www.oracle.com is not yet working, I copied the press release in this article. Apart from that (?), this morning I found the Release Content Documents for Release 12.1.1 on Metalink (last updated on 28-APR-09), including theFinancial Management RCD in PDF format.

Anyway, this is the announcement:


Oracle(R) E-Business Suite Release 12.1 Now Available to Help Organizations Achieve Better Business Value with New Products and Functionality

Latest Release of the Oracle E-Business Suite Provides Rapid Value Solutions, Global Enterprise Platform and Industry-Specific Capabilities

ORLANDO, Fla., May 4 /PRNewswire-FirstCall/ -- COLLABORATE 2009 --

News Facts

  • Oracle today announced general availability of the Oracle(R) E-Business Suite Release 12.1 to help companies and organizations more effectively compete in today's economy.
  • This latest release of the Oracle E-Business Suite provides product enhancements across human resources, supply chain management, procurement, projects, master data management, customer relationship management and financials.
  • With the Oracle E-Business Suite Release 12.1, organizations can achieve rapid value today, as well as standardize and simplify their infrastructure and business processes for long-term results.
  • The Oracle E-Business Suite Release 12.1 also features industry specific features and solutions that help drive greater value across the enterprise. Industries with significant new functionality advancements include Wholesale Distribution, Public Sector, High Technology, Engineering & Construction, Life Sciences, Retail, Professional Services, Communications, Consumer Goods and Utilities.

Oracle E-Business Suite Release 12.1 Details and Features

  • The Oracle E-Business Suite Release 12.1 helps companies achieve rapid value by offering stand-alone solutions that complement existing Oracle E-Business Suite 11i or Release 12 environments. Customers can take advantage of rapid value solutions without having to upgrade to this latest release.
  • New customers can take advantage of a global business platform that will help drive standardization and simplification throughout their enterprises for long-term benefits.
    • Key features of the Oracle E-Business Suite Release 12.1 include an integrated talent management solution with enhancements to Recruiting, Succession Planning, and Performance and Learning Management.
    • A new product called Oracle Landed Cost Management will give organizations financial visibility into their extended supply chain costs.
    • Companies can increase agility by leveraging pre-built, sustainable integrations that enable reduced implementation risk and cost with Oracle Application Integration Architecture for the Oracle E-Business Suite.
  • This latest release of the Oracle E-Business Suite includes several rich industry-specific solutions that help companies strengthen their position in the market.
    • Distributors will benefit from greater visibility into ROI of promotional funds, accrued assets, the effect of supplier price changes and related liabilities with Oracle Supplier Ship and Debit and Oracle Price Protection for Wholesale Distribution.
    • Oracle Site Hub helps organizations centralize information to help eliminate the problems associated with fragmented, incomplete and inconsistent site data resulting from rapid business expansion or mergers and acquisitions.
    • Retail businesses can leverage Oracle Product Information Management for Retail (PIM for Retail) to centralize product information from heterogeneous systems into a single view that can be used across all functional departments.
    • Oracle E-Business Suite Release 12.1 provides out of the box Federal accounting support with Project Accounting for automating funds consumption and billing in compliance with funding rules, supporting advance processing and ultimately helping to reduce overhead.
    • Oracle Subcontractor Payments for Engineering & Construction helps owners and general contractors manage cash flow and ensure their subcontractors are satisfying contract deliverables by controlling the payment of subcontractor invoices.{/info}

--