Search Results

Search found 34 results on 2 pages for 'prajkumar'.

Page 1/2 | 1 2  | Next Page >

  • OAF Page to Upload Files into Server from local Machine

    - by PRajkumar
    1. Create a New Workspace and Project File > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarFileUploadDemo   Automatically a new OA Project will also be created   Project Name -- FileUploadDemo Default Package -- prajkumar.oracle.apps.fnd.fileuploaddemo   2. Create a New Application Module (AM) Right Click on FileUploadDemo > New > ADF Business Components > Application Module Name -- FileUploadAM Package -- prajkumar.oracle.apps.fnd.fileuploaddemo.server Check Application Module Class: FileUploadAMImpl Generate JavaFile(s)   3. Create a New Page Right click on FileUploadDemo > New > Web Tier > OA Components > Page Name -- FileUploadPG Package -- prajkumar.oracle.apps.fnd.fileuploaddemo.webui   4. Select the FileUploadPG and go to the strcuture pane where a default region has been created   5. Select region1 and set the following properties --     Attribute Property ID PageLayoutRN AM Definition prajkumar.oracle.apps.fnd.fileuploaddemo.server.FileUploadAM Window Title Uploading File into Server from Local Machine Demo Window Title Uploading File into Server from Local Machine Demo     6. Create Stack Layout Region Under Page Layout Region Right click PageLayoutRN > New > Region   Attribute Property ID MainRN AM Definition messageComponentLayout   7. Create a New Item messageFileUpload Bean under MainRN Right click on MainRN > New > messageFileUpload Set Following Properties for New Item --   Attribute Property ID MessageFileUpload Item Style messageFileUpload   8. Create a New Item Submit Button Bean under MainRN Right click on MainRN > New > messageLayout Set Following Properties for messageLayout --   Attribute Property ID ButtonLayout   Right Click on ButtonLayout > New > Item   Attribute Property ID Submit Item Style submitButton Attribute Set /oracle/apps/fnd/attributesets/Buttons/Go   9. Create Controller for page FileUploadPG Right Click on PageLayoutRN > Set New Controller Package Name: prajkumar.oracle.apps.fnd.fileuploaddemo.webui Class Name: FileUploadCO   Write Following Code in FileUploadCO processFormRequest   import oracle.cabo.ui.data.DataObject; import java.io.FileOutputStream; import java.io.InputStream; import oracle.jbo.domain.BlobDomain; import java.io.File; import oracle.apps.fnd.framework.OAException; public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean);    if(pageContext.getParameter("Submit")!=null)  {   upLoadFile(pageContext,webBean);      } }   -- Use Following Code if want to Upload Files in Local Machine -- ----------------------------------------------------------------------------------- public void upLoadFile(OAPageContext pageContext,OAWebBean webBean) { String filePath = "D:\\PRajkumar";  System.out.println("Default File Path---->"+filePath);  String fileUrl = null;  try  {   DataObject fileUploadData =  pageContext.getNamedDataObject("MessageFileUpload"); //FileUploading is my MessageFileUpload Bean Id   if(fileUploadData!=null)   {    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");  // include this line    String contentType = (String) fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");  // For Mime Type    System.out.println("User File Name---->"+uFileName);    FileOutputStream output = null;    InputStream input = null;    BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, uFileName);    System.out.println("uploadedByteStream---->"+uploadedByteStream);                               File file = new File("D:\\PRajkumar", uFileName);    System.out.println("File output---->"+file);    output = new FileOutputStream(file);    System.out.println("output----->"+output);    input = uploadedByteStream.getInputStream();    System.out.println("input---->"+input);    byte abyte0[] = new byte[0x19000];    int i;         while((i = input.read(abyte0)) > 0)    output.write(abyte0, 0, i);    output.close();    input.close();   }  }  catch(Exception ex)  {   throw new OAException(ex.getMessage(), OAException.ERROR);  }     }   -- Use Following Code if want to Upload File into Server -- ------------------------------------------------------------------------- public void upLoadFile(OAPageContext pageContext,OAWebBean webBean) { String filePath = "/u01/app/apnac03r12/PRajkumar/";  System.out.println("Default File Path---->"+filePath);  String fileUrl = null;  try  {   DataObject fileUploadData =  pageContext.getNamedDataObject("MessageFileUpload");  //FileUploading is my MessageFileUpload Bean Id     if(fileUploadData!=null)   {    String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");   // include this line    String contentType = (String) fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");   // For Mime Type    System.out.println("User File Name---->"+uFileName);    FileOutputStream output = null;    InputStream input = null;    BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, uFileName);    System.out.println("uploadedByteStream---->"+uploadedByteStream);                               File file = new File("/u01/app/apnac03r12/PRajkumar", uFileName);    System.out.println("File output---->"+file);    output = new FileOutputStream(file);    System.out.println("output----->"+output);    input = uploadedByteStream.getInputStream();    System.out.println("input---->"+input);    byte abyte0[] = new byte[0x19000];    int i;         while((i = input.read(abyte0)) > 0)    output.write(abyte0, 0, i);    output.close();    input.close();   }  }  catch(Exception ex)  {   throw new OAException(ex.getMessage(), OAException.ERROR);  }     }   10. Congratulation you have successfully finished. Run Your page and Test Your Work           -- Used Code to Upload files into Server   -- Before Upload files into Server     -- After Upload files into Server       -- Used Code to Upload files into Local Machine   -- Before Upload files into Local Machine       -- After Upload files into Local Machine

    Read the article

  • Create Auto Customization Criteria OAF Search Page

    - by PRajkumar
    1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarCustSearch. Automatically a new OA Project will also be created. Name the project as CustSearchDemo and package as prajkumar.oracle.apps.fnd.custsearchdemo   2. Create a New Application Module (AM) Right Click on CustSearchDemo > New > ADF Business Components > Application Module Name -- CustSearchAM Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server   3. Enable Passivation for the Root UI Application Module (AM) Right Click on CustSearchAM > Edit SearchAM > Custom Properties > Name – RETENTION_LEVEL Value – MANAGE_STATE Click add > Apply > OK   4. Create Test Table and insert data some data in it (For Testing Purpose)   CREATE TABLE xx_custsearch_demo (   -- ---------------------     -- Data Columns     -- ---------------------     column1                  VARCHAR2(100),     column2                  VARCHAR2(100),     column3                  VARCHAR2(100),     column4                  VARCHAR2(100),     -- ---------------------     -- Who Columns     -- ---------------------     last_update_date    DATE         NOT NULL,     last_updated_by     NUMBER   NOT NULL,     creation_date          DATE         NOT NULL,     created_by               NUMBER   NOT NULL,     last_update_login   NUMBER  );   INSERT INTO xx_custsearch_demo VALUES('v1','v2','v3','v4',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v1','v3','v4','v5',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v2','v3','v4','v5',SYSDATE,0,SYSDATE,0,0); INSERT INTO xx_custsearch_demo VALUES('v3','v4','v5','v6',SYSDATE,0,SYSDATE,0,0); Now we have 4 records in our custom table   5. Create a New Entity Object (EO) Right click on SearchDemo > New > ADF Business Components > Entity Object Name – CustSearchEO Package -- prajkumar.oracle.apps.fnd.custsearchdemo.schema.server Database Objects -- XX_CUSTSEARCH_DEMO   Note – By default ROWID will be the primary key if we will not make any column to be primary key   Check the Accessors, Create Method, Validation Method and Remove Method   6. Create a New View Object (VO) Right click on CustSearchDemo > New > ADF Business Components > View Object Name -- CustSearchVO Package -- prajkumar.oracle.apps.fnd.custsearchdemo.server   In Step2 in Entity Page select CustSearchEO and shuttle them to selected list   In Step3 in Attributes Window select columns Column1, Column2, Column3, Column4, and shuttle them to selected list   In Java page deselect Generate Java file for View Object Class: CustSearchVOImpl and Select Generate Java File for View Row Class: CustSearchVORowImpl   7. Add Your View Object to Root UI Application Module Select Right click on CustSearchAM > Application Modules > Data Model Select CustSearchVO and shuttle to Data Model list   8. Create a New Page Right click on CustSearchDemo > New > Web Tier > OA Components > Page Name -- CustSearchPG Package -- prajkumar.oracle.apps.fnd.custsearchdemo.webui   9. Select the CustSearchPG and go to the strcuture pane where a default region has been created   10. Select region1 and set the following properties: ID -- PageLayoutRN Region Style -- PageLayout AM Definition -- prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM Window Title – AutoCustomize Search Page Window Title – AutoCustomization Search Page Auto Footer -- True   11. Add a Query Bean to Your Page Right click on PageLayoutRN > New > Region Select new region region1 and set following properties ID – QueryRN Region Style – query Construction Mode – autoCustomizationCriteria Include Simple Panel – False Include Views Panel – False Include Advanced Panel – False   12. Create a New Region of style table Right Click on QueryRN > New > Region Using Wizard Application Module – prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAM Available View Usages – CustSearchVO1   In Step2 in Region Properties set following properties Region ID – CustSearchTable Region Style – Table   In Step3 in View Attributes shuttle all the items (Column1, Column2, Column3, Column4) available in “Available View Attributes” to Selected View Attributes: In Step4 in Region Items page set style to “messageStyledText” for all items   13. Select CustSearchTable in Structure Panel and set property Width to 100%   14. Include Simple Search Panel Right Click on QueryRN > New > simpleSearchPanel Automatically region2 (header Region) and region1 (MessageComponentLayout Region) created Set Following Properties for region2 Id – SimpleSearchHeader Text -- Simple Search   15. Now right click on message Component Layout Region (SimpleSearchMappings) and create two message text input beans and set the below properties to each   Message TextInputBean1 Id – SearchColumn1 Search Allowed – True Data Type – VARCHAR2 Maximum Length – CSS Class – OraFieldText Prompt – Column1   Message TextInputBean2 Id – SearchColumn2 Search Allowed -- True Data Type – VARCHAR2 Maximum Length – 100 CSS Class – OraFieldText Prompt – Column2   16. Now Right Click on query Components and create simple Search Mappings. Then automatically SimpleSearchMappings and QueryCriteriaMap1 created   17.  Now select the QueryCriteriaMap1 and set the below properties Id – SearchColumn1Map Search Item – SearchColumn1 Result Item – Column1   18. Now again right click on simpleSearchMappings -> New -> queryCriteriaMap, and then set the below properties Id – SearchColumn2Map Search Item – SearchColumn2 Result Item – Column2   19. Congratulation you have successfully finished Auto Customization Search page. Run Your CustSearchPG page and Test Your Work            

    Read the article

  • Update records in OAF Page

    - by PRajkumar
    1. Create a Search Page to Create a page please go through the following link https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page   2. Implement Update Action in SearchPG Right click on ResultTable in SearchPG > New > Item   Set following properties for New Item   Attribute Property ID UpdateAction Item Style image Image URI updateicon_enabled.gif Atribute Set /oracle/apps/fnd/attributesets/Buttons/Update Prompt Update Additional Text Update record Height 24 Width 24 Action Type fireAction Event update Submit True Parameters Name – PColumn1 Value -- ${oa.SearchVO1.Column1} Name – PColumn2 Value -- ${oa.SearchVO1.Column2}   3. Create a Update Page Right click on SearchDemo > New > Web Tier > OA Components > Page Name – UpdatePG Package – prajkumar.oracle.apps.fnd.searchdemo.webui   4. Select the UpdatePG and go to the strcuture pane where a default region has been created   5. Select region1 and set the following properties:   Attribute Property ID PageLayoutRN Region Style PageLayout AM Definition prajkumar.oracle.apps.fnd.searchdemo.server.SearchAM Window Title Update Page Window Title Update Page Auto Footer True   6. Create the Second Region (Main Content Region) Select PageLayoutRN right click > New > Region ID – MainRN Region Style – messageComponentLayout   7. Create first Item (Empty Field) MainRN > New > messageTextInput   Attribute Property ID Column1 Style Property messageTextInput Prompt Column1 Data Type VARCHAR2 Length 20 Maximum Length 100 View Instance SearchVO1 View Attribute Column1   8. Create second Item (Empty Field) MainRN > New > messageTextInput   Attribute Property ID Column2 Style Property messageTextInput Prompt Column2 Data Type VARCHAR2 Length 20 Maximum Length 100 View Instance SearchVO1 View Attribute Column2   9. Create a container Region for Apply and Cancel Button in UpdatePG Select MainRN of UpdatePG MainRN > messageLayout   Attribute Property Region ButtonLayout   10. Create Apply Button Select ButtonLayout > New > Item   Attribute Property ID Apply Item Style submitButton Attribute /oracle/apps/fnd/attributesets/Buttons/Apply   11. Create Cancel Button Select ButtonLayout > New > Item   Attribute Property ID Cancel Item Style submitButton Attribute /oracle/apps/fnd/attributesets/Buttons/Cancel   12. Add Page Controller for SearchPG Right Click on PageLayoutRN of SearchPG > Set New Controller Name – SearchCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui   Add Following code in Search Page controller SearchCO    import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");  queryBean.clearSearchPersistenceCache(pageContext); }   public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processFormRequest(pageContext, webBean);     if ("update".equals(pageContext.getParameter(EVENT_PARAM)))  {   pageContext.setForwardURL("OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/UpdatePG",                                     null,                                     OAWebBeanConstants.KEEP_MENU_CONTEXT,                                                                 null,                                                                                        null,                                     true,                                                                 OAWebBeanConstants.ADD_BREAD_CRUMB_NO,                                     OAWebBeanConstants.IGNORE_MESSAGES);  }  } 13. Add Page Controller for UpdatePG Right Click on PageLayoutRN of UpdatePG > Set New Controller Name – UpdateCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui   Add Following code in Update Page controller UpdateCO    import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.OAApplicationModule; import java.io.Serializable;  public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  OAApplicationModule am = pageContext.getApplicationModule(webBean);  String Column1 = pageContext.getParameter("PColumn1");  String Column2 = pageContext.getParameter("PColumn2");  Serializable[] params = { Column1, Column2 };  am.invokeMethod("updateRow", params); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processFormRequest(pageContext, webBean);  OAApplicationModule am = pageContext.getApplicationModule(webBean);         if (pageContext.getParameter("Apply") != null)  {    am.invokeMethod("apply");   pageContext.forwardImmediately("OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",                                          null,                                          OAWebBeanConstants.KEEP_MENU_CONTEXT,                                          null,                                          null,                                          false, // retain AM                                          OAWebBeanConstants.ADD_BREAD_CRUMB_NO);  }  else if (pageContext.getParameter("Cancel") != null)  {    am.invokeMethod("rollback");   pageContext.forwardImmediately("OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",                                          null,                                          OAWebBeanConstants.KEEP_MENU_CONTEXT,                                          null,                                          null,                                          false, // retain AM                                          OAWebBeanConstants.ADD_BREAD_CRUMB_NO);  } }   14. Add following Code in SearchAMImpl   import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.apps.fnd.framework.server.OAViewObjectImpl;     public void updateRow(String Column1, String Column2) {  SearchVOImpl vo = (SearchVOImpl)getSearchVO1();  vo.initQuery(Column1, Column2); }     public void apply() {  getTransaction().commit(); } public void rollback() {  getTransaction().rollback(); }   15. Add following Code in SearchVOImpl   import oracle.apps.fnd.framework.server.OAViewObjectImpl;     public void initQuery(String Column1, String Column2) {  if ((Column1 != null) && (!("".equals(Column1.trim()))))  {   setWhereClause("column1 = :1 AND column2 = :2");   setWhereClauseParams(null); // Always reset   setWhereClauseParam(0, Column1);   setWhereClauseParam(1, Column2);   executeQuery();  } }   16. Congratulation you have successfully finished. Run Your Search page and Test Your Work                          

    Read the article

  • Partial Page Rendering in OAF Page

    - by PRajkumar
    Let us try to implement partial page rendering for a text item. If value of TextItem1 is null then TextItem2 will not be appreared on UI. If value of TextItem1 is not null then TextItem2 will be appreared on UI.   1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications File Name -- PPRProj Project Name – PPRDemoProj Default Package -- prajkumar.oracle.apps.fnd.pprdemo   2. Create Application Module AM PPRDemoProj right click > New > ADF Business Components > Application Module Name -- PPRAM Package -- prajkumar.oracle.apps.fnd.pprdemo.server   Check Application Module Class: PPRAMImpl Generate JavaFile(s)   3. Create a PPRVO View Object PPRDemoProj> New > ADF Business Components > View Objects Name – PPRVO Package – prajkumar.oracle.apps.fnd.pprdemo.server   In Attribute Page Click on New button and create transient primary key attribute with the following properties:   Attribute Property Name RowKey Type Number Updateable Always Key Attribute (Checked)   Click New button again and create transient attribute with the following properties:   Attribute Property Name TextItem2Render Type Boolean Updateable Always   Note – No Need to generate any JAVA files for PPRVO   4. Add Your View Object to Root UI Application Module Right click on PPRAM > Edit PPRAM > Data Model > Select PPRVO in Available View Objects list and shuttle to Data Model list   5. Create a OA components Page PPRDemoProj right click > New > OA Components > Page Name – PPRPG Package -- prajkumar.oracle.apps.fnd.pprdemo.webui   6. Modify the Page Layout (Top-level) Region   Attribute Property ID PageLayoutRN Region Style pageLayout Form Property True Auto Footer True Window Title PPR Demo Window Title True Title PPR Demo Page Header AM Definition prajkumar.oracle.apps.fnd.pprdemo.server.PPRAM   7. Create the Second Region (Main Content Region) Right click on PageLayoutRN > New > Region   Attribute Property ID MainRN Region Style messageComponentLayout   8. Create Two Text Items   Create First messageTextItem -- Right click on MainRN > New > messageTextInput   Attribute Property ID TextItem1 Region Style messageTextInput Prompt Text Item1 Length 20 Disable Server Side Validation True Disable Client Side Validation True Action Type firePartialAction Event TextItem1Change Submit True   Note -- Disable Client Side Validation and Event property appears after you set the Action Type property to firePartialAction   Create Second messageTextItem -- Select MainRN right click > New > messageTextInput   Attribute Property ID TextItem2 Region Style messageTextInput Prompt Text Item2 Length 20 Rendered ${oa.PPRVO1.TextItem2Render}   9. Add Following code in PPRAMImpl.java   import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.apps.fnd.framework.server.OAViewObjectImpl; public void handlePPRAction()  {   Number val = 1;  OAViewObject vo = (OAViewObject)findViewObject("PPRVO1");  if (vo != null)   {    if (vo.getFetchedRowCount() == 0)    {     vo.setMaxFetchSize(0);     vo.executeQuery();     vo.insertRow(vo.createRow());     OARow row = (OARow)vo.first();            row.setAttribute("RowKey", val);    row.setAttribute("TextItem2Render", Boolean.FALSE);      }  } }   10. Implement Controller for Page Select PageLayoutRN in Structure pane right click > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.pprdemo.webui Class Name – PPRCO   Write following code in processFormRequest function of PPRCO Controller   import oracle.apps.fnd.framework.OARow; import oracle.apps.fnd.framework.OAViewObject; public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);      am.invokeMethod("handlePPRAction"); } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processFormRequest(pageContext, webBean);        PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);  OAViewObject vo = (OAViewObject)am.findViewObject("PPRVO1");  OARow row = (OARow)vo.getCurrentRow();        if ("TextItem1Change".equals(pageContext.getParameter(EVENT_PARAM)))  {   if (pageContext.getParameter("TextItem1").equals(""))   {    row.setAttribute("TextItem2Render", Boolean.FALSE);   }   else   {    row.setAttribute("TextItem2Render", Boolean.TRUE);   }  } }   11. Congratulation you have successfully finished. Run Your PPRPG page and Test Your Work          

    Read the article

  • Import Data from Excel sheet to DB Table through OAF page

    - by PRajkumar
    1. Create a New Workspace and Project File > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarImportxlsDemo   Automatically a new OA Project will also be created   Project Name -- ImportxlsDemo Default Package -- prajkumar.oracle.apps.fnd.importxlsdemo   2. Add JAR file jxl-2.6.3.jar to Apache Library Download jxl-2.6.3.jar from following link – http://www.findjar.com/jar/net.sourceforge.jexcelapi/jars/jxl-2.6.jar.html   Steps to add jxl.jar file in Local Machine Right Click on ImportxlsDemo > Project Properties > Libraries > Add jar/Directory and browse to directory where jxl-2.6.3.jar has been downloaded and select the JAR file            Steps to add jxl.jar file at EBS middle tier On your EBS middile tier copy jxl.jar at $FND_TOP/java/3rdparty/standalone Add $FND_TOP/java/3rdparty/standalone\jxl.jar to custom classpath in Jser.properties file which is at $IAS_ORACLE_HOME/Apache/Jserv/etc wrapper.classpath=/U01/oracle/dev/devappl/fnd/11.5.0/java/3rdparty/stdalone/jxl.jar Bounce Apache Server   3. Create a New Application Module (AM) Right Click on ImportxlsDemo > New > ADF Business Components > Application Module Name -- ImportxlsAM Package -- prajkumar.oracle.apps.fnd.importxlsdemo.server   Check Application Module Class: ImportxlsAMImpl Generate JavaFile(s)   4. Create Test Table in which we will insert data from excel CREATE TABLE xx_import_excel_data_demo (    -- --------------------      -- Data Columns      -- --------------------      column1                 VARCHAR2(100),      column2                 VARCHAR2(100),      column3                 VARCHAR2(100),      column4                 VARCHAR2(100),      column5                 VARCHAR2(100),      -- --------------------      -- Who Columns      -- --------------------      last_update_date   DATE         NOT NULL,      last_updated_by    NUMBER   NOT NULL,      creation_date         DATE         NOT NULL,      created_by             NUMBER    NOT NULL,      last_update_login  NUMBER );   5. Create a New Entity Object (EO) Right click on ImportxlsDemo > New > ADF Business Components > Entity Object Name – ImportxlsEO Package -- prajkumar.oracle.apps.fnd.importxlsdemo.schema.server Database Objects -- XX_IMPORT_EXCEL_DATA_DEMO   Note – By default ROWID will be the primary key if we will not make any column to be primary key Check the Accessors, Create Method, Validation Method and Remove Method   6. Create a New View Object (VO) Right click on ImportxlsDemo > New > ADF Business Components > View Object Name -- ImportxlsVO Package -- prajkumar.oracle.apps.fnd.importxlsdemo.server   In Step2 in Entity Page select ImportxlsEO and shuttle it to selected list In Step3 in Attributes Window select all columns and shuttle them to selected list   In Java page Uncheck Generate Java file for View Object Class: ImportxlsVOImpl Select Generate Java File for View Row Class: ImportxlsVORowImpl -> Generate Java File -> Accessors   7. Add Your View Object to Root UI Application Module Right click on ImportxlsAM > Edit ImportxlsAM > Data Model > Select ImportxlsVO and shuttle to Data Model list   8. Create a New Page Right click on ImportxlsDemo > New > Web Tier > OA Components > Page Name -- ImportxlsPG Package -- prajkumar.oracle.apps.fnd.importxlsdemo.webui   9. Select the ImportxlsPG and go to the strcuture pane where a default region has been created   10. Select region1 and set the following properties:   Attribute Property ID PageLayoutRN AM Definition prajkumar.oracle.apps.fnd.importxlsdemo.server.ImportxlsAM Window Title Import Data From Excel through OAF Page Demo Window Title Import Data From Excel through OAF Page Demo   11. Create messageComponentLayout Region Under Page Layout Region Right click PageLayoutRN > New > Region   Attribute Property ID MainRN Item Style messageComponentLayout   12. Create a New Item messageFileUpload Bean under MainRN Right click on MainRN > New > messageFileUpload Set Following Properties for New Item --   Attribute Property ID MessageFileUpload Item Style messageFileUpload   13. Create a New Item Submit Button Bean under MainRN Right click on MainRN > New > messageLayout Set Following Properties for messageLayout --   Attribute Property ID ButtonLayout   Right Click on ButtonLayout > New > Item   Attribute Property ID Go Item Style submitButton Attribute Set /oracle/apps/fnd/attributesets/Buttons/Go   14. Create Controller for page ImportxlsPG Right Click on PageLayoutRN > Set New Controller Package Name: prajkumar.oracle.apps.fnd.importxlsdemo.webui Class Name: ImportxlsCO   Write Following Code in ImportxlsCO in processFormRequest import oracle.apps.fnd.framework.OAApplicationModule; import oracle.apps.fnd.framework.OAException; import java.io.Serializable; import oracle.apps.fnd.framework.webui.OAControllerImpl; import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.beans.OAWebBean; import oracle.cabo.ui.data.DataObject; import oracle.jbo.domain.BlobDomain; public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processFormRequest(pageContext, webBean);  if (pageContext.getParameter("Go") != null)  {   DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("MessageFileUpload");   String fileName = null;                 try   {    fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");   }   catch(NullPointerException ex)   {    throw new OAException("Please Select a File to Upload", OAException.ERROR);   }   BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, fileName);   try   {    OAApplicationModule oaapplicationmodule = pageContext.getRootApplicationModule();    Serializable aserializable2[] = {uploadedByteStream};    Class aclass2[] = {BlobDomain.class };    oaapplicationmodule.invokeMethod("ReadExcel", aserializable2,aclass2);   }   catch (Exception ex)   {    throw new OAException(ex.toString(), OAException.ERROR);   }  } }     Write Following Code in ImportxlsAMImpl.java import java.io.IOException; import java.io.InputStream; import jxl.Cell; import jxl.CellType; import jxl.Sheet; import jxl.Workbook; import jxl.read.biff.BiffException; import oracle.apps.fnd.framework.server.OAApplicationModuleImpl; import oracle.jbo.Row; import oracle.apps.fnd.framework.OAViewObject; import oracle.apps.fnd.framework.server.OAViewObjectImpl; import oracle.jbo.domain.BlobDomain; public void createRecord(String[] excel_data) {   OAViewObject vo = (OAViewObject)getImportxlsVO1();            if (!vo.isPreparedForExecution())    {   vo.executeQuery();      }                      Row row = vo.createRow();  try  {   for (int i=0; i < excel_data.length; i++)   {    row.setAttribute("Column" +(i+1) ,excel_data[i]);   }  }  catch(Exception e)  {   System.out.println(e.getMessage());   }  vo.insertRow(row);  getTransaction().commit(); }      public void ReadExcel(BlobDomain fileData) throws IOException {  String[] excel_data  = new String[5];  InputStream inputWorkbook = fileData.getInputStream();  Workbook w;          try  {   w = Workbook.getWorkbook(inputWorkbook);                       // Get the first sheet   Sheet sheet = w.getSheet(0);                       for (int i = 0; i < sheet.getRows(); i++)   {    for (int j = 0; j < sheet.getColumns(); j++)    {     Cell cell = sheet.getCell(j, i);     CellType type = cell.getType();     if (cell.getType() == CellType.LABEL)     {      System.out.println("I got a label " + cell.getContents());      excel_data[j] = cell.getContents();     }     if (cell.getType() == CellType.NUMBER)     {        System.out.println("I got a number " + cell.getContents());      excel_data[j] = cell.getContents();     }    }    createRecord(excel_data);   }  }              catch (BiffException e)  {   e.printStackTrace();  } }   15. Congratulation you have successfully finished. Run Your page and Test Your Work   Consider Excel PRAJ_TEST.xls with following data --       Lets Try to import this data into DB Table --          

    Read the article

  • Working with Key Flex Fields in OAF

    - by PRajkumar
    1. Create a New Workspace and Project Right click Workspaces and click create New OA Workspace and name it as PRajkumarKFFDemo. Automatically a new OA Project will also be created. Name the project as KFFDemo and package as prajkumar.oracle.apps.fnd.kffdemo   2. Create a New Application Module (AM) Right Click on KFFDemo > New > ADF Business Components > Application Module Name -- KFFAM Package -- prajkumar.oracle.apps.fnd.kffdemo.server   Check Application Module Class: KFFAMImpl Generate JavaFile(s)   3. Create a New View Object (VO) Right click on KFFDemo > New > ADF Business Components > View Object Name -- KFFVO Package -- prajkumar.oracle.apps.fnd.kffdemo.server   Note - The VO is not based on any EO so click next and go to the query section and paste the query   SELECT  code_combination_id FROM    gl_code_combinations_kfv   In Step8 Check Object Class: KFFVOImpl -> Generate Java File -> Bind Variable Accessors   4. Add View Object to Root UI Application Module Right Click on KFFAM > Edit KFFAM > Data Model and shuttle KFFVO from Available View Objects to Data Model   5. Create a New Page Right click on KFFDemo > New > Web Tier > OA Components > Page Name -- KFFPG Package -- prajkumar.oracle.apps.fnd.kffdemo.webui   6. Select the KFFPG and go to the strcuture pane where a default region has been created   7. Select region1 and set the following properties:   Attribute Property ID PageLayoutRN AM Definition prajkumar.oracle.apps.fnd.kffdemo.server.KFFAM Window Title Key Flex Field Demo Window Title Key Flex Field Demo     8. Create Stack Layout Region Under Page Layout Region Right click PageLayoutRN > New > Region   Attribute Property ID MainRN AM Definition stackLayout   9. Create a New Item of type Flex under the Stack Layout Region Right click on MainRN > New > Item Set Following Properties for New Item --   Attribute Property ID KeyFlexItem Item Style Flex Prompt Accounting Key Flex Field Appl Short Name SQLGL Name GL# Type Key View Instance KFFVO1     10. Create Controller for page KFFPG Right Click on PageLayoutRN > Set New Controller Package Name: prajkumar.oracle.apps.fnd.kffdemo.webui Class Name: KFFCO   Write Following Code in KFFCO processRequest   public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);    OAKeyFlexBean kffId = (OAKeyFlexBean)webBean.findIndexedChildRecursive("KeyFlexItem");    // Set the code combination lov   kffId.useCodeCombinationLOV(true);   //set the structure code for the item key flex    kffId.setStructureCode("FED_AFF");   //Set the attribute name to the item   kffId.setCCIDAttributeName("CodeCombinationId");  //Execute the Query   KFFAMImpl am = (KFFAMImpl)pageContext.getApplicationModule(webBean);   KFFVOImpl vo = (KFFVOImpl)am.findViewObject("KFFVO1");          if(!vo.isPreparedForExecution())   {          vo.executeQuery();   } }   Note -- If you do not want to see the key flex field is merging one then change the code in the controller class as below   kffId.useCodeCombinationLOV(false);   11. Use the below Query to find the Structure Code   SELECT  fif.application_id,                  fif.id_flex_code,                  fif.id_flex_name,                  fif.application_table_name,                   fif.description,                  fifs.id_flex_num,                  fifs.id_flex_structure_code,                  fifse.segment_name,                  fifse.segment_num,                  fifse.flex_value_set_id  FROM     fnd_id_flexs                    fif,                  fnd_id_flex_structures   fifs,                   fnd_id_flex_segments    fifse  WHERE  fif.application_id      = fifs.application_id  AND       fif.id_flex_code         = fifs.id_flex_code  AND       fifse.application_id   = fif.application_id  AND       fifse.id_flex_code      = fif.id_flex_code  AND       fifse.id_flex_num      = fifs.id_flex_num  AND       fif.id_flex_code         LIKE 'GL#' AND       fif.id_flex_name       LIKE 'Accounting Flexfield';   12. Congratulation you have successfully finished. Run Your page and Test Your Work        

    Read the article

  • Oracle HRMS API – Create Employee Payment Method

    - by PRajkumar
    API --  hr_personal_pay_method_api.create_personal_pay_method   Example -- DECLARE   ln_method_id  PAY_PERSONAL_PAYMENT_METHODS_F.PERSONAL_PAYMENT_METHOD_ID%TYPE; ln_ext_acc_id        PAY_EXTERNAL_ACCOUNTS.EXTERNAL_ACCOUNT_ID%TYPE; ln_obj_ver_num    PAY_PERSONAL_PAYMENT_METHODS_F.OBJECT_VERSION_NUMBER%TYPE; ld_eff_start_date   DATE;   ld_eff_end_date    DATE; ln_comment_id     NUMBER; BEGIN      -- Create Employee Payment Method      -- --------------------------------------------------       hr_personal_pay_method_api.create_personal_pay_method       (   -- Input data elements           -- ------------------------------           p_effective_date                                     => TO_DATE('21-JUN-2011'),           p_assignment_id                                   => 33561,           p_org_payment_method_id               => 2,           p_priority                                                 => 50,           p_percentage                                           => 100,           p_territory_code                                     => 'US',           p_segment1                                              => 'PRAJKUMAR',           p_segment2                                              => 'S',           p_segment3                                              => '100200300',           p_segment4                                              => '567',           p_segment5                                              => 'HDFC',           p_segment6                                              => 'INDIA',           -- Output data elements           -- --------------------------------           p_personal_payment_method_id   => ln_method_id,           p_external_account_id                       => ln_ext_acc_id,           p_object_version_number                  => ln_obj_ver_num,           p_effective_start_date                          => ld_eff_start_date,           p_effective_end_date                           => ld_eff_end_date,          p_comment_id                                        => ln_comment_id      );    COMMIT; EXCEPTION           WHEN OTHERS THEN                           ROLLBACK;                            dbms_output.put_line(SQLERRM); END; / SHOW ERR;    

    Read the article

  • Oracle HRMS API – Create Employee

    - by PRajkumar
    API - hr_employee_api.create_employee Example --    -- Create Employee  -- ------------------------- DECLARE    lc_employee_number                       PER_ALL_PEOPLE_F.EMPLOYEE_NUMBER%TYPE    := 'PRAJ_01';  ln_person_id                                      PER_ALL_PEOPLE_F.PERSON_ID%TYPE;  ln_assignment_id                             PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_ID%TYPE;  ln_object_ver_number                     PER_ALL_ASSIGNMENTS_F.OBJECT_VERSION_NUMBER%TYPE;  ln_asg_ovn                                          NUMBER;    ld_per_effective_start_date             PER_ALL_PEOPLE_F.EFFECTIVE_START_DATE%TYPE;  ld_per_effective_end_date              PER_ALL_PEOPLE_F.EFFECTIVE_END_DATE%TYPE;  lc_full_name                                        PER_ALL_PEOPLE_F.FULL_NAME%TYPE;  ln_per_comment_id                          PER_ALL_PEOPLE_F.COMMENT_ID%TYPE;  ln_assignment_sequence                 PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_SEQUENCE%TYPE;  lc_assignment_number                    PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_NUMBER%TYPE;    lb_name_combination_warning   BOOLEAN;  lb_assign_payroll_warning           BOOLEAN;  lb_orig_hire_warning                       BOOLEAN;   BEGIN            hr_employee_api.create_employee            (   -- Input data elements                 -- ------------------------------                p_hire_date                                         => TO_DATE('08-JUN-2011'),                p_business_group_id                      => fnd_profile.value_specific('PER_BUSINESS_GROUP_ID'),                p_last_name                                       => 'TEST',                p_first_name                                       => 'PRAJKUMAR',                p_middle_names                              => NULL,                p_sex                                                     => 'M',                p_national_identifier                       => '183-09-6723',                p_date_of_birth                                 => TO_DATE('03-DEC-1988'),                p_known_as                                       => 'PRAJ',                 -- Output data elements                 -- --------------------------------                p_employee_number                         => lc_employee_number,                p_person_id                                         => ln_person_id,                p_assignment_id                                => ln_assignment_id,                p_per_object_version_number       => ln_object_ver_number,                p_asg_object_version_number       => ln_asg_ovn,                p_per_effective_start_date               => ld_per_effective_start_date,                p_per_effective_end_date                => ld_per_effective_end_date,                p_full_name                                         => lc_full_name,                p_per_comment_id                            => ln_per_comment_id,                p_assignment_sequence                  => ln_assignment_sequence,                p_assignment_number                     => lc_assignment_number,                p_name_combination_warning    => lb_name_combination_warning,                p_assign_payroll_warning            => lb_assign_payroll_warning,                p_orig_hire_warning                        => lb_orig_hire_warning          );       COMMIT;   EXCEPTION       WHEN OTHERS THEN                     ROLLBACK;                     dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Clear/ Reset Result Table of Search page in OAF

    - by PRajkumar
    Normally problem faced by developers after creating Search Page is how to Clear/ Reset Result Table when developer open search page first time or after search when developer redirecting back to same search page from any other page (say delete page or update page)   Add following Code in your Search page Controller where you have constructed your Query Region   import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; ... public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");   // Here QueryRN is your Query Region Name as shown in following snap shot  queryBean.clearSearchPersistenceCache(pageContext); }     Note – After add this code, no need to worry about state of Application Module (AM). This code will clean up result table automatically every time when you will open Search page first time and when you are redirecting back to search page. But still as per good coding standard while redirecting back to search page always keep AM state to FALSE

    Read the article

  • Oracle HRMS API – Rehire Employee

    - by PRajkumar
    API --  hr_employee_api.re_hire_ex_employee   Example -- Consider a Ex-Employee we will try to Rehire that employee using Rehire API     DECLARE      ln_per_object_version_number      PER_ALL_PEOPLE_F.OBJECT_VERSION_NUMBER%TYPE        := 5;      ln_assg_object_version_number    PER_ALL_ASSIGNMENTS_F.OBJECT_VERSION_NUMBER%TYPE;      ln_assignment_id                               PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_ID%TYPE;      ld_per_effective_start_date              PER_ALL_PEOPLE_F.EFFECTIVE_START_DATE%TYPE;      ld_per_effective_end_date               PER_ALL_PEOPLE_F.EFFECTIVE_END_DATE%TYPE;      ln_assignment_sequence                  PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_SEQUENCE%TYPE;      lb_assign_payroll_warning            BOOLEAN;      lc_assignment_number                     PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_NUMBER%TYPE; BEGIN     -- Rehire Employee API      -- --------------------------------      hr_employee_api.re_hire_ex_employee      (    -- Input data elements           -- -----------------------------          p_hire_date                                          => TO_DATE('28-JUN-2011'),          p_person_id                                         => 32979,          p_rehire_reason                                  => NULL,          -- Output data elements          -- --------------------------------         p_assignment_id                                => ln_assignment_id,         p_per_object_version_number       => ln_per_object_version_number,         p_asg_object_version_number       => ln_assg_object_version_number,         p_per_effective_start_date               => ld_per_effective_start_date,         p_per_effective_end_date                => ld_per_effective_end_date,         p_assignment_sequence                  => ln_assignment_sequence,         p_assignment_number                     => lc_assignment_number,         p_assign_payroll_warning             => lb_assign_payroll_warning     );    COMMIT; EXCEPTION        WHEN OTHERS THEN                        ROLLBACK;                        dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API – Create or Update Employee Salary

    - by PRajkumar
    API --  hr_maintain_proposal_api.cre_or_upd_salary_proposal   Note - Salary Basis is required to be assigned to employee assignment before to run Salary Proposal API Example --   DECLARE     lb_inv_next_sal_date_warning      BOOLEAN;     lb_proposed_salary_warning         BOOLEAN;     lb_approved_warning                       BOOLEAN;     lb_payroll_warning                            BOOLEAN;     ln_pay_proposal_id                           NUMBER;     ln_object_version_number                NUMBER; BEGIN    -- Create or Upadte Employee Salary Proposal    -- ----------------------------------------------------------------     hr_maintain_proposal_api.cre_or_upd_salary_proposal     (    -- Input data elements          -- ------------------------------          p_business_group_id                   => fnd_profile.value('PER_BUSINESS_GROUP_ID'),          p_assignment_id                            => 33561,          p_change_date                                => TO_DATE('13-JUN-2011'),          p_proposed_salary_n                   => 1000,          p_approved                                      => 'Y',          -- Output data elements          -- --------------------------------          p_pay_proposal_id                       => ln_pay_proposal_id,          p_object_version_number           => ln_object_version_number,            p_inv_next_sal_date_warning  => lb_inv_next_sal_date_warning,          p_proposed_salary_warning     => lb_proposed_salary_warning,          p_approved_warning                   => lb_approved_warning,          p_payroll_warning                        => lb_payroll_warning     );    COMMIT; EXCEPTION        WHEN OTHERS THEN                           ROLLBACK;                           dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API – Create or Update Employee Phone

    - by PRajkumar
    API --  hr_phone_api.create_or_update_phone   Example -- DECLARE        ln_phone_id                              PER_PHONES.PHONE_ID%TYPE;        ln_object_version_number    PER_PHONES.OBJECT_VERSION_NUMBER%TYPE; BEGIN    -- Create or Update Employee Phone Detail    -- -----------------------------------------------------------     hr_phone_api.create_or_update_phone     (   -- Input data elements         -- -----------------------------         p_date_from                             => TO_DATE('13-JUN-2011'),         p_phone_type                          => 'W1',         p_phone_number                   => '9999999',         p_parent_id                              => 32979,         p_parent_table                         => 'PER_ALL_PEOPLE_F',         p_effective_date                       => TO_DATE('13-JUN-2011'),         -- Output data elements         -- --------------------------------         p_phone_id                              => ln_phone_id,         p_object_version_number    => ln_object_version_number      );    COMMIT; EXCEPTION       WHEN OTHERS THEN                     ROLLBACK;                      dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API – Delete Employee Element Entry

    - by PRajkumar
    API --  pay_element_entry_api.delete_element_entry    Example -- Consider Employee has Element Entry "Bonus". Lets try to Delete Element Entry "Bonus" using delete API     DECLARE       ld_effective_start_date            DATE;       ld_effective_end_date             DATE;       lb_delete_warning                   BOOLEAN;       ln_object_version_number    PAY_ELEMENT_ENTRIES_F.OBJECT_VERSION_NUMBER%TYPE := 1; BEGIN       -- Delete Element Entry       -- -------------------------------         pay_element_entry_api.delete_element_entry         (    -- Input data elements              -- ------------------------------              p_datetrack_delete_mode    => 'DELETE',              p_effective_date                      => TO_DATE('23-JUNE-2011'),              p_element_entry_id               => 118557,              -- Output data elements              -- --------------------------------              p_object_version_number   => ln_object_version_number,              p_effective_start_date           => ld_effective_start_date,              p_effective_end_date            => ld_effective_end_date,              p_delete_warning                  => lb_delete_warning         );    COMMIT; EXCEPTION         WHEN OTHERS THEN                           ROLLBACK;                           dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API –Update Employee Fed Tax Rule

    - by PRajkumar
    API --  pay_federal_tax_rule_api.update_fed_tax_rule Example -- DECLARE    lb_correction                              BOOLEAN;    lb_update                                   BOOLEAN;    lb_update_override                 BOOLEAN;    lb_update_change_insert      BOOLEAN;    ld_effective_start_date            DATE;    ld_effective_end_date             DATE;    ln_assignment_id                     NUMBER                    := 33561;    lc_dt_ud_mode                          VARCHAR2(100)     := NULL;    ln_object_version_number     NUMBER                    := 0;    ln_supp_tax_override_rate    PAY_US_EMP_FED_TAX_RULES_F.SUPP_TAX_OVERRIDE_RATE%TYPE;    ln_emp_fed_tax_rule_id         PAY_US_EMP_FED_TAX_RULES_F.EMP_FED_TAX_RULE_ID%TYPE; BEGIN    -- Find Date Track Mode    -- -------------------------------    dt_api.find_dt_upd_modes    (   -- Input data elements        -- ------------------------------       p_effective_date                   => TO_DATE('12-JUN-2011'),       p_base_table_name            => 'PER_ALL_ASSIGNMENTS_F',       p_base_key_column           => 'ASSIGNMENT_ID',       p_base_key_value               => ln_assignment_id,       -- Output data elements       -- -------------------------------       p_correction                          => lb_correction,       p_update                                => lb_update,       p_update_override              => lb_update_override,       p_update_change_insert   => lb_update_change_insert   );    IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )  THEN      -- UPDATE_OVERRIDE      -- --------------------------------      lc_dt_ud_mode := 'UPDATE_OVERRIDE';  END IF;    IF ( lb_correction = TRUE )  THEN     -- CORRECTION     -- ----------------------     lc_dt_ud_mode := 'CORRECTION';  END IF;    IF ( lb_update = TRUE )  THEN      -- UPDATE      -- -------------      lc_dt_ud_mode := 'UPDATE';  END IF;       -- Update Employee Fed Tax Rule   -- ----------------------------------------------   pay_federal_tax_rule_api.update_fed_tax_rule   (   -- Input data elements       -- -----------------------------       p_effective_date                        => TO_DATE('20-JUN-2011'),       p_datetrack_update_mode   => lc_dt_ud_mode,       p_emp_fed_tax_rule_id         => 7417,       p_withholding_allowances  => 100,       p_fit_additional_tax                => 10,       p_fit_exempt                               => 'N',       p_supp_tax_override_rate     => 5,       -- Output data elements       -- --------------------------------      p_object_version_number       => ln_object_version_number,      p_effective_start_date               => ld_effective_start_date,      p_effective_end_date                => ld_effective_end_date   );    COMMIT; EXCEPTION           WHEN OTHERS THEN                          ROLLBACK;                          dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • OTBI vs. OBIA

    - by PRajkumar
      What are the differences between OTBI and OBIA?   OTBI -- Oracle Transactional Business Intelligence OBIA – Oracle Business Intelligence Applications   OBIA   1. OBIA is the pre-packaged BI Apps that Oracle has provided for several years. It is the data warehouse based Solution 2. It is based on the Universal data warehouse design with different prebuilt adapters that can connect to various source application to bring the     data into the warehouse 3. It allows consolidating the data from various sources to bring them together 4. It provides a library of metrics that help to measure business 5. It provides set of predefined reports and dashboards 6. OBIA works for multiple sources including E-Business Suite, PeopleSoft, JDE, SAP and FUSION Applications    OTBI 1. It is a real time BI 2. There is no warehouse or ETL process for OTBI 3. It is a Fusion Apps only 4. OTBI leveraging the advanced technologies from both BI platform and ADF to enable the online BI queries against database directly 5. OTBI does not have prebuilt dashboards and reports like OBIA   Note: Both OTBI and OBIA are available from same metadata repository. Some of the repository objects are shared between OTBI and OBIA. It was designed to allows to have following configuration:   OTBI Only OBIA Only OTBI and OBIA coexist    Both OTBI and OBIA are accessing Fusion Apps via the ADF

    Read the article

  • Oracle HRMS API – Create Employee Element Entry

    - by PRajkumar
    API - pay_element_entry_api.create_element_entry Example -- Lets Try to Create Element Entry "Bonus" for Employee   DECLARE    ln_element_link_id                  PAY_ELEMENT_LINKS_F.ELEMENT_LINK_ID%TYPE;    ld_effective_start_date            DATE;    ld_effective_end_date             DATE;    ln_element_entry_id                PAY_ELEMENT_ENTRIES_F.ELEMENT_ENTRY_ID%TYPE;    ln_object_version_number     PAY_ELEMENT_ENTRIES_F.OBJECT_VERSION_NUMBER %TYPE;    lb_create_warning                    BOOLEAN;    ln_input_value_id                    PAY_INPUT_VALUES_F.INPUT_VALUE_ID%TYPE;    ln_screen_entry_value            PAY_ELEMENT_ENTRY_VALUES_F.SCREEN_ENTRY_VALUE%TYPE;    ln_element_type_id                  PAY_ELEMENT_TYPES_F.ELEMENT_TYPE_ID%TYPE; BEGIN         -- Get Element Link Id         -- ------------------------------           ln_element_link_id :=      hr_entry_api.get_link                                                           (       p_assignment_id      => 33561,                                                                   p_element_type_id   => 50417,                                                                   p_session_date          => TO_DATE('23-JUN-2011')                                                           );          dbms_output.put_line( '  API: Element Link Id: ' || ln_element_link_id );          -- Create Element Entry        -- ------------------------------        pay_element_entry_api.create_element_entry          (     -- Input data elements                -- -----------------------------                p_effective_date                     => TO_DATE('22-JUN-2011'),                p_business_group_id          => fnd_profile.value('PER_BUSINESS_GROUP_ID'),                p_assignment_id                   => 33561,                p_element_link_id                => ln_element_link_id,                p_entry_type                           => 'E',                p_input_value_id1               => 53726,                p_entry_value1                      => 2500,                -- Output data elements                -- --------------------------------                p_effective_start_date          => ld_effective_start_date,                p_effective_end_date           => ld_effective_end_date,                p_element_entry_id             => ln_element_entry_id,                p_object_version_number  => ln_object_version_number,                p_create_warning                 => lb_create_warning          );        dbms_output.put_line( '  API: pay_element_entry_api.create_element_entry successfull - Element Entry Id: ' || ln_element_entry_id );    COMMIT; EXCEPTION           WHEN OTHERS THEN                             ROLLBACK;                             dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Commit in SQL

    - by PRajkumar
    SQL Transaction Control Language Commands (TCL)                                           (COMMIT) Commit Transaction As a SQL language we use transaction control language very frequently. Committing a transaction means making permanent the changes performed by the SQL statements within the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. This statement also erases all save points in the transaction and releases transaction locks. Oracle Database issues an implicit COMMIT before and after any data definition language (DDL) statement. Oracle recommends that you explicitly end every transaction in your application programs with a COMMIT or ROLLBACK statement, including the last transaction, before disconnecting from Oracle Database. If you do not explicitly commit the transaction and the program terminates abnormally, then the last uncommitted transaction is automatically rolled back.   Until you commit a transaction: ·         You can see any changes you have made during the transaction by querying the modified tables, but other users cannot see the changes. After you commit the transaction, the changes are visible to other users' statements that execute after the commit ·         You can roll back (undo) any changes made during the transaction with the ROLLBACK statement   Note: Most of the people think that when we type commit data or changes of what you have made has been written to data files, but this is wrong when you type commit it means that you are saying that your job has been completed and respective verification will be done by oracle engine that means it checks whether your transaction achieved consistency when it finds ok it sends a commit message to the user from log buffer but not from data buffer, so after writing data in log buffer it insists data buffer to write data in to data files, this is how it works.   Before a transaction that modifies data is committed, the following has occurred: ·         Oracle has generated undo information. The undo information contains the old data values changed by the SQL statements of the transaction ·         Oracle has generated redo log entries in the redo log buffer of the System Global Area (SGA). The redo log record contains the change to the data block and the change to the rollback block. These changes may go to disk before a transaction is committed ·         The changes have been made to the database buffers of the SGA. These changes may go to disk before a transaction is committed   Note:   The data changes for a committed transaction, stored in the database buffers of the SGA, are not necessarily written immediately to the data files by the database writer (DBWn) background process. This writing takes place when it is most efficient for the database to do so. It can happen before the transaction commits or, alternatively, it can happen some times after the transaction commits.   When a transaction is committed, the following occurs: 1.      The internal transaction table for the associated undo table space records that the transaction has committed, and the corresponding unique system change number (SCN) of the transaction is assigned and recorded in the table 2.      The log writer process (LGWR) writes redo log entries in the SGA's redo log buffers to the redo log file. It also writes the transaction's SCN to the redo log file. This atomic event constitutes the commit of the transaction 3.      Oracle releases locks held on rows and tables 4.      Oracle marks the transaction complete   Note:   The default behavior is for LGWR to write redo to the online redo log files synchronously and for transactions to wait for the redo to go to disk before returning a commit to the user. However, for lower transaction commit latency application developers can specify that redo be written asynchronously and that transaction do not need to wait for the redo to be on disk.   The syntax of Commit Statement is   COMMIT [WORK] [COMMENT ‘your comment’]; ·         WORK is optional. The WORK keyword is supported for compliance with standard SQL. The statements COMMIT and COMMIT WORK are equivalent. Examples Committing an Insert INSERT INTO table_name VALUES (val1, val2); COMMIT WORK; ·         COMMENT Comment is also optional. This clause is supported for backward compatibility. Oracle recommends that you used named transactions instead of commit comments. Specify a comment to be associated with the current transaction. The 'text' is a quoted literal of up to 255 bytes that Oracle Database stores in the data dictionary view DBA_2PC_PENDING along with the transaction ID if a distributed transaction becomes in doubt. This comment can help you diagnose the failure of a distributed transaction. Examples The following statement commits the current transaction and associates a comment with it: COMMIT     COMMENT 'In-doubt transaction Code 36, Call (415) 555-2637'; ·         WRITE Clause Use this clause to specify the priority with which the redo information generated by the commit operation is written to the redo log. This clause can improve performance by reducing latency, thus eliminating the wait for an I/O to the redo log. Use this clause to improve response time in environments with stringent response time requirements where the following conditions apply: The volume of update transactions is large, requiring that the redo log be written to disk frequently. The application can tolerate the loss of an asynchronously committed transaction. The latency contributed by waiting for the redo log write to occur contributes significantly to overall response time. You can specify the WAIT | NOWAIT and IMMEDIATE | BATCH clauses in any order. Examples To commit the same insert operation and instruct the database to buffer the change to the redo log, without initiating disk I/O, use the following COMMIT statement: COMMIT WRITE BATCH; Note: If you omit this clause, then the behavior of the commit operation is controlled by the COMMIT_WRITE initialization parameter, if it has been set. The default value of the parameter is the same as the default for this clause. Therefore, if the parameter has not been set and you omit this clause, then commit records are written to disk before control is returned to the user. WAIT | NOWAIT Use these clauses to specify when control returns to the user. The WAIT parameter ensures that the commit will return only after the corresponding redo is persistent in the online redo log. Whether in BATCH or IMMEDIATE mode, when the client receives a successful return from this COMMIT statement, the transaction has been committed to durable media. A crash occurring after a successful write to the log can prevent the success message from returning to the client. In this case the client cannot tell whether or not the transaction committed. The NOWAIT parameter causes the commit to return to the client whether or not the write to the redo log has completed. This behavior can increase transaction throughput. With the WAIT parameter, if the commit message is received, then you can be sure that no data has been lost. Caution: With NOWAIT, a crash occurring after the commit message is received, but before the redo log record(s) are written, can falsely indicate to a transaction that its changes are persistent. If you omit this clause, then the transaction commits with the WAIT behavior. IMMEDIATE | BATCH Use these clauses to specify when the redo is written to the log. The IMMEDIATE parameter causes the log writer process (LGWR) to write the transaction's redo information to the log. This operation option forces a disk I/O, so it can reduce transaction throughput. The BATCH parameter causes the redo to be buffered to the redo log, along with other concurrently executing transactions. When sufficient redo information is collected, a disk write of the redo log is initiated. This behavior is called "group commit", as redo for multiple transactions is written to the log in a single I/O operation. If you omit this clause, then the transaction commits with the IMMEDIATE behavior. ·         FORCE Clause Use this clause to manually commit an in-doubt distributed transaction or a corrupt transaction. ·         In a distributed database system, the FORCE string [, integer] clause lets you manually commit an in-doubt distributed transaction. The transaction is identified by the 'string' containing its local or global transaction ID. To find the IDs of such transactions, query the data dictionary view DBA_2PC_PENDING. You can use integer to specifically assign the transaction a system change number (SCN). If you omit integer, then the transaction is committed using the current SCN. ·         The FORCE CORRUPT_XID 'string' clause lets you manually commit a single corrupt transaction, where string is the ID of the corrupt transaction. Query the V$CORRUPT_XID_LIST data dictionary view to find the transaction IDs of corrupt transactions. You must have DBA privileges to view the V$CORRUPT_XID_LIST and to specify this clause. ·         Specify FORCE CORRUPT_XID_ALL to manually commit all corrupt transactions. You must have DBA privileges to specify this clause. Examples Forcing an in doubt transaction. Example The following statement manually commits a hypothetical in-doubt distributed transaction. Query the V$CORRUPT_XID_LIST data dictionary view to find the transaction IDs of corrupt transactions. You must have DBA privileges to view the V$CORRUPT_XID_LIST and to issue this statement. COMMIT FORCE '22.57.53';

    Read the article

  • Oracle HRMS API – Update Employee State Tax Rule

    - by PRajkumar
    API --  pay_state_tax_rule_api.update_state_tax_rule Example --   DECLARE      lc_dt_ud_mode                       VARCHAR2(100)   := NULL;      ln_assignment_id                  NUMBER                  := 33561;      ln_object_version_number  NUMBER                  := 1;      ld_effective_start_date          DATE;      ld_effective_end_date            DATE;      lb_correction                            BOOLEAN;      lb_update                                  BOOLEAN;      lb_update_override                BOOLEAN;      lb_update_change_insert    BOOLEAN; BEGIN     -- Find Date Track Mode     -- --------------------------------      dt_api.find_dt_upd_modes      (   p_effective_date                 => TO_DATE('12-JUN-2011'),          p_base_table_name          => 'PER_ALL_ASSIGNMENTS_F',          p_base_key_column         => 'ASSIGNMENT_ID',          p_base_key_value             => ln_assignment_id,          -- Output data elements          -- --------------------------------         p_correction                          => lb_correction,         p_update                                => lb_update,         p_update_override              => lb_update_override,         p_update_change_insert   => lb_update_change_insert     );        IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )    THEN       -- UPDATE_OVERRIDE       -- --------------------------------       lc_dt_ud_mode := 'UPDATE_OVERRIDE';    END IF;      IF ( lb_correction = TRUE )    THEN       -- CORRECTION       -- ----------------------      lc_dt_ud_mode := 'CORRECTION';    END IF;      IF ( lb_update = TRUE )    THEN        -- UPDATE        -- --------------        lc_dt_ud_mode := 'UPDATE';    END IF;      -- Update State Tax Rule    -- ---------------------------------     pay_state_tax_rule_api.update_state_tax_rule     (     -- Input data elements           -- ------------------------------           p_effective_date                        => TO_DATE('20-JUN-2011'),           p_datetrack_update_mode   => lc_dt_ud_mode,           p_emp_state_tax_rule_id      => 8455,           p_withholding_allowances  => 100,           p_sit_additional_tax               => 10,           p_sit_exempt                              => 'N',           -- Output data elements           -- --------------------------------           p_object_version_number      => ln_object_version_number,           p_effective_start_date              => ld_effective_start_date,           p_effective_end_date               => ld_effective_end_date      );  COMMIT; EXCEPTION        WHEN OTHERS THEN                        ROLLBACK;                        dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API – Update Employee

    - by PRajkumar
    API - hr_person_api.update_person Example --   Before Firing Update API -- Middle Name and Status is NULL lets update Middle Name and Status     DECLARE     -- Local Variables     -- -----------------------     ln_object_version_number       PER_ALL_PEOPLE_F.OBJECT_VERSION_NUMBER%TYPE  := 7;      lc_dt_ud_mode                            VARCHAR2(100)                                                                                     := NULL;      ln_assignment_id                       PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_ID%TYPE          := 33564;      lc_employee_number                 PER_ALL_PEOPLE_F.EMPLOYEE_NUMBER%TYPE               := 'PRAJ_01';        -- Out Variables for Find Date Track Mode API     -- ----------------------------------------------------------------     lb_correction                                  BOOLEAN;      lb_update                                        BOOLEAN;      lb_update_override                      BOOLEAN;       lb_update_change_insert           BOOLEAN;    -- Out Variables for Update Employee API     -- -----------------------------------------------------------      ld_effective_start_date                       DATE;      ld_effective_end_date                        DATE;      lc_full_name                                         PER_ALL_PEOPLE_F.FULL_NAME%TYPE;      ln_comment_id                                    PER_ALL_PEOPLE_F.COMMENT_ID%TYPE;       lb_name_combination_warning    BOOLEAN;      lb_assign_payroll_warning             BOOLEAN;      lb_orig_hire_warning                        BOOLEAN; BEGIN     -- Find Date Track Mode     -- --------------------------------      dt_api.find_dt_upd_modes      (    -- Input Data Elements           -- ------------------------------           p_effective_date                           => TO_DATE('29-JUN-2011'),           p_base_table_name                    => 'PER_ALL_ASSIGNMENTS_F',           p_base_key_column                   => 'ASSIGNMENT_ID',           p_base_key_value                       => ln_assignment_id,           -- Output data elements           -- -------------------------------          p_correction                                   => lb_correction,          p_update                                         => lb_update,          p_update_override                       => lb_update_override,          p_update_change_insert            => lb_update_change_insert    );      IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )    THEN           -- UPDATE_OVERRIDE           -- ---------------------------------           lc_dt_ud_mode := 'UPDATE_OVERRIDE';    END IF;    IF ( lb_correction = TRUE )    THEN          -- CORRECTION          -- ----------------------          lc_dt_ud_mode := 'CORRECTION';    END IF;    IF ( lb_update = TRUE )    THEN         -- UPDATE         -- --------------          lc_dt_ud_mode := 'UPDATE';    END IF;       -- Update Employee API     -- ---------------------------------       hr_person_api.update_person     (       -- Input Data Elements             -- ------------------------------             p_effective_date                              => TO_DATE('29-JUN-2011'),             p_datetrack_update_mode         => lc_dt_ud_mode,             p_person_id                                     => 32979,             p_middle_names                            => 'TEST',             p_marital_status                             => 'M',             -- Output Data Elements             -- ----------------------------------            p_employee_number                       => lc_employee_number,            p_object_version_number              => ln_object_version_number,            p_effective_start_date                      => ld_effective_start_date,            p_effective_end_date                       => ld_effective_end_date,            p_full_name                                       => lc_full_name,            p_comment_id                                   => ln_comment_id,            p_name_combination_warning   => lb_name_combination_warning,            p_assign_payroll_warning           => lb_assign_payroll_warning,            p_orig_hire_warning                      => lb_orig_hire_warning     );      COMMIT; EXCEPTION        WHEN OTHERS THEN                    ROLLBACK;                    dbms_output.put_line(SQLERRM); END; / SHOW ERR;   After Firing Update Employee API -- Middle Name and Status  

    Read the article

  • Oracle HRMS APIs

    - by PRajkumar
    Oracle HRMS APIs..... Here I will be sharing all the Oracle HRMS APIs related articles. Item Type Author 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Create Employee API Update Employee API Create Employee Contact API Create Employee Address API Update Employee Address API Create Element Entries for Employee API Delete Element Entries for Employee API Rehire Employee API Create Employee Payment Method API Create and Update Employee Phone API Create and Update Employee Salary Proposal API Update Employee Fed Tax Rule API Create Employee State Tax Rule API Update Employee State Tax Rule API Update Employee Assignment API Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar

    Read the article

  • Oracle FND User APIs

    - by PRajkumar
    Oracle FND User APIs Here I will be sharing all the Oracle FND User APIs related articles. Item Type Author 1 2 3 Create Oracle FND User API Update Oracle FND User API Add/ End Date Responsibility For Oracle FND User API Puneet Rajkumar Puneet Rajkumar Puneet Rajkumar

    Read the article

  • D2K to OA Framework Transition

    - by PRajkumar
    What is the difference between D2K form and OA Framework? It is a very innocent but important question for someone that desires to make transition from D2K to OA Framework. I hope you have already read and implemented OA Framework Getting Started. I will re-visit my own experience of implementing HelloWorld program in "OA Framework". When I implemented HelloWorld a year ago, I had no clue as to what I was doing & why I was doing those steps. I merely copied the steps from Oracle Tutorial without understanding them. Hence in this blog, I will try to explain in simple manner the meaning of OA Framework HelloWorld Program and compare the steps to D2K form [where possible]. To keep things simple, only basics will be discussed. Following key Steps were needed for HelloWorld Step 1 Create a new Workspace and a new Project as dictated by Oracle's tutorial. When defining project, you will specify a default package, which in this case was oracle.apps.ak.hello This means the following: - ak is the short name of the Application in Oracle           [means fnd_applications.short_name] hello is the name of your project Step 2 Next, you will create a OA Page within hello project Think OA Page as the fmx file itself in D2K. I am saying so because this page gets attached to the form function. This page will be created within hello project, hence the package name oracle.apps.ak.hello.webui Note the webui, it is a convention to have page in webui, means this page represents the Web User Interface You will assign the default AM [OAApplicationModule]. Think of AM "Connection Manager" and "Transaction State Manager" for your page          I can't co-relate this to anything in D2k, as there is no concept of Connection Pooling and that D2k is not stateless. Reason being that as soon as you kick off a D2K Form, it connects to a single session of Oracle and sticks to that single Oracle database session. So is not the case in OAF, hence AM is needed. Step 3 You create Region within the Page. ·         Region is what will store your fields. Text input fields will be of type messageTextInput. Think of Canvas in D2K. You can have nested regions. Stacked Canvas in D2K comes the closest to this component of OA Framework Step 4 Add a button to one of the nested regions The itemStyle should be submitButton, in case you want the page to be submitted when this button is clicked There is no WHEN-BUTTON-PRESSED trigger in OAF. In Framework, you will add a controller java code to handle events like Form Submit button clicks. JDeveloper generates the default code for you. Primarily two functions [should I call methods] will be created processRequest [for UI Rendering Handling] and processFormRequest          Think of processRequest as WHEN-NEW-FORM-INSTANCE, though processRequest is very restrictive. Note What is the difference between processRequest and processFormRequest? These two methods are available in the Default Controller class that gets created. processFormRequest This method is commonly used to react/respond to the event that has taken place, for example click of a button. Some examples are if(oapagecontext.getParameter("Cancel") != null) (Do your processing for Cancellation/ Rollback) if(oapagecontext.getParameter("Submit") != null) (Do your validations and commit here) if(oapagecontext.getParameter("Update") != null) (Do your validations and commit here) In the above three examples, you could be calling oapagecontext.forwardImmediately to re-direct the page navigation to some other page if needed. processRequest In this method, usually page rendering related code is written. Effectively, each GUI component is a bean that gets initialised during processRequest. Those who are familiar with D2K forms, something like pre-query may be written in this method. Step 5 In the controller to access the value in field "HelloName" the command is String userContent = pageContext.getParameter("HelloName"); In D2k, we used :block.field. In OAFramework, at submission of page, all the field values get passed into to OAPageContext object. Use getParameter to access the field value To set the value of the field, use OAMessageTextInputBean field HelloName = (OAMessageTextInputBean)webBean.findChildRecursive("HelloName"); fieldHelloName.setText(pageContext,"Setting the default value" ); Note when setting field value in controller: Note 1. Do not set the value in processFormRequest Note 2. If the field comes from View Object, then do not use setText in controller Note 3. For control fields [that are not based on View Objects], you can use setText to assign values in processRequest method Lets take some notes to expand beyond the HelloWorld Project Note 1 In D2K-forms we sort of created a Window, attached to Canvas, and then fields within that Canvas. However in OA Framework, think of Page being fmx/Window, think of Region being a Canvas, and fields being within Regions. This is not a formal/accurate understanding of analogy between D2k and Framework, but is close to being logical. Note 2 In D2k, your Forms fmb file was compiled to fmx. It was fmx file that was deployed on mid-tier. In case of OAF, your OA Page is nothing but a XML file. We call this MDS [meta data]. Whatever name you give to "Page" in OAF, an XML file of the same name gets created. This xml file must then be loaded into database by using XML Importer command. Note 3 Apart from MDS XML file, almost everything else is merely deployed to your mid-tier. Usually this is underneath $JAVA_TOP/oracle/apps/../.. All java files will go underneath java top/oracle/apps/../.. etc. Note 4 When building tutorial, ignore the steps for setting "Attribute Sets". These are not mandatory. Oracle might just have developed their tutorials without including these. Think of these like Visual Attributes of D2K forms Note 5 Controller is where you will write any java code in OA Framework. You can create a Controller per Page or have a different Controller for each of the Regions with the same Page. Note 6 In the method processFormRequest of the Controller, you can access the values of the page by using notation pageContext.getParameter("<fieldname here>"). This method processFormRequest is executed when the OAF Screen/Page is submitted by click of a button. Note 7 Inside the controller, all the Database Related interactions for example interaction with View Objects happen via Application Module. But why so? Because Application Module Manages the transaction state of the Application. OAApplicationModuleImpl oaapplicationmoduleimpl = OAApplicationModuleImpl)oapagecontext.getApplicationModule(oawebbean); OADBTransaction oadbtransaction = OADBTransaction)oaapplicationmoduleimpl.getDBTransaction(); Note 8 In D2K, we have control block or a block based on database view. Similarly, in OA Framework, if the field does not have view Object attached, then it is like a control field. Hence in HelloWorld example, field HelloName is a control field [in D2K terminology]. A view Object can either be based on a view/table, synonym or on a SQL statement. Note 9 I wish to access the fields in multi record block that is based on view Object. Can I do this in Controller? Sure you can. To traverse through those records, do the below ·         Get the reference to the View Object using (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("VO Name Here") ·         Loop through the records in View Objects using count returned from oaviewobject.getFetchedRowCount() ·         For each record, fetch the value of the fields within the loop as oracle.jbo.Row row = oaviewobject.getRowAtRangeIndex(loop index here); (String)row.getAttribute("Column name of VO here ");

    Read the article

  • Oracle HRMS API – Update Employee Address

    - by PRajkumar
    API - hr_person_address_api.update_person_address   Example -- Consider Employee having Address Line1 -- "50 Main Street" Lets Update Address Line1 -- "60 Main Street" using update address API       DECLARE       ln_address_id                         PER_ADDRESSES.ADDRESS_ID%TYPE;       ln_object_version_number  PER_ADDRESSES.OBJECT_VERSION_NUMBER%TYPE := 1; BEGIN    -- Update Employee Address    -- ----------------------------------------     hr_person_address_api.update_person_address     (    -- Input data elements          -- -----------------------------          p_effective_date                     => TO_DATE('10-JUN-2011'),          p_address_id                          => 16406,          p_address_line1                    => '60 Main Street',          -- Output data elements          -- --------------------------------          p_object_version_number   => ln_object_version_number     );    COMMIT; EXCEPTION       WHEN OTHERS THEN                  ROLLBACK;                  dbms_output.put_line(SQLERRM); END; / SHOW ERR;      

    Read the article

  • Oracle HRMS API – Create Employee State Tax Rule

    - by PRajkumar
    API --  pay_state_tax_rule_api.create_state_tax_rule Example --   DECLARE     lc_dt_ud_mode                     VARCHAR2(100)     := NULL;      ln_assignment_id                 NUMBER                    := 33561;     lb_correction                            BOOLEAN;      lb_update                                 BOOLEAN;      lb_update_override               BOOLEAN;      lb_update_change_insert    BOOLEAN;     ln_emp_state_tax_rule_id   PAY_US_EMP_STATE_TAX_RULES_F.EMP_STATE_TAX_RULE_ID%TYPE;     ln_object_version_number  NUMBER;      ld_effective_start_date          DATE;      ld_effective_end_date           DATE; BEGIN       -- Find Date Track Mode       -- --------------------------------         dt_api.find_dt_upd_modes         (     p_effective_date                  => TO_DATE('12-JUN-2011'),               p_base_table_name            => 'PER_ALL_ASSIGNMENTS_F',               p_base_key_column          => 'ASSIGNMENT_ID',               p_base_key_value              => ln_assignment_id,               -- Output data elements               -- --------------------------------              p_correction                           => lb_correction,              p_update                                => lb_update,              p_update_override              => lb_update_override,              p_update_change_insert   => lb_update_change_insert        );      IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )    THEN       -- UPDATE_OVERRIDE       -- ---------------------------------       lc_dt_ud_mode := 'UPDATE_OVERRIDE';    END IF;      IF ( lb_correction = TRUE )    THEN       -- CORRECTION       -- ----------------------       lc_dt_ud_mode := 'CORRECTION';    END IF;      IF ( lb_update = TRUE )    THEN       -- UPDATE       -- --------------       lc_dt_ud_mode := 'UPDATE';    END IF;      -- Create Employee State Tax Rule    -- -----------------------------------------------     pay_state_tax_rule_api.create_state_tax_rule     (    -- Input Parameters          -- --------------------------          p_effective_date                         => TO_DATE('15-JUN-2011'),          p_default_flag                            => 'Y',          p_assignment_id                      => 33561,          p_state_code                               => '05',          -- Output Parameters          -- ----------------------------         p_emp_state_tax_rule_id        => ln_emp_state_tax_rule_id,         p_object_version_number       => ln_object_version_number,         p_effective_start_date               => ld_effective_start_date,         p_effective_end_date                => ld_effective_end_date   );    COMMIT; EXCEPTION           WHEN OTHERS THEN                        ROLLBACK;                         dbms_output.put_line(SQLERRM); END; / SHOW ERR;  

    Read the article

  • Oracle HRMS API – Update Employee Assignment

    - by PRajkumar
    To Update Supervisor, Manager Flag, Bargaining Unit, Labour Union Member Flag, Gre, Time Card, Work Schedule, Normal Hours, Frequency, Time Normal Finish, Time Normal Start, Default Code Combination, Set of Books Id API -- hr_assignment_api.update_emp_asg   To Update Grade, Location, Job, Payroll, Organization, Employee Category, People Group API -- hr_assignment_api.update_emp_asg_criteria   Example --   DECLARE    -- Local Variables    -- -----------------------    lc_dt_ud_mode           VARCHAR2(100)    := NULL;    ln_assignment_id       NUMBER                  := 33561;    ln_supervisor_id        NUMBER                  := 2;    ln_object_number       NUMBER                  := 1;    ln_people_group_id  NUMBER                  := 1;      -- Out Variables for Find Date Track Mode API    -- -----------------------------------------------------------------    lb_correction                           BOOLEAN;    lb_update                                 BOOLEAN;    lb_update_override              BOOLEAN;    lb_update_change_insert   BOOLEAN;       -- Out Variables for Update Employee Assignment API    -- ----------------------------------------------------------------------------    ln_soft_coding_keyflex_id       HR_SOFT_CODING_KEYFLEX.SOFT_CODING_KEYFLEX_ID%TYPE;    lc_concatenated_segments       VARCHAR2(2000);    ln_comment_id                             PER_ALL_ASSIGNMENTS_F.COMMENT_ID%TYPE;    lb_no_managers_warning        BOOLEAN;  -- Out Variables for Update Employee Assgment Criteria  -- -------------------------------------------------------------------------------  ln_special_ceiling_step_id                    PER_ALL_ASSIGNMENTS_F.SPECIAL_CEILING_STEP_ID%TYPE;  lc_group_name                                          VARCHAR2(30);  ld_effective_start_date                             PER_ALL_ASSIGNMENTS_F.EFFECTIVE_START_DATE%TYPE;  ld_effective_end_date                              PER_ALL_ASSIGNMENTS_F.EFFECTIVE_END_DATE%TYPE;  lb_org_now_no_manager_warning   BOOLEAN;  lb_other_manager_warning                  BOOLEAN;  lb_spp_delete_warning                          BOOLEAN;  lc_entries_changed_warning                VARCHAR2(30);  lb_tax_district_changed_warn             BOOLEAN;   BEGIN    -- Find Date Track Mode    -- --------------------------------    dt_api.find_dt_upd_modes    (    p_effective_date                  => TO_DATE('12-JUN-2011'),         p_base_table_name            => 'PER_ALL_ASSIGNMENTS_F',         p_base_key_column           => 'ASSIGNMENT_ID',         p_base_key_value               => ln_assignment_id,          -- Output data elements          -- --------------------------------          p_correction                          => lb_correction,          p_update                                => lb_update,          p_update_override              => lb_update_override,          p_update_change_insert   => lb_update_change_insert      );      IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )    THEN        -- UPDATE_OVERRIDE        -- ---------------------------------        lc_dt_ud_mode := 'UPDATE_OVERRIDE';    END IF;     IF ( lb_correction = TRUE )   THEN       -- CORRECTION       -- ----------------------      lc_dt_ud_mode := 'CORRECTION';   END IF;     IF ( lb_update = TRUE )   THEN       -- UPDATE       -- --------------       lc_dt_ud_mode := 'UPDATE';    END IF;     -- Update Employee Assignment   -- ---------------------------------------------  hr_assignment_api.update_emp_asg  ( -- Input data elements   -- ------------------------------   p_effective_date                              => TO_DATE('12-JUN-2011'),   p_datetrack_update_mode         => lc_dt_ud_mode,   p_assignment_id                            => ln_assignment_id,   p_supervisor_id                              => NULL,   p_change_reason                           => NULL,   p_manager_flag                              => 'N',   p_bargaining_unit_code              => NULL,   p_labour_union_member_flag   => NULL,   p_segment1                                       => 204,   p_segment3                                       => 'N',   p_normal_hours                              => 10,   p_frequency                                       => 'W',   -- Output data elements   -- -------------------------------   p_object_version_number             => ln_object_number,   p_soft_coding_keyflex_id              => ln_soft_coding_keyflex_id,   p_concatenated_segments             => lc_concatenated_segments,   p_comment_id                                   => ln_comment_id,   p_effective_start_date                      => ld_effective_start_date,   p_effective_end_date                        => ld_effective_end_date,   p_no_managers_warning               => lb_no_managers_warning,   p_other_manager_warning            => lb_other_manager_warning  );    -- Find Date Track Mode for Second API   -- ------------------------------------------------------   dt_api.find_dt_upd_modes   (  p_effective_date                   => TO_DATE('12-JUN-2011'),      p_base_table_name            => 'PER_ALL_ASSIGNMENTS_F',      p_base_key_column           => 'ASSIGNMENT_ID',      p_base_key_value               => ln_assignment_id,      -- Output data elements      -- -------------------------------      p_correction                           => lb_correction,      p_update                                 => lb_update,      p_update_override               => lb_update_override,      p_update_change_insert    => lb_update_change_insert   );     IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )   THEN     -- UPDATE_OVERRIDE     -- --------------------------------     lc_dt_ud_mode := 'UPDATE_OVERRIDE';   END IF;      IF ( lb_correction = TRUE )    THEN      -- CORRECTION      -- ----------------------      lc_dt_ud_mode := 'CORRECTION';   END IF;      IF ( lb_update = TRUE )    THEN      -- UPDATE      -- --------------      lc_dt_ud_mode := 'UPDATE';    END IF;    -- Update Employee Assgment Criteria  -- -----------------------------------------------------  hr_assignment_api.update_emp_asg_criteria  ( -- Input data elements   -- ------------------------------   p_effective_date                                   => TO_DATE('12-JUN-2011'),   p_datetrack_update_mode               => lc_dt_ud_mode,   p_assignment_id                                 => ln_assignment_id,   p_location_id                                        => 204,   p_grade_id                                             => 29,   p_job_id                                                  => 16,   p_payroll_id                                          => 52,   p_organization_id                               => 239,   p_employment_category                    => 'FR',   -- Output data elements   -- -------------------------------   p_people_group_id                              => ln_people_group_id,   p_object_version_number                   => ln_object_number,   p_special_ceiling_step_id                  => ln_special_ceiling_step_id,   p_group_name                                        => lc_group_name,   p_effective_start_date                           => ld_effective_start_date,   p_effective_end_date                             => ld_effective_end_date,   p_org_now_no_manager_warning  => lb_org_now_no_manager_warning,   p_other_manager_warning                 => lb_other_manager_warning,   p_spp_delete_warning                         => lb_spp_delete_warning,   p_entries_changed_warning              => lc_entries_changed_warning,   p_tax_district_changed_warning     => lb_tax_district_changed_warn  );    COMMIT; EXCEPTION          WHEN OTHERS THEN                       ROLLBACK;                       dbms_output.put_line(SQLERRM); END; / SHOW ERR;    

    Read the article

1 2  | Next Page >