Oracle applications - Surendranath Subramani: July 2017

Thursday, July 27, 2017

Standard hooks in Oracle Purchasing and Oracle payable module

Date: 27-Jul-2017
Instance Version: 12.1.3
Database: 11.2.0.4

Purpose:

Today we will see what is the purpose of standard hooks and how to use it and available hooks in purchasing and payable module.

What is hook: it use to enable the custom functionality or custom validation in the standard process without modifying the seeded objects.

Advantage: When you apply patch, hooks are not impacted so it is safe to apply patch. When you modify seeded objects, oracle will not support and seeded objects can be easy impacted due to patch.

With no delay we will see what are the hooks available.

PO Module:

Submit Purchase Order: 

PO_CUSTOM_SUBMISSION_CHECK_PVT


AP Module:

Invoice Validation

AP_CUSTOM_INV_VALIDATION_PKG

Internet Expense Report:

AP_WEB_EXPENSE_CUST_WF

This package is called in workflow (APEXP).


Example:

I will show you how to add custom logic while submitting purchase Order.




 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

PACKAGE PO_CUSTOM_SUBMISSION_CHECK_PVT ......

PROCEDURE do_pre_submission_check(
    p_api_version                    IN             NUMBER,
    p_document_id                    IN             NUMBER,
    p_action_requested               IN             VARCHAR2,
    p_document_type                  IN             VARCHAR2,
    p_document_subtype               IN             VARCHAR2,
    p_document_level                 IN             VARCHAR2,
    p_document_level_id              IN             NUMBER,
    p_requested_changes              IN             PO_CHANGES_REC_TYPE,
    p_check_asl                      IN             BOOLEAN,
    p_req_chg_initiator              IN             VARCHAR2,
    p_origin_doc_id                  IN             NUMBER,
    p_online_report_id               IN             NUMBER,
    p_user_id                        IN             NUMBER,
    p_login_id                       IN             NUMBER,
    p_sequence                       IN OUT NOCOPY  NUMBER,
    x_return_status                  OUT NOCOPY     VARCHAR2
  )
  IS
    l_api_name    CONSTANT varchar2(50)  := 'do_pre_submission_check';
    l_api_version CONSTANT NUMBER        := 1.0;
    d_mod         CONSTANT VARCHAR2(100) := d_do_pre_submission_check;
    d_position    NUMBER := 0;
    lv_return_status VARCHAR2(4000);

  BEGIN

    x_return_status := FND_API.G_RET_STS_SUCCESS;
    d_position := 100;
    
    -- Call custom validation
    
    BEGIN
    xx_po_process.validate_po(p_document_id,p_user_id,lv_return_status);
    IF (lv_return_status = 'S' OR lv_return_status IS NULL) THEN
        x_return_status := FND_API.G_RET_STS_SUCCESS;
    ELSE
        x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
        FND_MESSAGE.Set_Name('PO', lv_return_status);
        FND_MSG_PUB.Add;    
    END IF;   
    EXCEPTION WHEN OTHERS THEN
      NULL;
    END;    

  EXCEPTION
    WHEN OTHERS
    THEN
      x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
      IF po_log.d_exc
      THEN
        PO_LOG.exc(d_mod, d_position, SQLCODE || ': ' || SQLERRM);
        PO_LOG.proc_end(d_mod, 'd_position', d_position);
        PO_LOG.proc_end(d_mod, 'x_return_status', x_return_status);
        PO_LOG.proc_end(d_mod);
      END IF;

  END do_pre_submission_check;


Thanks for visiting my blog! Your comments are much appreciated!


Friday, July 14, 2017

How to enable Approval Management Engine (AME) - For Your Information Notification (FYI)

Date: 14-July-2017

Instance version: 12.1.3

Database: 11.2.0.4

In this article we will see how to setup FYI notification using AME.

For this purpose we will take Purchase Requisition approval process.

Step: 1

Configuration Variable:

Change configurable variable to allow FYI
Go to 'Approval management administrator' responsibility, click on configuration variable
Enter Purchase requisition in transaction type and hit GO
Change YES to ‘Allow For Your Information Notification’ variable




Step: 2

Create Rule

Go to 'Approval Management Business Analyst' responsibility, query the transaction type (ie.: Purchase Requisition). 

Define Rule

You will notice the Category now had new value "For Your Information" (earlier it use to be only "Approval").



Step 3:

Add Approval group (which was defined already).

Done will all the setup. Let us know run through a test.

Validation:

Submit requisition and now you will notice FYI group displayed in the approval page.

When the FYI group is invoked the approves in that group will get FYI notification and they do not have to take action.

After FYI group is invoked, the AME will immediately go to next approval group as it is defined in AME.



***** 
Thanks for visiting my blog. 
Please do let me know if you see any issues or i need to make any corrections. 
*******

Friday, July 7, 2017

Oracle EBS: iprocurement - Attribute set for SelectFlag in view object ReceiveReqItemsVO failed

Oracle Version: 12.1.3
Database Version: 11.2.0.4
Date: 07-JUL-2017

Purpose:

Today we will see how to resolve the error message "Attribute set for SelectFlag in view object ReceiveReqItemsVO failed"


After you substitute standard iProcurement VO in the receiving tab you may get the error.

Reason:
SelectFlag translation attribute used in the VO is set to Updatable in the standard VO but when you extended all the attributes will be defaulted to non-updatable.

Edit your extended VO and modify attributes to updatable. That should resolve the problem.







Thanks