Monday 22 February 2016

Oracle Payments overview

Oracle Payments overview

  • Oracle Payments is a product in the Oracle EBS, which serves as a funds capture and funds disbursement engine for other products in the Oracle EBS.
    • Funds capture refers to the electronic retrieval of funds, typically by a payment system on behalf of the deploying company, from payers, such as customers, who owe debts to the deploying company. The payer, in this case, provides Oracle Payments with pertinent payment information, such as a credit card, debit card, or bank account number.   
    • Funds disbursement, on the other hand, is the process of paying funds owed to creditors, such as suppliers.
  • Oracle Payments provides the infrastructure needed to connect oracle applications and others with third party payment systems and financial institutions for fund capture and fund disbursement.
  • With the centralization of payment processing in Oracle Payments, Companies can efficiently centralize the payment process across multiple organizations, currencies, and regions. Better working capital management can be achieved by providing cash managers visibility into cash inflows and outflows. Additionally, a full audit trail and control is supported through a single point of payment administration.
  • Oracle Payments supports the following types of electronic payments for funds capture payments – Credit Cards, Purchase Cards, PINless debit cards, bank account transfers.
  • Oracle Payments supports several payment methods for funds disbursement payments, including – checks, wires, electronic fund transfers.


Saturday 13 February 2016

Script to launch Workflow process



declare
   v_itemtype   VARCHAR2(50);
   v_itemkey    VARCHAR2(50);
   v_process    VARCHAR2(50);
   v_userkey    VARCHAR2(50);
begin

v_itemtype := 'DEMOIT'; 
v_itemkey := '1233';
v_userkey := '1233';
v_process := 'DEMOPROCESS';
WF_ENGINE.Threshold := -1;
WF_ENGINE.CREATEPROCESS(v_itemtype, v_itemkey, v_process);
wf_engine.setitemuserkey(v_itemtype, v_itemkey, v_userkey );
wf_engine.setitemowner (v_itemtype, v_itemkey,'SYSADMIN');
WF_ENGINE.STARTPROCESS(v_itemtype, v_itemkey);
commit;
exception when others
then
  dbms_output.put_line(SQLERRM);
end;

Script to submit Workflow background request



DECLARE

l_user_name VARCHAR2(240) := 'SYSADMIN';
l_resp_name VARCHAR2(240) := 'System Administrator';

l_user_id       NUMBER;
l_resp_id       NUMBER;
l_resp_appl_id  NUMBER;

l_request_id NUMBER;
BEGIN
-- Apps Initialization
   SELECT    user_id
    INTO l_user_id
   FROM fnd_user
   WHERE user_name =l_user_name;

   SELECT  b.RESPONSIBILITY_ID,b.APPLICATION_ID
      INTO l_resp_id,l_resp_appl_id
    FROM fnd_responsibility_tl tl, fnd_responsibility b
    WHERE tl.responsibility_name = l_resp_name
      AND LANGUAGE=UserEnv('LANG')
      AND tl.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID;

  fnd_global.apps_initialize
    ( user_id => l_user_id
     ,resp_id => l_resp_id
     ,resp_appl_id => l_resp_appl_id
    );
--
l_request_id := FND_request.submit_request(application => 'FND',  -- Application Object Library
                           program     => 'FNDWFBG',   -- Workflow Background Process
                           description =>  NULL,
                    start_time  =>  NULL,
                    sub_request =>  FALSE,
                           argument1  =>  null, -- Item Type
                           argument2  =>   null, --  Minimum Threshold
                           argument3  =>  NULL, --Maximum Threshold
                           argument4  =>   'Y' ,  --Process Deferred
                           argument5  =>   'N', -- Process Timeout
                           argument6  =>   NULL -- Process Stuck
                           );

                           IF l_request_id> 0 THEN
                            Dbms_Output.put_line(l_request_id);
                            commit;
                           END IF;

END;

Script to compile Invalid objects



Generic Script:

DECLARE
    l_stmt   VARCHAR2 (2000);

    CURSOR c_invalid IS
          SELECT *
            FROM all_objects
           WHERE     1 = 1
                 AND object_name LIKE 'XX%'
                 AND STATUS = 'INVALID'
                 AND OWNER = 'APPS'
        --AND OBJECT_TYPE='PACKAGE BODY'
        ORDER BY DECODE (OBJECT_TYPE,
                         'VIEW', 1,
                         'PACKAGE', 2,
                         'PACKAGE BODY', 3,
                         4);
BEGIN
    FOR c_rec IN c_invalid
    LOOP
        BEGIN
            IF c_rec.object_type = 'VIEW'
            THEN
                l_stmt := 'ALTER VIEW ' || c_rec.object_name || ' COMPILE ';
            ELSIF c_rec.object_type = 'PACKAGE'
            THEN
                l_stmt :=
                    'ALTER PACKAGE ' || c_rec.object_name || ' COMPILE ';
            ELSIF c_rec.object_type = 'PACKAGE BODY'
            THEN
                l_stmt :=
                    'ALTER PACKAGE ' || c_rec.object_name || ' COMPILE BODY';
            ELSE
                  l_stmt :=
                    'ALTER ' || c_rec.object_type|| '  ' || c_rec.object_name || ' COMPILE';                   
            END IF;

            EXECUTE IMMEDIATE l_stmt;
        EXCEPTION
            WHEN OTHERS
            THEN
                NULL;
        END;
    END LOOP;
END;
/
---------------------------------------------------------

declare
CURSOR c_invalid
is
SELECT object_name
FROM user_objects
WHERE object_NAME LIKE 'OKC\_%' ESCAPE '\'
AND status <> 'VALID'
AND  object_type='SYNONYM';
BEGIN
 FOR c_rec IN  c_invalid
  LOOP
    BEGIN
        EXECUTE IMMEDIATE 'Alter SYNONYM '||c_rec.object_name||' Compile';
    exception
    WHEN OTHERS THEN
     Dbms_Output.put_line(SQLERRM ||'  ' ||c_rec.object_name);
    END;
  END LOOP;
END;
/

declare
CURSOR c_invalid
is
SELECT object_name FROM user_objects
WHERE object_NAME LIKE 'OKC%'
AND status <>'VALID'
AND  object_type='VIEW';
BEGIN
 FOR c_rec IN  c_invalid
  LOOP
    BEGIN
        EXECUTE IMMEDIATE 'Alter VIEW '||c_rec.object_name||' Compile';
    exception
    WHEN OTHERS THEN
     Dbms_Output.put_line(SQLERRM ||'  ' ||c_rec.object_name);
    END;
  END LOOP;
END;
/



declare
CURSOR c_invalid
is
SELECT object_name FROM user_objects
WHERE object_NAME LIKE 'OKC%'
AND status <>'VALID'
AND  object_type='PACKAGE';
BEGIN
 FOR c_rec IN  c_invalid
  LOOP
    BEGIN
        EXECUTE IMMEDIATE 'Alter package '||c_rec.object_name||' Compile';
    exception
    WHEN OTHERS THEN
     Dbms_Output.put_line(SQLERRM ||'  ' ||c_rec.object_name);
    END;
  END LOOP;
END;
/


declare
CURSOR c_invalid
is
SELECT object_name FROM user_objects
WHERE object_NAME LIKE 'OKC%'
AND status <>'VALID'
AND  object_type='PACKAGE BODY';
BEGIN
 FOR c_rec IN  c_invalid
  LOOP
    BEGIN
        EXECUTE IMMEDIATE 'Alter package '||c_rec.object_name||' Compile Body';
    exception
    WHEN OTHERS THEN
     Dbms_Output.put_line(SQLERRM ||'  ' ||c_rec.object_name);
    END;
  END LOOP;
END;
/




OAF Personalization profiles



To personalize a page or region, set the following profiles to YES at appropriate level:

Personalize Self-Service Defn
FND: Personalization Region Link Enabled

Enabling FND logging and getting FND log messages


Enabling FND logging and getting FND log messages
1. Go to System Administrator --> Profiles--> System.
2. Query for 'FND%LOG%' for the current user.
3. Set FND: Debug Log Enabled - 'YES'
       FND: Debug Log Level - 'Statement'
       FND: Debug Log Module - %

4. Log out and Login Again.

5. Run the following query in the database from the backend.
   select max(log_sequence) from fnd_log_messages;
   Note down the log sequence.
6. Reproduce the problem.
7. Run the following query in the database from the backend.
    select max(log_sequence) from fnd_log_messages;
    Note down the log sequence.
11. Run the following query in the database from the backend.
    select module,message_text from fnd_log_messages where log_sequence
between (sequence obtained in step 5) and (sequence obtained in step 7).

Enabling XDO logging in EBS in 12.1.3


Introduction:
Some times ORACLE support team asks to get XDO logs to trouble sheet problems related to XML Publisher reports or where XDO processing is used. 

Follow below steps to enable XDO logging 

Steps:
a. Connect to the Apache server as applmgr
b. Create an $XDO_TOP/temp and an $XDO_TOP/resource directory
c. Create an xdodebug.cfg file in the $XDO_TOP/resource directory (do not re-create if the file already exists), containing the following 2 lines:
LogLevel=STATEMENT
LogDir=[full XDO_TOP]/temp

d. Restart the Apache server.

Note full full XDO_TOP means complete path

Note: The xdodebug.cfg file can also be created in the $OA_JRE_TOP/jre/lib directory.

Contracts Core tables



Library tables:
OKC_ARTICLES_ALL  --> Stores basic article information
OKC_ARTICLE_VERSION  --> Stores article text along with version

OKC_TERMS_TEMPLATES_ALL  -->Terms template definition
OKC_ALLOWED_TMPL_USAGES --> List of document types for which above template can be used


Authoring tables 
OKC_TEMPLATE_USAGES  --> Template and document association table (Template Id + Document Type (ex: PO, RFQ, BID etc.) + Document Id (ex: Po header id, rfq id, bid id etc..). Template applied on a given document.

OKC_K_ARTICLES_B  --> Stores list of applicable clauses for a given document type and document id.