Thursday 2 January 2020

1404: Please first load this entity or check protect and custom level of MESSAGE 'POC_APPR/ACC_APPR_ACCEPT'.

1404: Please first load this entity or check protect and custom level of MESSAGE 'POC_APPR/ACC_APPR_ACCEPT'.


Solution;

From the menu in Workflow Builder, choose Help > About Oracle Workflow Builder 2.6.
Change the Access Level to 0 and select allow modifications of customized objects.
Hope it helps,

index Table Type in PLSQL


DECLARE

  TYPE TABLENAMETYPE IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;

  L_TABLENAMETYPE TABLENAMETYPE;

BEGIN

  --YOU CAN USE THIS L_TABLENAMETYPE TYPE HERE

  L_TABLENAMETYPE(1) := 'AB';

  L_TABLENAMETYPE(2) := 'ABC';

  L_TABLENAMETYPE(3) := 'ABD';

  L_TABLENAMETYPE(4) := 'ABE';

  FOR LDX IN 1 .. L_TABLENAMETYPE.COUNT
 
   LOOP
 
    DBMS_OUTPUT.PUT_LINE(L_TABLENAMETYPE(LDX));
 
  END LOOP;

  ---DELETE ALL VALUES

  L_TABLENAMETYPE.DELETE;

END;

--RESULT

AB

ABC

ABD

ABE

---USE TABLE TYPE WITH BULK COLLECT INTO

DECLARE

CURSOR C IS

  SELECT * FROM EMP;

TYPE ANY_TABLE_TYPE IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER;

EMP_REC ANY_TABLE_TYPE;

BEGIN

  OPEN C;

  FETCH C BULK COLLECT
 
    INTO EMP_REC;

  CLOSE C;

  FORALL I IN EMP_REC.FIRST .. EMP_REC.LAST
 
    UPDATE EMP
   
       SET COMM = EMP_REC(I).SAL * 10 / 100
   
     WHERE EMPNO = EMP_REC(I).EMPNO;

  COMMIT;

END;




Perform Dynamic DLL in Oracle


EXECUTE IMMEDIATE statement can be used to execute dynamic SQL statements.

Syntax: EXECUTE IMMEDIATE 'User_Code';

--
-- Create/Drop Table using this PLSQL Script or Procedure
-- DLL Script
-- by mfaisal 02-Jan-2020

Declare
---Create
begin
  execute immediate 'CREATE TABLE X_DDL_ON_APPS (APPS_ID NUMBER)';
end;


Declare
--Drop with Oracle EBS Package
begin
  system.ad_apps_private.do_apps_ddl(schema_name => 'APPS',
                                     ddl_text => 'DROP TABLE X_DDL_ON_APPS ');
end;


Thursday 26 December 2019

Backup of all Oracle Database objects on Server with Procedure



----Backup With Procedure

---Create Directory
CREATE OR REPLACE DIRECTORY PS_DIR AS '/u01/oracle/PROD/fs2/EBSapps/appl/au/12.0.0/forms/BackUp';


---Create Procedure
  
   CREATE OR REPLACE PROCEDURE    EXPORT_DDL
AS
    V_DDL_CLOB  CLOB;
    VPATH VARCHAR2(255);
BEGIN
    FOR C IN (SELECT OBJECT_NAME, OBJECT_TYPE
             FROM USER_OBJECTS
             WHERE OBJECT_TYPE IN ('TABLE','VIEW','FUNCTION','PROCEDURE','PACKAGE','PACKAGE_BODY')
             and OBJECT_NAME like '%TGC%')
    LOOP
        V_DDL_CLOB := DBMS_METADATA.GET_DDL(C.OBJECT_TYPE, C.OBJECT_NAME);
        DBMS_XSLPROCESSOR.CLOB2FILE(V_DDL_CLOB, 'PS_DIR', C.OBJECT_TYPE || '_' || C.OBJECT_NAME||'.SQL');
    END LOOP;
END;



--- Call procedure

Exec EXPORT_DDL;

Tuesday 17 December 2019

Compile Oracle form scripts

For single form

frmcmp_batch userid=apps/apps module=/opt/oracle/fs1/EBSapps/appl/au/12.0.0/forms/US/Form.fmb output_file=/opt/oracle/fs1/EBSapps/appl/fnd/12.0.0/forms/US/Form.fmx module_type=form batch=no compile_all=yes



For all forms/Lib

Copy following code and paste in notepad and save as Compile.cmd

@ECHO OFF 
cls 
Echo compiling libraries 10g .... 
for %%f IN (*.pll) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=library compile_all=yes window_state=minimize 
ECHO libraries compilation complete
ECHO ----------------------------------
Echo compiling menus 10g .... 
for %%f IN (*.mmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize 
ECHO menus compilation complete
ECHO ----------------------------------
Echo compiling forms 10g .... 
for %%f IN (*.fmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=form compile_all=yes window_state=minimize 
ECHO form compilation complete
ECHO ----------------------------------
ECHO Form Compilation complete

Monday 16 December 2019

Get the Password of a User In EBS

CREATE OR REPLACE PACKAGE get_pwd
AS
   FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
      RETURN VARCHAR2;
END get_pwd;
/
--Package Body
CREATE OR REPLACE PACKAGE BODY get_pwd
AS
   FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
      RETURN VARCHAR2
   AS
      LANGUAGE JAVA
      NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
END get_pwd;
/
--Query to execute
SELECT usr.user_name,
       get_pwd.decrypt
          ((SELECT (SELECT get_pwd.decrypt
                              (fnd_web_sec.get_guest_username_pwd,
                               usertable.encrypted_foundation_password
                              )
                      FROM DUAL) AS apps_password
              FROM fnd_user usertable
             WHERE usertable.user_name =
                      (SELECT SUBSTR
                                  (fnd_web_sec.get_guest_username_pwd,
                                   1,
                                     INSTR
                                          (fnd_web_sec.get_guest_username_pwd,
                                           '/'
                                          )
                                   - 1
                                  )
                         FROM DUAL)),
           usr.encrypted_user_password
          ) PASSWORD
  FROM fnd_user usr
 WHERE usr.user_name = '&USER_NAME';

Tuesday 10 December 2019

Internal Concurrent Manager status could not be determined.

To resolve this, do the following steps.

1. Make sure that there are no concurrent processes still running. ps -ef | grep FNDLIBR
2. Use sqlplus, login as APPLSYS
3. delete  from fnd_concurrent_processes;
   Don't panic if it deletes a lot of rows this table holds a lot of useless history information and should be cleaned up every so often.
4. update fnd_concurrent_queues set running_processes=0;

Now restart your concurrent managers, which should start up without any errors in the log file at all.
Then see if the requests go through OK.

OADBTransactionImpl in Oracle Application Framework (OAF)

OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...