Saturday, November 21, 2015

Expense Reports Approval Query

The query to show the employee approval limits are as follows:

SELECT b.full_name, a.cost_center, a.org_id, c.NAME org_name, a.signing_limit
FROM ap_web_signing_limits_all a,
per_all_people_f b,
hr_organization_units c
WHERE a.employee_id = b.person_id
AND a.org_id = c.organization_id
AND b.effective_start_date = (SELECT MAX (effective_start_date)
FROM apps.per_all_people_f
WHERE person_id = b.person_id)
AND a.document_type = ‘APEXP’

Navigation
Payables Manager -> Employees -> Signing Limits

Movement Statistics Report Shows Commodity Code As Blank

Log a service request to get assistance. The following SQL might help identify the cause of the issue.



STEPS
1. Navigate to Inventory > reports > transactions > run
2. Run movement statistics report (Standard report: Movement Statistics Report - INVSTMVT.rdf)
* Choose options including "Movement Type = Dispatch".
* Report Title:   Dispatch Movement Statistics Summary
3. Review output -- See commodity code column is blank

 

1) Confirm the category set id from Movement Parameter form:
select category_set_id
from mtl_stat_type_usages
where legal_entity_id = &legal_entity_id
and zone_code = 'EC'
and usage_type = 'INTERNAL'
and stat_type = 'INTRASTAT';

2) Find out category_id for the specific movement id

This is to find out if there is commodity code defined for the transaction item.
SELECT  sic.category_id
FROM  MTL_SYSTEM_ITEMS si  , MTL_ITEM_CATEGORIES sic
WHERE si.inventory_item_id = sic.inventory_item_id
AND si.organization_id = sic.organization_id
AND si.inventory_item_id = &inventory_item_id
AND si.organization_id = &organization_id
AND sic.category_set_id = &CategorysetidFromSQL1;

3) Find out commodity code :
SELECT substrb(mkv.concatenated_segments,1,230) , substrb(mic.description,1,230)
FROM MTL_CATEGORIES mic , MTL_CATEGORIES_KFV mkv
WHERE mic.category_id = mkv.category_id
AND mic.category_id = &CategoryIDFromSQL2;

Thursday, November 12, 2015

R12 Expense Report Tables



All initial transactions will be in "ap_credit_card_trxns_all" before we submit the IE reports

​Table Name
​Description
AP_CREDIT_CARD_TRXNS_ALL
​Table to store the corporate credit card transactions that are sent by the banks. These lines are saved as expense lines when the user creates the expense lines for credit cards
AP_EXPENSE_REPORT_HEADERS_ALL
​Expense report header information
AP_EXPENSE_REPORT_LINES_ALL
​Expense report lines information
AP_EXP_REPORT_DISTS_ALL
​Expense report distribution information. It contains the accounts against each expense report line.

Wednesday, October 7, 2015

API to Update Party Name (HZ_PARTIES)


DECLARE
   l_person_rec_type     hz_party_v2pub.person_rec_type;
   l_party_rec           hz_party_v2pub.party_rec_type;
   l_party_obj_version   NUMBER                         := 1;
   x_profile_id          NUMBER;
   x_return_status       VARCHAR2 (1);
   x_msg_count           NUMBER;
   x_msg_data            VARCHAR2 (4000);
BEGIN
   l_party_rec.party_id := 1154460;
   l_party_rec.status := 'A';
   l_person_rec_type.person_first_name := 'Sam';
   l_person_rec_type.person_last_name := 'Ku';
   l_person_rec_type.party_rec := l_party_rec;
   hz_party_v2pub.update_person
                       (p_init_msg_list                    => fnd_api.g_true,
                        p_person_rec                       => l_person_rec_type,
                        p_party_object_version_number      => l_party_obj_version,
                        x_profile_id                       => x_profile_id,
                        x_return_status                    => x_return_status,
                        x_msg_count                        => x_msg_count,
                        x_msg_data                         => x_msg_data
                       );
   DBMS_OUTPUT.put_line ('API Status: ' || x_return_status);

   IF (x_return_status <> 'S')
   THEN
      DBMS_OUTPUT.put_line ('ERROR :' || x_msg_data);
   END IF;

   DBMS_OUTPUT.put_line ('update_person is completed');
--COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Error::::' || SQLERRM);
      ROLLBACK;
END;

Tuesday, September 29, 2015

SEPA Error "Payment profile on document is not compatible with payment format on document"

SEPA Error "Payment profile on document is not compatible with payment format on document"

1) Verify the Format used in 'Payment Process Profile' (PPP):
Navigation: Payables Manager -> Setup:Payment -> Payment Administrator -> Payment Process Profile
Query the Payment Process Profile that you using.
Go to the  'Payment Instruction Format' tab
Take note of the value in 'Payment Instruction Format' field

2) Verify the Format used in Payment Document.
Navigation: Payables Manager -> Setup:Payment -> Bank Accounts
Query and Select the Bank Account
Select the Payment Document ->  Manage Payment Documents
Take note of the value in 'Format' field

3) Verify if the Supplier have a specified format:
Navigation: Payables Manager -> Suppliers -> Inquiry
Pull up the Supplier and click Update
Click on 'Payment Details'
Click Update for the Site in question
Click on the 'Payment Specifications' tab
Take note of the value in 'Payee-specified Payment Format' field
You may clear this value if it's not mandatory for your Supplier.

Saturday, September 26, 2015

How We Can Inactivate a Party In Customer Screen



you cannot do this within Oracle Receivables. However, you can use responsibility Customers Online Data Librarian Super User.
  1. Responsibility: Receivables Manager
    Navigation: Customers > Customers
  2. Search for any “Active” Organization Party, and note down the Registry Id/Party Number.
  3. Responsibility: Customers Online Data Librarian Super User
    Navigation: Data Quality
    Go to the Party Maintenance tab.
  4. Enter the Registry Id in “Registry Id” field that was noted in step 2 and click “Go”.
  5. In search results table, “Status” drop down column will display with current status of the party
    (as per step 2, it should be “Active”).
  6. Change the status drop down to “Inactive” and click “Save”.
  7. Responsibility: Receivables Manager
    Navigation: Customers > Customers
  8. Search for “Active” Organization that was searched in step 2. It will not show any records.
  9. Search for "Inactive" Organization and this time you should see the party
 
  1. a) Use the responsibility ORACLE CUSTOMERS ONLINE DATA LIBRARIAN and find the party and inactivate from that responsibility

    Login into Oracle Data Librarian -> Data Quality Tab -> Party Maintenance Tab.

    b) Use the API HZ_PARTY_V2PUB.update_person or HZ_PARTY_V2PUB.update_organization and set the status of the particular party to Inactive.

Thursday, August 27, 2015

How to join Projects and Customers tables

SELECT proj.segment1 project#, proj.NAME proj_name,
       hc.account_number customer_account_number#
  FROM pa_projects_all proj, pa_project_customers pc, hz_cust_accounts hc
 WHERE 1 = 1
   AND proj.project_id = pc.project_id
   AND pc.customer_id = hc.cust_account_id

Friday, August 21, 2015

Query to check before Disabling any Accounts in oracle

Below Query will help to see if any transactions are in process/pending if we cant to disable any accounts in oracle  

SELECT *
  FROM xla_ae_headers xah, xla_ae_lines xal
 WHERE 1 = 1
   AND xal.ae_header_id = xah.ae_header_id
   AND xah.gl_transfer_status_code = 'N'
   AND xal.code_combination_id IN (
          SELECT code_combination_id
            FROM gl_code_combinations_kfv
           WHERE segment3 IN
                    (500101,
                     500111,
                     800161,
                     800201,
                     850101,
                     850121,
                     850141,
                     850161,
                     850231
                    ))

Thursday, August 20, 2015

Why Do Receipts Exist Without Receipt Lines/Transactions?



Why Do Receipts Exist Without Receipt Lines/Transactions?

Issue
Why do Receipt Numbers (rcv_shipment_headers records) exist when there are no Receipt Lines (rcv_shipment_lines) or Transactions (rcv_transactions) associated with the Receipt Number?

Solution
It is correct functionality that Receipt Numbers can be Saved without corresponding Receipt Lines.  The existence of Receipt Numbers (Receipt Headers) without Receipt Lines does not cause any problems so those Receipts Numbers can be ignored or can be utilized for Add To Receipt functionality for adding to the receipt at later time.

--------------------------------------------------------------------------------------------
Records in rcv_shipment_headers may exist without a corresponding rcv_shipment_lines record when transactions were processed using Receiving Open Interface functionality (including iSupplier Portal for creation of ASNs, receiving data populated via EDI and 3rd Party software). Also, when using RCV: Processing Mode=Immediate (or Batch), Receipt Header (rcv_shipment_headers) is saved before Receiving Transaction Processor processes the transaction; so, if the transaction fails (or does not process at all), rcv_shipment_headers record will exist without corresponding rcv_shipment_lines records. By design, Oracle software does not delete Receipt Headers that are created when using RCV: Processing Mode=Immediate (or Batch.)
--------------------------------------------------------------------------------------------

The following steps can be used to created Receipt Headers without Receipt lines using RCV: Processing Mode=On-line:

    Purchasing Responsibility (or equivalent) > Receiving > Receipts
    Query using any criteria
    Select a line then deselect the line (or skip this Step and proceed to Step 4)
    Click on Receipt Header window
    Save


Please note that Receipt Headers (with or without associated Receipt Lines) can be used for subsequent transactions by choosing (Add to Receipt).

If you would like you can use below data fix

Datafix for Orphan Receipt or Shipment Headers (rcv_shipment_headers)

Identification script:
select *
from   rcv_shipment_headers rsh
where  receipt_source_code in ('VENDOR','CUSTOMER')
and trunc(creation_date) like '%AUG-15%'
and    not exists
           (select 1
            from   rcv_shipment_lines rsl
            where  rsl.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions rt
            where rt.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions_interface rti
            where  rti.shipment_header_id = rsh.shipment_header_id
            and    (rti.processing_status_code in ('RUNNING','PENDING')
                    or
                    nvl(rti.validation_flag,'N') = 'N' ));

Datafix:
create table orphan_rsh_bk as
select *
from   rcv_shipment_headers rsh
where  receipt_source_code in ('VENDOR','CUSTOMER')
and trunc(creation_date) like '%AUG-15%'
and    not exists
           (select 1
            from   rcv_shipment_lines rsl
            where  rsl.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions rt
            where rt.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions_interface rti
            where  rti.shipment_header_id = rsh.shipment_header_id
            and    (rti.processing_status_code in ('RUNNING','PENDING')
                    or
                    nvl(rti.validation_flag,'N') = 'N' ));


delete from  rcv_shipment_headers rsh
where  receipt_source_code in ('VENDOR','CUSTOMER')
and trunc(creation_date) like '%AUG-15%'
and    not exists
           (select 1
            from   rcv_shipment_lines rsl
            where  rsl.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions rt
            where rt.shipment_header_id = rsh.shipment_header_id)
and    not exists
           (select 1
            from rcv_transactions_interface rti
            where  rti.shipment_header_id = rsh.shipment_header_id
            and    (rti.processing_status_code in ('RUNNING','PENDING')
                    or
                    nvl(rti.validation_flag,'N') = 'N' ));

Wednesday, August 5, 2015

Order is not eligible for booking. Check workflow status for this order.

If Sales Order is not able to book and if you see below Error

Order is not eligible for booking. Check workflow status for this order.

Then execute below script the order can be booked

DECLARE
   v_headerid   NUMBER;

   CURSOR cr
   IS
      SELECT oeh.header_id
        FROM oe_order_headers_all oeh
       WHERE oeh.order_number = '791137';                        --order in issue

   l_org_id     NUMBER := 204;                                        --OU ID get org id form above
BEGIN
   mo_global.set_policy_context ('S', l_org_id);

   FOR rs IN cr
   LOOP
      v_headerid := rs.header_id;
      apps.wf_engine.startprocess ('OEOH', TO_CHAR (v_headerid));
   END LOOP;
END;

Friday, July 24, 2015

R12 Oracle Apps Login Page and Logo Hints

R12 Login Page: How to Personalize the Logo ? (Doc ID 849752.1)

Tips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) (Doc ID 741459.1)
Note 174219.1 - How To Change The Logo In The Oracle Application Menu
Note 849752.1 - R12 Login Page: How to Personalize the Logo ?
Note 741459.1 - Tips For Personalizing The E-Business Suite r12 Login Page (MainLoginPG)
Note 602995.1 - How To Change The Standard Oracle Logo in R12 Forms
Note 551795.1 - How to change the default branding on the homepage which shown as "E-Business Suite" ?
Note 421636.1 - How to replace the default Oracle Logo with a Customized Logo?
Note: 210670.1 - How To Change Look And Feel and Colors Of Oracle Applications 11.5


Note: 759551.1 - After Upgrading From 11i to R12 Custom Forms Show Blue Text Fields
R12: Font And Links Have Changed After Patching (Doc ID 1348791.1)

Look And Feel Of Self Service EBS Application Has Changed Since Upgrade To R12 And Patching (Doc ID 1595057.1)
R12: Font And Links Have Changed After Patching (Doc ID 1348791.1)
Look And Feel Of Self Service Pages Are Messed After R12 Upgrade (Doc ID 1556590.1)

NOTE:391554.1 - Oracle Application Framework Documentation Resources, Release 12
NOTE:473539.1 - How to Replace the Globe and People Images of the Release 12 Login Page
NOTE:849752.1 - R12 Login Page: How to Personalize the Logo ?
NOTE:315865.1 - How To Remove The Oracle Privacy Statement Link From SSHR Page in OA Framework 11.5.10 ?
NOTE:1272885.1 - How to Hide the Privacy Statement and Copyright Statement from iRecruitment External Candidate Pages
NOTE:1066683.1 - Entering custom text with html code on login page

NOTE:357458.1 - How to Change the Privacy Statement URL to a Custom URL in iRecruitment

NOTE:468971.1 - Tips For Personalizing The E-Business Suite 11i & 12i Login Page (AppsLocalLogin)
NOTE:344204.1 - How to use XMLImporter/XMLExporter to import/export personalization
NOTE:436092.1 - Privacy Statement is not Hidden in iRecruitment Visitor Home Page even though Personalization has been Created
NOTE:579917.1 - How to Personalize Login page in R12?

R12 - Application font, colour, feel and looks Issues after applying patch

Look And Feel Of Self Service EBS Application Has Changed Since Upgrade To R12 And Patching (Doc ID 1595057.1)
R12: Font And Links Have Changed After Patching (Doc ID 1348791.1)
Look And Feel Of Self Service Pages Are Messed After R12 Upgrade (Doc ID 1556590.1)


 Solution:
++ Remove the files from the following directories
      $OA_HTML/cabo/images/cache/*
      $OA_HTML/cabo/styles/cache/*
++ Re-start the application(adstrtal.sh)
++ Delete the cache from browner and retry the Application URL

>> If you still have the problem

++ Remove the files from the following directories
      $OA_HTML/cabo/images/cache/*
      $OA_HTML/cabo/styles/cache/*
++ perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile -p 6 -log /tmp/ojspCompile.log --flush

Wednesday, July 22, 2015

How to find out the query fetching the serial numbers in th LOV using the trace file o/p

How to find out the query fetching the serial numbers in th LOV using the trace file o/p

Use the following steps to enable trace.
 a. Navigate to the point in the application right before you are
 experiencing the problem.
 b. Turn trace on by:
  Help > Diagnostics > Trace > Trace with Binds and Waits
 c. Duplicate the issue and then stop immediately afterwards.
 d.  Retrieve trace file from the user_dump_dest, which can be located as
 follows:
  select value from V$PARAMETER where name like 'user%';

 e. In the raw trace file ,search for the table 'Mtl_serial_numbers'
This will you take you to the query used in the LOV to fetch those serial numbers.

Tuesday, July 14, 2015

iRecruitment Internal Vacancies/Jobs SQL Query


SELECT pav.NAME, ipc.org_name, ipc.job_title, pgt.NAME,
       ipc.posting_content_id, pav.status, pav.date_from, pav.date_to,
       hl.location_code, pav.attribute19,
       REPLACE (regexp_replace (ipc.brief_description, '<[^<>]*>', ''),
                ' ',
                ''
               ) brief_description,
       REPLACE
             (regexp_replace (ipc.detailed_description, '<[^<>]*>', ''),
              ' ',
              ''
             ) detailed_description,
       REPLACE (regexp_replace (ipc.job_requirements, '<[^<>]*>', ''),
                ' ',
                ''
               ) job_requirements,
       REPLACE (regexp_replace (ipc.additional_details, '<[^<>]*>', ''),
                ' ',
                ''
               ) additional_details,
       REPLACE (regexp_replace (ipc.how_to_apply, '<[^<>]*>', ''),
                ' ',
                ''
               ) how_to_apply
  FROM irc_posting_contents_tl ipc,
       per_all_vacancies pav,
       hr_locations_all hl,
       per_grades_tl pgt,
       per_recruitment_activities pra
 WHERE 1 = 1
   AND pav.primary_posting_id = ipc.posting_content_id
   AND ipc.posting_content_id = pra.posting_content_id
   AND ipc.LANGUAGE = 'US'
   AND pav.location_id = hl.location_id
   AND pav.grade_id = pgt.grade_id
   AND pgt.LANGUAGE = 'US'
   AND pra.recruiting_site_id = 1
   AND pav.status NOT IN ('CLOSED', 'CNCL', 'HOLD')
   AND job_title IS NOT NULL;