Total Pageviews

Thursday, 5 January 2017

Creating Custom Webadi Template in Oracle Apps

Custom Webadi creation in Oracle Apps

Webadi Summary:

Oracle Web ADI  is being used by the End Users in the Oracle E-Business Suite to perform some of their day-to-day data entry tasks in the commonly used Microsoft desktop applications like Excel and upload the data to EBS.

To create the custom Web ADI,We need two responsibilities.
  1. Desktop Integration Manager(lets you creating/Managing Integrator and parameters)
  2. Desktop Integrator(lets you create Document, layout, Mapping, Setup options etc.,)
Below are the steps to create the Web ADI

1.Create database table: We use this table to load the data by using Web ADI template.

Table Script:

CREATE TABLE xxcust_stage_table
(
 project_number VARCHAR2(100)
,task_number VARCHAR2(100)
,description VARCHAR2(100)
);

2. Create Package: We use this package to do the validations before uploading the data to the custom table.

Package Specification:

CREATE OR REPLACE PACKAGE xxcust_webadi_demo_pkg
AS
/*
 * Developer      :
 * Client/Project :
 * Database       :
 * Date           :
 * Description    : This package contains the logic for Web ADI upload
 * Issue          :
 * Version Control:
 * Author      Version      Date         Change
 * -------      -------      --------     -------
*/

   PROCEDURE xxcust_webadi_stg (
      icproject_number  VARCHAR2
     ,ictask_number     VARCHAR2
     ,icdescription     VARCHAR2
   );                       
END;                                                        
/

Package Body:

CREATE OR REPLACE PACKAGE BODY APPS.xxcust_webadi_demo_pkg
AS
/*
 * Developer      :
 * Client/Project :
 * Database       :
 * Date           :
 * Description    : This package contains the logic for webadi upload
 * Issue          :
 * Version Control:
 * Authour      Version      Date         Change
 * -------      -------      --------     -------
*/
   PROCEDURE project_validation (
  p_project_number VARCHAR2
 ,p_proj_valid     OUT  NUMBER
   )
   IS
   BEGIN
      SELECT COUNT (1)
        INTO p_proj_valid
        FROM pa_projects_all pa
       WHERE pa.segment1 = p_project_number
         AND pa.project_status_code = 'APPROVED'
         AND TRUNC (sysdate) BETWEEN pa.start_date AND NVL (pa.completion_date, TRUNC (sysdate));
   END project_validation;

   PROCEDURE task_validation (
      p_task_number                       xxcust_stage_table.task_number%TYPE
     ,p_project_number                    xxcust_stage_table.project_number%TYPE
     ,p_task_valid               OUT      NUMBER
   )
   IS
   BEGIN
      SELECT COUNT (1)
        INTO p_task_valid
        FROM pa_tasks pt
            ,pa_projects_all ppa
       WHERE pt.project_id = ppa.project_id
         AND pt.task_number = p_task_number
         AND pt.chargeable_flag = 'Y'
         AND (   pt.completion_date IS NULL
              OR pt.completion_date > TO_DATE (sysdate, 'dd/mm/yyyy'))
         AND ppa.segment1 = p_project_number;
   END task_validation;

   PROCEDURE xxcust_webadi_stg (
      icproject_number                  xxcust_stage_table.project_number%TYPE
     ,ictask_number                     xxcust_stage_table.task_number%TYPE
     ,icdescription                     xxcust_stage_table.description%TYPE
   )
   IS
      l_projnumber               NUMBER DEFAULT 0;
      l_tasknumber               NUMBER DEFAULT 0;
      l_exptype                     NUMBER DEFAULT 0;
      l_vatcode                     NUMBER DEFAULT 0;
      l_gl_code                     NUMBER DEFAULT 0;
      l_trans_date_valid       CHAR;
      l_trans_pa_date_valid CHAR;                                                                                                  
      l_exp_message            VARCHAR2 (2000) DEFAULT NULL;
      l_app_id                      NUMBER;
      e_invalid                     EXCEPTION;
      l_valid                        CHAR;                                                                                                            

   BEGIN

       project_validation (icproject_number,l_projnumber);

         IF l_projnumber = 0
         THEN
            l_exp_message := 'Project Number does not exist';
         END IF;
       
         task_validation (ictask_number
                         ,icproject_number
                         ,l_tasknumber
                            );

         IF l_tasknumber = 0
         THEN
            l_exp_message:='Receiver Task Number does not exist';
         END IF;

      IF l_exp_message IS NOT NULL
      THEN
         RAISE e_invalid;
      ELSE
         INSERT INTO xxcust_stage_table
                     (project_number
                     ,task_number
                     ,description
                     )
              VALUES (
                     icproject_number
                     ,ictask_number
                     ,icdescription
                     );
      END IF;
   EXCEPTION
      WHEN e_invalid
      THEN
         raise_application_error (-20002, l_exp_message);
      WHEN OTHERS
      THEN
         raise_application_error (-20000, SQLCODE || ':' || SQLERRM);
   END;                                                
END;                                                                
/

3.Create an integrator:

Navigate to -->Desktop Integration Manager - > Create Integrator































Step 1 :

Click on Create Integrator. Below page will open and enter the required details and select the checkbox ‘Display in Create Documents Page’ and click on the Next Button

Integrator Name: Custom Webadi Test Template
Internal Name: XXCUST_WEBADI_TEMPLATE
Application: Projects
















Step2:

Enter the Interface Name :xxcust_webadi_demo_pkg
Interface Type: Select API Procedure from drop down list
Package Name :xxcust_webadi_demo_pkg(Give the package name as mentioned in step2)
Procedure Name:xxcust_webadi_stg(Select the main procedure name of the package:xxcust_webadi_demo_pkg)
API Returns : Select FND Message Code from the list of values. This will help to show the error message in the webadi template
















Click on Apply button and the below page will open.
















click on the select radio button as highlighted above and the below page will open


















To create list of value for the webadi column,click on the pencil button as highlighted below and enter the details

Validation Type: Table
Id column: segment1(column name)
Meaning: segment1(column name)
Validation Entity: pa_projects_all(table name)
Lov Type : Pop up List
















Save the details and click on Next
Step 3:













click on Next .
Step 4 :












select the From template from list of values as mentioned below













Click on create button

















Click on Next

Step 5:











click on Submit









Custom
 integrator is ready now.

4.Create the Layout.

Navigate to Desktop Integrator --> Define Layout


















Select Integrator name(We have created from the above steps) from the drop down list.







click on Go button










click on Create








Enter Layout Name and click on Next











click on Next














click on Apply













Integrator Layout is created successfully.

                           
Download the Webadi Template

Navigate to Desktop Integrator --> Create Document




















Step 1 :








select the Integrator name from drop down list and click on Next










click on Next











click button Create Document














Click on Open












Click on Allow and wait till the below Webadi template creates










 Webadi Template with List of Values


Tuesday, 16 June 2015

Oracle Alerts

Oracle Alerts:

Alerts in EBS allows you to monitor your Business information's to keep

•Be informed of database exceptions as and when they happen
•Sending Notifications to business user
•Performing routine database tasks automatically
•Calling Concurrent Programs, Shell Scripts and Operating System Scripts

There are two type of Alerts, Event and Periodic.

Event Based Alert: 

These Alerts are fired/triggered based on some change in data in the database.

Ex: If u want to notify your manager when you create an item in the inventory you can use event based alerts. When you create an item in the inventory it will create a new record in mtl_system_items_b, here inserting a record in the table is an event so whenever a new record is inserted it will send the alert. In same alert you can also send the information related to that particular item.

Periodic Alert: 

These Alerts are triggered hourly, daily, weekly, monthly or yearly based on your input.

Ex: If you want to know list of items created on that day at the end of day you can use periodic alerts repeating periodically by single day. This alert is not based on any changes to database. This alert will notify you every day regardless of data exists or not that means even if no items are created you will get a blank notification.

Creating an Event Alert:

Defining an Alert:

1.  Responsibility –> Alert Manager.
2.  Navigate to the Alerts Window.
Alert –> Define 
3.  Define a Period Alert:
Application = Human Resources
Name = xxscc_test1
Enable = Selected.
4.    Event
Application = Human Resources
Table = PER_ALL_PEOPLE_F
5.   Enter the following SQL statement.
Select employee_number
into&emp_num from
Per_all_people_f where rowid=:rowid






























6. Verify, to check whether the syntax written is correct.
7. Save
8. Define Alert Actions:
Action Name:  send_email_notification








8. Define Action Details:
Click on Action Details Button
TO :   Give you email ID here.    
Note : You can also put here also bind variable with &email if that taken in select statement.
Subject:  Give Subject of your Email.
Text:  hello, this is test email &emp_num


























9- Define Action Sets
Click on Action Sets Button.
Action Set Name = Send Email Test
Go to Action Set Details –> Members.
Action = send_email_notification as shown below.
























10- Define Operating Unit
Click on Alert Details Button from first Alert Window.
Navigate to Installation Tab.
Operating Unit = <Your Operating Unit> for me it is US Federal Government.


























11- Save.
Now if you update or Create New Employee you will received notification in given email id.

Follow the below navigation to check the Alert history:

N->Alert Manager ->Alert -> History

Stored in: ALR_ACTION_HISTORY table




















Run Periodic Alerts Forcefully:

N-> Alert Manager-> Request ->Check


Saturday, 13 June 2015

Run the Concurrent Program on priority basis

We can set the priority of the concurrent program as follows.

1.If we know the user of the program.

In oracle EBS we can set the priority of specific users so that when they run specific reports, those reports should be run on high priority.

 1.Go to Sysadmin Responsibility and go to menu Profile > System.
 2.Make sure Site and User boxes are checked.
 3.Select the user name for the user for whom you want to increase the priority
 4.Enter the following within the Profile box and click on Find: Concurrent:Request Priority
 5.Change the priority for the user as you see fit (1 is highest, 99 is lowest, 50 is the default) , Save and exit.

2.If we know the program name and then we can run that program as priority.

Please follow the below steps:

1.Login system administrator /Application developer and go to define concurrent screen
   Under Concurrent >> Program >> Define
2.Find the Program name whose priority you wish to change for ex. "Payable Transfer to GL"
3.On this screen you can set priority of this request by entering value in "Priority" field( as mark in red) (1 is highest, 99 is lowest, 50 is the default) , Save and exit.

Wednesday, 10 June 2015

To get the DFF and KFF deifinition details from back end

Use the below query to get the DFF and KFF definition details from back end

select *
from fnd_descriptive_flexs
where application_table_name='RA_CUSTOMER_TRX_ALL'

select *
from fnd_descr_flex_column_usages
where descriptive_flexfield_name='RA_INTERFACE_HEADER'
and application_column_name='INTERFACE_HEADER_ATTRIBUTE1'

Sunday, 29 March 2015

Overview of Procure to Pay Cycle

Overview of Procure to Pay Cycle

Procure to Pay cycle in Oracle is the cycle which is concerned with the cycle of procurement of raw materials, parts and products which the the business needs to manufacture its end products. Procure to Pay cycle is concerned with the procurement of the raw materials from suppliers to prepare the finished goods to the step of payment to the supplier for the goods purchased. The procure to Pay cycle like the Order to Cash one has certain steps involved.

Create Purchase Requisition
Create Purchase Order
Receive the PO
Enter Invoice
Pay

1. Purchase Requisition
     
     The first step in initiating the purchase of goods is the creation of a purchase requisition. A purchase requisition is a formal requisition to buy something. Purchase requisition represents a demand for a good in the business
Purchase Requisition represents demand for materials either through Work in Progress,Inventory , Materials requirement planning or Order Management.


A requisition might be internal or external
Internal Requisition : An internal requisition is generally prepared in case of inter organization transfer

Purchase Requisition: A purchase requisition is generally created when the business needs to procure materials from external sources ie its suppliers to fulfill the requirements raised by Inventory,Work in Progress, Materials Requirement Planning or Order Management
In simple terms we can say that a requisition refers to a purchase request initiated by the various department people when the business has certain material requirements


Impact on tables and important columns:

PO_REQUISITION_HEADERS_ALL
Important Columns: -
  REQUISITION_HEADER_ID à Primary Key 
  SEGMENT1                              à Requisition Number
  AUTHORIZATION_STATUS à Requisition Status ( After Approval the status
                                                          Will be ‘APPROVED’. ) 
PO_REQUISITION_LINES_ALL
  Important Columns: -
  REQUISITION_LINE_ID à Primary Key 
  ITEM_ID
  UNIT_PRICE                       à Unit Price of the Item
  QUANTITY                           à Required Quantity

PO_REQ_DISTRIBUTIONS_ALL
      Important Columns: -
      DISTRIBUTION_ID              à Primary Key
      CODE_COMBINATION_ID à Unique identifier for the General Ledger charge account

2. Purchase Order

     After the purchase requisition has been created and approved , the next step is the creation of purchase order.

The purchase order is the document having details of the materials which need to be procured, supplier details, this document is shared with the supplier in order to procure the required materials.
When a PO is created in the system the status of the PO is generally incomplete, before we can progress with the PO the PO needs to be approved by the approvers setup in the system so that it can be sent across to the suppliers and then received. 

Depending on the business Requirements, a purchase order can be of different types:

1] Standard: Create standard purchase orders for one-time purchases of various items. You create standard purchase orders when you know the details of the goods or services you require, estimated costs, quantities, delivery schedules, and accounting distributions.

2] Blanket: Create blanket purchase agreements when you know the detail of the goods or services you plan to buy from a specific supplier in a period, but you do not yet know the detail of your delivery schedules.

3] Contract: Create contract purchase agreements with your suppliers to agree on specific terms and conditions without indicating the goods and services that you will be purchasing.
4] Planned: A planned purchase order is a long-term agreement committing to buy items or services from a single source. You must specify tentative delivery schedules and all details for goods or services that you want to buy, including charge account, quantities, and estimated cost.


Impact on tables and important columns:     
1. PO_HEADERS_ALL
Important Columns: -
PO_HEADER_ID à Primary Key. 
SEGMENT1          à Purchase Order Number.
AUTHORIZATION_STATUS à PO Status (After Approval the status
                                                          will be ‘APPROVED’. ) 
 2. PO_LINES_ALL
Important Columns: -
PO_LINE_ID   à Primary Key. 
ITEM_ID          à Inventory Item ID.
QUANTITY     à Quantity Ordered on the line.
UNIT_PRICE   à Item Unit Price.                  

 3. PO_LINE_LOCATIONS_ALL
Important Columns: -
LINE_LOCATION_ID           à Primary Key. 
QUANTITY                            à Inventory Item ID.
SHIP_TO_LOCATION_ID     à Quantity Ordered on the line.

 4. PO_DISTRIBUTIONS_ALL
Important Columns: -
PO_DISTRIBUTION_ID       à Primary Key. 

CODE_COMBINATION_ID  à Unique identifier for the General Ledger charge account

3. Receiving
   After the Purchase Order has been sent across to the supplier the supplier will deliver the goods to the specified warehouse where the task of receiving has to be performed.
When the shipping details of the goods are received by the supplier receipts are created in the system.
The receipt creation and the receiving mechanism can differ based on the Routing mechanism set up in the system. We will discuss the Routing mechanism in the upcoming post.
After the receiving is performed , the onhand for the items are increased in the system and the goods are available to fulfill the business demands.


Impact on tables :
 1. RCV_SHIPMENT_HEADERS
2. RCV_SHIPMENT_LINES        
3. RCV_TRANSACTIONS

4. Invoice
Once the goods have been received the business needs to pay for the procured goods. Payables invoices are created in the system for the Purchase orders to pay off the outstanding amount.
Invoices can be created either individually or through invoice batches
System can setup a recurring invoice creation faciltiy to create invoices at periodic intervals
Invoices can be created electronically via EDI
After the Invoices are created the invoices need to be validated with the purchase order or the the Purchase Receipt to match for the quantity and pricing. Invoices need to be validated before they can be paid off.


 Impact on tables and important columns:
AP_INVOICES_ALL
 Important Columns: -
                      INVOICE_ID              à Primary Key. 
                       INVOICE_NUM         à Invoice number
                       INVOICE_AMOUNT à Invoice amount
                       VENDOR_ID              àSupplier identifier

 2. AP_INVOICE_LINES_ALL
Important Columns: -
INVOICE_ID                                   à Primary Key. 
LINE_NUMBER                             à Inventory Item ID.
LINE_TYPE_LOOKUP_CODE     à Quantity Ordered on the line.
UNIT_PRICE                                   à Item Unit Price.
           
3. AP_INVOICE_DISTRIBUTIONS_ALL
Important Columns: -
INVOICE_ID                                     à Invoice identifier
DISTRIBUTION_LINE_NUMBER  à Distribution number
ACCOUNTING_DATE                     à Accounting date. 
JE_CATEGORY_NAME                   à Inventory Item ID.
DIST_CODE_CMBINATION_ID     à Quantity Ordered on the line.
                      
4. XLA_AE_HEADERS
Important Columns: -
AE_HEADER_ID                              à Invoice identifier
GL_TRANSFER_STATUS_CODE  à Distribution number
ACCOUNTING_DATE                     à Accounting date. 

5. XLA_AE_LINES
Important Columns: -
                      AE_HEADER_ID                              à Accounting entry header ID
                      AE_LINE_NUM                                à Accounting entry Line Number
                      CODE_COMBINATION_ID            à Code Combination ID
                      GL_SL_LINK_ID                              à GL subledger Link ID – Used to establish                                                                                             link with Journal Lines (GL_JE_HEADER                                                                                           and GL_JE_LINES)                                  
                      ENTERED_DR                                  à Entered Dr. Amount     
                      ENTERED_CR                                  à Entered Cr. Amount

5. Payment
Once the invoices have been validated they are eligible for payment. Payments for the invoices can be done individually or payment batch can be created which pay off groups of Invoices.
Invoices can be paid off by a variety of mechanisms including checks, manual payments, wire transfers, EDI payments, bank drafts, and electronic funds transfer.


Impact on tables:
New IBY tables in R12:
IBY_PAY_SERVICE_REQUESTS  - Payment Process Request information    (11i Terminology is  Payment Batch)
IBY_PAY_INSTRUCTIONS_ALL - Payment Instruction information
IBY_DOC_PAYABLES_ALL - Invoice information stored by IBY for generating payment
IBY_PAYMENTS_ALL - Payment Information

The following tables are used in PPR in R12 . These were used in 11i for payment batches also.
AP_INV_SELECTION_CRITERIA_ALL
AP_SELECTED_INVOICES_ALL

The following AP tables are still in use in R12 to store payment related information.
AP_INVOICE_PAYMENTS_ALL
AP_CHECKS_ALL
AP_PAYMENT_HISTORY_ALL

This is how a Procure to Pay ( P2P) cycle works in Oracle.

Saturday, 12 July 2014

How to restrict the user to enter invoice only though Invoice Batch

Question:
How to stop user to enter invoices directly though invoices window without creating Invoice Batch?

Answer:
Enable profile "AP: Use Invoice Batch Controls"

When this option is enabled, you cannot enter invoices directly in the Invoices window.

Enable this option to enable use of the Invoice Batches window, which you can use to specify batch defaults that help speed and control invoice entry in the Invoice Workbench.

Enabling this option also allows you to specify an invoice batch name to a group of invoice records when you submit Payables Open Interface Import.

Query to find details of Data Definition, Template, File Name of a Concurrent Program

Query to find details of Data Definition, Template, File Name of a Concurrent Program

Background:
For creating XML Publisher Report, we need to create Data Definition whose code should be exactly equal to the Application Short Name of the concurrent program. Then we create Template based on the Data Definition we have created.

Script:
Provide Concurrent Program Short Name, Application Name (Eg. General Ledger) to the following script. It gets Data Definition information & Template information for you.

SELECT XDDV.data_source_code "Data Definition Code",
       XDDV.data_source_name "Data Definition",
       XDDV.description "Data Definition Description",
       XTB.template_code "Template Code",
       XTT.template_name "Template Name",
       XTT.description "Template Description",
       XTB.template_type_code "Type",
       XL.file_name "File Name",
       XTB.default_output_type "Default Output Type"
  FROM apps.XDO_DS_DEFINITIONS_VL XDDV,
       apps.XDO_TEMPLATES_B XTB,
       apps.XDO_TEMPLATES_TL XTT,
       apps.XDO_LOBS XL,
       apps.FND_APPLICATION_TL FAT,
       apps.FND_APPLICATION FA
 WHERE      XDDV.data_source_code = '&CP_Short_Name'
       AND FAT.application_name = '&Application_Name'
       AND XDDV.application_short_name = FA.application_short_name
       AND FAT.application_id = FA.application_id
       AND XTB.application_short_name = XDDV.application_short_name
       AND XDDV.data_source_code = XTB.data_source_code
       AND XTT.template_code = XTB.template_code
       AND XL.lob_code = XTB.template_code    
       AND XL.xdo_file_type = XTB.template_type_code;