Monday 1 June 2015

OAF: JDR_UTILS

In this post I will explain some of the procedures of JDR_UTILS, which will be useful when you work on OA Framework. You can describe the JDR_UTILS package if you have apps user database account access.

Most commonly used procedures are as below:

listCustomizations 
printDocument
deleteDocument
listDocuments

  • jdr_utils.listCustomizations()
This procedure can be used to check whether any personalization exists for a particular page or  substitution exists for a particular EO/VO/AM.
 begin  
  jdr_utils.listCustomizations('/ajtest/oracle/apps/fnd/test/webui/TestPG');  
 end;  
 begin  
  jdr_utils.listCustomizations('/ajtest/oracle/apps/fnd/test/server/TestVO');  
 end;  
  • jdr_utils.printDocument()
This procedure can be used to get the Page / Personalization / Substitution file. You can pass the output of the above procedure as a parameter to this procedure to get the details.
 begin  
  jdr_utils.printDocument('/ajtest/oracle/apps/fnd/test/webui/TestPG');  
 end;  
 begin  
  jdr_utils.printDocument('/ajtest/oracle/apps/fnd/test/webui/customizations/site/0/TestPG');  
 end;  
 begin  
  jdr_utils.printDocument('/ajtest/oracle/apps/fnd/test/server/customizations/site/0/TestVO');  
 end;  
  • jdr_utils.deleteDocument()
This procedure can be used to delete a particular Page / Personalization / Substitution. Please be careful when you use this procedure. Make sure that you are using the right parameter when using this procedure. You will have to COMMIT after calling calling this procedure.
 begin  
   jdr_utils.deleteDocument('/ajtest/oracle/apps/fnd/test/webui/TestPG');  
 end;  
 begin  
   jdr_utils.deleteDocument('/ajtest/oracle/apps/fnd/test/webui/customizations/site/0/TestPG');  
 end;  
 begin  
   jdr_utils.deleteDocument('/ajtest/oracle/apps/fnd/test/server/customizations/site/0/TestVO');  
 end;  
  • jdr_utils.listDocuments()
This procedure will print all the files under the specified path. 
 begin  
   jdr_utils.listDocuments('/ajtest/oracle/apps/fnd/test/webui');  
 end;  
You can add an additional parameter to recursively print all the documents under the specified path
 begin  
   jdr_utils.listDocuments('/ajtest/oracle/apps/fnd/test',true);  
 end;  

A nice explanation of all the API's in jdr_utils is available in this blog : List of JDR_UTILS APIs
Feel free to point out if anything is missing/wrong in this blog.

2 comments: