Thursday 29 June 2017

Query to get custom Form personalization List

Query :

Select Distinct A.Id,
                A.Form_Name,
                A.Enabled,
                C.User_Form_Name,
                D.Application_Name,
                A.Description,
                Ca.Action_Type,
                Ca.Enabled,
                Ca.Object_Type,
                ca.message_type,
                ca.message_text
  from FND_FORM_CUSTOM_RULES   a,
       FND_FORM                b,
       FND_FORM_TL             c,
       Fnd_Application_Tl      D,
       Fnd_Form_Custom_Actions ca
 where a.form_name = b.form_name
   And B.Form_Id = C.Form_Id
   And B.Application_Id = D.Application_Id
   And A.Enabled = 'Y'
   and a.id = ca.rule_id
   and D.Application_Name = 'Purchasing'
--and A.Form_Name='POXPOVPO'

Tuesday 27 June 2017

Get OAF Page Trace File

1.Click the 'Diagnostics' link in top right of screen



2. From the Diagnostic drop down select 'Set Trace Level' and click 'Go'



3.There will be Six Options In the LOV



4. Select The appropriate option

5. Note down the Trace ID Numbers returned and click 'Save'

6 . Perform The Search/Operation.

7. Select "Disable Trace " after Operation.

8. The trace files should be output to the directory returned by the following query



Thursday 8 June 2017

How to checks the concurrent request states/ Status


A PL/SQL procedure can check the status of a concurrent request by calling.

FND_CONCURENT.GET_REQUEST_STATUS
FND_CONCURRENT.WAIT_FOR_REQUEST

 FND_CONCURRENT.GET_REQUEST_STATUS :
-          This function returns the status of a concurrent request
-          If the request is already computed, it also returns the completion message.
-          This function returns both user friendly (translatable) phase and status values as well as developer phase and status vales that can drive program logic.

Syntax  Function FND_CONCURRENT.GET_REQUEST_STATUS
                   ( request_id in out number,
                   application in varchar2 default null,
                   program in varchar2 default null,
                   phase out varchar2,
                   status out varchar,
                   dev_phase out varchar2,
                   dev_status out varchar2,
                   message out varchar2) return BOOLEAN;

-          when application and program are specified, the request_id of the last request for the specified program should be returned to request_id.
-          Phase, and status values should be taken from

FND_LOOKUPS
dev_phase                                          dev_status
pending                                    normal, standby, scheduled, paused
running                                     normal, waiting, resuming, terminating.
Complete                                  normal, Error, warning, cancelled, terminated
Inactive                                     disabled, on-hold, No-manager, supended

FND_REQUEST.WAIT_FOR_REQUEST :
-          This function waits for request completion, then returns the request phase/status and completion message to the caller.
-          Goes to sleep between checks for request completion.

Syntax FND_CONCURRENT.WAIT_FOR_REQUEST
     ( request_id in number default null,
     interval in number default 60,
     max_wait in numbe default 0,
     phase out varchar2,
     status out varchar2,
dev_phase out varchar2,
dev_status out varchar2,
message out varchar2) return BOOLEN;

 FND_CONCURRENT.SET_COMPLETION_STATUS :
-          this function should be called from a concurrent program to set its completion states.
-          This function returns TRUE on success, other wise FALSE.
Syntax  function 
FND_CONCURRENT.SET_COMPLETION_STATUS
     ( status in varchar2,          message in varchar2) return BOOLEAN;
Normal status  warning message any message Error

Wednesday 7 June 2017

How To Run Concurrent Program From Back end (Psql) and notify to USER

You can Run Concurrent program from backend by using FND_REQUEST.SUBMIT_REQUEST API.
And By using FND_REQUEST.ADD_NOTIFICATION  API You can send notification mail to particular User.

Below given script is used for one of my client place where we want to run concurrent program from backend.

First you have to initialize apps by using API fnd_global.apps_initialize.

script output gives you concurrent program request id. which you can check from front end.

********************************************************
create or replace procedure XXFNDREQPROC   AS
v_request_id number;
v_request_id1 number;
v_request_id2 number;
v_request_id3 number;
v_request_id4 number;
v_request_id5 number;
v_notify_user  boolean;
l_user_id NUMBER:=0;
l_responsibility_id NUMBER:=55550;
l_resp_appl_id NUMBER:=222;
P_ORG_ID NUMBER;
begin
fnd_global.apps_initialize(l_user_id,l_responsibility_id,l_resp_appl_id);
mo_global.init ('S');
v_notify_user := FND_REQUEST.ADD_NOTIFICATION ('USER_NAME');
--v_test:=v_notify_user;
---dbms_output.PUT_LINE('result'||v_notify_user);
--MO_GLOBAL.SET_ORG_CONTEXT(P_ORG_ID,NULL,'AR');
--MO_GLOBAL.SET_POLICY_CONTEXT('S',P_ORG_ID);
v_request_id := fnd_request.submit_request
(application=>'APPLICATION SHORT NAME',
program=>'CONCURRENT PROG SHORT NAME',
description=>NULL,
start_time=>NULL,
sub_request=>FALSE,
argument1=>'PARAMETER1',
argument2=>'PARAMETER2',
argument3=>'PARAMETER3',
argument4=>'PARAMETER4');


commit;
if v_request_id > 0 then
   dbms_output.put_line('Successfully submitted'||V_REQUEST_ID );
 
else
  dbms_output.put_line('Not Submitted'||V_REQUEST_ID );
  end if;
EXCEPTION WHEN OTHERS THEN              
DBMS_OUTPUT.PUT_LINE(SQLCODE||' Error :'||SQLERRM);
END;


*******************************************************

How to checks the request states?


A PL/SQL procedure can check the status of a concurrent request by calling.

FND_CONCURENT.GET_REQUEST_STATUS
FND_CONCURRENT.WAIT_FOR_REQUEST

 FND_CONCURRENT.GET_REQUEST_STATUS :
-          This function returns the status of a concurrent request
-          If the request is already computed, it also returns the completion message.
-          This function returns both user friendly (translatable) phase and status values as well as developer phase and status vales that can drive program logic.

Syntax  Function FND_CONCURRENT.GET_REQUEST_STATUS
                   ( request_id in out number,
                   application in varchar2 default null,
                   program in varchar2 default null,
                   phase out varchar2,
                   status out varchar,
                   dev_phase out varchar2,
                   dev_status out varchar2,
                   message out varchar2) return BOOLEAN;

-          when application and program are specified, the request_id of the last request for the specified program should be returned to request_id.
-          Phase, and status values should be taken from

FND_LOOKUPS
dev_phase                                          dev_status
pending                                    normal, standby, scheduled, paused
running                                     normal, waiting, resuming, terminating.
Complete                                  normal, Error, warning, cancelled, terminated
Inactive                                     disabled, on-hold, No-manager, supended

FND_REQUEST.WAIT_FOR_REQUEST :
-          This function waits for request completion, then returns the request phase/status and completion message to the caller.
-          Goes to sleep between checks for request completion.

Syntax FND_CONCURRENT.WAIT_FOR_REQUEST
     ( request_id in number default null,
     interval in number default 60,
     max_wait in numbe default 0,
     phase out varchar2,
     status out varchar2,
dev_phase out varchar2,
dev_status out varchar2,
message out varchar2) return BOOLEN;

 FND_CONCURRENT.SET_COMPLETION_STATUS :
-          this function should be called from a concurrent program to set its completion states.
-          This function returns TRUE on success, other wise FALSE.
Syntax  function 
FND_CONCURRENT.SET_COMPLETION_STATUS
     ( status in varchar2,          message in varchar2) return BOOLEAN;
Normal status  warning message any message Error

How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>

 How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>  Sometime these xml data tags automatically chang...