X

Recent Posts

API to Create External Bank Branch

API - IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH Example --    -- API to Create External Bank Branch  DECLARE     p_api_version    NUMBER                   := 1.0;     p_init_msg_list  VARCHAR2(1)          := 'F';     v_bank_id           NUMBER                   := 530705;      x_return_status  VARCHAR2(2000);     x_msg_count      NUMBER(5);     x_msg_data        VARCHAR2(2000);     x_branch_id        NUMBER;     p_count               NUMBER;     x_response         iby_fndcpt_common_pub.result_rec_type;     p_ext_bank_branch_rec iby_ext_bankacct_pub.extbankbranch_rec_type;BEGIN       dbms_output.put_line ('BEFORE BANK BRANCH API');        p_ext_bank_branch_rec.bch_object_version_number  := 1.0;      p_ext_bank_branch_rec.branch_name        := 'TEST BANK BRANCH';      p_ext_bank_branch_rec.branch_type          := 'ABA';      p_ext_bank_branch_rec.bank_party_id      := v_bank_id;      IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH     (    -- -----------------------------          -- Input data elements          -- -----------------------------          p_api_version                  => p_api_version,          p_init_msg_list                => p_init_msg_list,          p_ext_bank_branch_rec  => p_ext_bank_branch_rec,          -- --------------------------------          -- Output data elements           -- --------------------------------          x_branch_id                     => x_branch_id,          x_return_status               => x_return_status,          x_msg_count                   => x_msg_count,          x_msg_data                     => x_msg_data,          x_response                      => x_response      );     dbms_output.put_line ('x_branch_id = ' || x_branch_id);     IF (x_msg_count = 1)      THEN              dbms_output.put_line ('x_msg_data ' || x_msg_data);     ELSIF (x_msg_count > 1)     THEN               LOOP                      p_count := p_count + 1;                      x_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next, fnd_api.g_false);                    IF (x_msg_data IS NULL)                    THEN                             EXIT;                    END IF;                   dbms_output.put_line ('Message' || p_count || ' ---' || x_msg_data);               END LOOP;      END IF;         COMMIT;EXCEPTION              WHEN OTHERS THEN                           ROLLBACK;                            dbms_output.put_line(SQLERRM);END;/ SHOW ERR; 

API - IBY_EXT_BANKACCT_PUB.CREATE_EXT_BANK_BRANCH Example --    -- API to Create External Bank Branch   DECLARE     p_api_version    NUMBER                   := 1.0;     p_init_msg_list  VARCHAR2(1)        ...

API to Create Bank

API - IBY_EXT_BANKACCT_PUB.create_ext_bank Example --   -- API to Create Bank  DECLARE   lc_output                VARCHAR2(3000);   lc_msg_dummy     VARCHAR2(3000);   lc_return_status     VARCHAR2(3000);   lc_msg_data           VARCHAR2(3000);   ln_bank_id             NUMBER;   ln_msg_count        NUMBER;   lr_extbank_rec       apps.iby_ext_bankacct_pub.extbank_rec_type;   lr_response_rec     apps.iby_fndcpt_common_pub.result_rec_type;BEGIN   lc_return_status    := '';   ln_msg_count       := '';   lc_msg_data          := '';    lr_extbank_rec.bank_name       := 'Test Supp Bank';   lr_extbank_rec.bank_number   := 'TSB0000001';   lr_extbank_rec.country_code    := 'IN';   apps.fnd_msg_pub.delete_msg(NULL);   apps.fnd_msg_pub.initialize();   IBY_EXT_BANKACCT_PUB.create_ext_bank   (       -- ------------------------------           -- Input data elements           -- ------------------------------           p_api_version       => 1.0,           p_init_msg_list     => FND_API.G_TRUE,           p_ext_bank_rec     => lr_extbank_rec,           -- --------------------------------           -- Output data elements           -- --------------------------------           x_bank_id            => ln_bank_id,           x_return_status   => lc_return_status,           x_msg_count       => ln_msg_count,           x_msg_data         => lc_msg_data,           x_response          => lr_response_rec     );      lc_output := ' ';     IF (lc_return_status <> 'S')     THEN               FOR i IN 1 .. ln_msg_count               LOOP                            apps.fnd_msg_pub.get                            (       i,                                    apps.fnd_api.g_false,                                    lc_msg_data,                                    lc_msg_dummy                             );                               lc_output := lc_output ||                                                  (TO_CHAR (i) ||                                                                       ': '  ||                                                   SUBSTR (lc_msg_data, 1, 250));             END LOOP;             apps.fnd_file.put_line            (apps.fnd_file.output, 'Error Occured while Creating Bank: ');       END IF;      COMMIT; EXCEPTION          WHEN OTHERS THEN                        ROLLBACK;                         dbms_output.put_line(SQLERRM);END;/  SHOW ERR;

API - IBY_EXT_BANKACCT_PUB.create_ext_bank Example --    -- API to Create Bank   DECLARE   lc_output                VARCHAR2(3000);    lc_msg_dummy     VARCHAR2(3000);   lc_return_status   ...

API to Create AP Supplier Site

API - pos_vendor_pub_pkg.create_vendor_site Example --  -- API to Create Supplier SiteDECLARE l_vendor_site_rec      ap_vendor_pub_pkg.r_vendor_site_rec_type; lc_return_status         VARCHAR2(10); ln_msg_count            NUMBER; lc_msg_data               VARCHAR2(1000); ln_vendor_site_id     NUMBER; ln_party_site_id         NUMBER; ln_location_id            NUMBER;BEGIN         -- ---------------         -- Required          -- ---------------        l_vendor_site_rec.vendor_id               := 40169;        l_vendor_site_rec.vendor_site_code  := 'Supplier_Site';        l_vendor_site_rec.address_line1         := '05 Main Street';        l_vendor_site_rec.city                           := 'New York';        l_vendor_site_rec.country                    := 'US';        l_vendor_site_rec.org_id                      := 202;         -- --------------         -- Optional         -- --------------        l_vendor_site_rec.purchasing_site_flag  :='N';        l_vendor_site_rec.pay_site_flag                :='N';         l_vendor_site_rec.rfq_only_site_flag       :='N';         pos_vendor_pub_pkg.create_vendor_site        (               -- ------------------------------              -- Input data elements              -- ------------------------------              p_vendor_site_rec    => l_vendor_site_rec,              -- ---------------------------------              -- Output data elements              -- ---------------------------------              x_return_status         => lc_return_status,              x_msg_count             => ln_msg_count,              x_msg_data                => lc_msg_data,              x_vendor_site_id      => ln_vendor_site_id,              x_party_site_id         => ln_party_site_id,              x_location_id            => ln_location_id        );         COMMIT; EXCEPTION         WHEN OTHERS THEN                        ROLLBACK;                        DBMS_OUTPUT.PUT_LINE(SQLERRM);END; /SHOW ERR;  

API - pos_vendor_pub_pkg.create_vendor_site   Example --  -- API to Create Supplier Site DECLARE l_vendor_site_rec      ap_vendor_pub_pkg.r_vendor_site_rec_type;  lc_return_status         VARCHAR2(10); ln_...

Create Data Entry Form in ADF

1. Create a New Application File > New > Applications > Fusion Web Application (ADF) Application Name – DataEntryApplication Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.DataEntryApp         \       2. We need to have table where Data will be saved. Lets Create a table      CREATE TABLE data_entry_test      (     Column1   VARCHAR2(100),            Column2   VARCHAR2(100)      );   3. Create EO for Page (Entity Object) Right Click on Model > New > ADF Business Components > Entity Object   Package -- Demo.adf.DataEntryApp.model Name – DataEntryEO Schema Object – DATA_ENTRY_TEST         Note – By default ROWID will be the primary key if we will not make any column to be primary key in Attribute Setting Page   Check the Accessors, Create Method, and Remove Method     Check “Generate Default View Object CheckBox” Package – Demo.adf.DataEntryApp.model.queries Name – DataEntryVO     Check “Application Module” Checkbox Package – Demo.adf.DataEntryApp.model.services Name – DataEntryAM       4. Create JSF Page for Data Entry Page Create a JSF Page Right Click on ViewController > New > Web Tier > JSF > JSF Page File Name – DataEntry.jspx Initial Page Layout and Content – Quick Start Layout Expand Page Implementation region and select Automatically Expose UI Components in a New Managed Bean     Select DataControls > DataEntryAMDataControl > DataEntryVO1 and drag to jspx page and choose Form > ADF Form. Choose the fields as shown in the slide       Remove RowID row     5. Add Commit and Create Operations in Page Select DataControls > DataEntryAMDataControl > Operations Drag Commit Operation in page Similarly Select DataControls > DataEntryAMDataControl > DataEntryVO1 > Operations Drag Create Operation in page       Select option ADF Button     6. Select Commit button and make field Disabled in properties to be NULL       7. Congratulation you have successfully finished Data Entry ADF Form. Test Your Work     Click on Create Button       Enter Data and Click Commit Button   Check backend table

1. Create a New Application File > New > Applications > Fusion Web Application (ADF) Application Name – DataEntryApplication Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package...

API to Create AP Supplier

API - pos_vendor_pub_pkg.create_vendor Example --   -- API to Create SupplierDECLARE   l_vendor_rec       ap_vendor_pub_pkg.r_vendor_rec_type;   l_return_status   VARCHAR2(10);   l_msg_count       NUMBER;   l_msg_data         VARCHAR2(1000);   l_vendor_id        NUMBER;   l_party_id           NUMBER;BEGIN   -- --------------   -- Required   -- --------------   l_vendor_rec.segment1          := '0000235916';   l_vendor_rec.vendor_name   := 'TEST_SUPP';    -- -------------   -- Optional   -- --------------   l_vendor_rec.match_option  :='R';    pos_vendor_pub_pkg.create_vendor   (    -- -------------------------        -- Input Parameters        -- -------------------------        p_vendor_rec      => l_vendor_rec,        -- ----------------------------        -- Output Parameters        -- ----------------------------        x_return_status   => l_return_status,        x_msg_count       => l_msg_count,        x_msg_data         => l_msg_data,        x_vendor_id        => l_vendor_id,        x_party_id           => l_party_id   );    COMMIT;EXCEPTION      WHEN OTHERS THEN                   ROLLBACK;                   DBMS_OUTPUT.PUT_LINE(SQLERRM);END;/SHOW ERR; 

API - pos_vendor_pub_pkg.create_vendor Example --     -- API to Create Supplier DECLARE   l_vendor_rec       ap_vendor_pub_pkg.r_vendor_rec_type;    l_return_status   VARCHAR2(10);   l_msg_count     ...

OTBI vs. OBIA

 What are the differences between OTBI and OBIA? OTBI -- Oracle Transactional Business IntelligenceOBIA – 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 Solution2. 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 warehouse3. It allows consolidating the data from various sources to bring them together4. It provides a library of metrics that help to measure business5. It provides set of predefined reports and dashboards6. OBIA works for multiple sources including E-Business Suite, PeopleSoft, JDE, SAP and FUSION Applications  OTBI1. It is a real time BI2. There is no warehouse or ETL process for OTBI3. It is a Fusion Apps only4. OTBI leveraging the advanced technologies from both BI platform and ADF to enable the online BI queries against database directly5. 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 OnlyOBIA OnlyOTBI and OBIA coexist  Both OTBI and OBIA are accessing Fusion Apps via the ADF

  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 Application in DMZ (Demilitarized Zone)

 Business Needs Large Organizations want to expose their Oracle Application services outside their private network (HTTP/HTTPS and SSL). Usually these exposures must exist to promote external communication. So they want to separate an external network from directly referencing an internal network Business Challenges ·         Business does not want to compromise with security information·         Business cannot expose internal domain or internal URL information Business SolutionDMZ is the solution of this problem. In Oracle application we can achieve this by following way – ·         Oracle Application consists of fleet nodes (FND_NODES) so first decide which node have to expose to public·         To expose the node to public use the profile “Node Trust Level”·         Set node to Public/Private (Normal -> private, External -> public) ·         Set "Responsibility Trust Level" profile to decide whether to expose Application Responsibility to inside or outside firewall    Solution Features   ·         Exposed web services can be accessed by both internal and external users·         Configurable and can be very easily rolled out·         Internal network and business data is secured from outside traffic·         Unauthorized access to internal network from outside is prohibited·         No need for VPN and Secure FTP server Benefits  ·       Large Organizations having Oracle Application can expose their web services like (HTTP/HTTPS and SSL) to the internet without compromise with security information and without exposing their internal domain Possible Week Points ·         If external firewall is compromised, then external application server is also compromised, exposing an attack on E-Business Suite database·         There’s nothing to prevent internal users from attacking internal application server, also exposing an attack on E-Business Suite database Reference Links ·         https://blogs.oracle.com/manojmadhusoodanan/tags/dmz

 Business Needs Large Organizations want to expose their Oracle Application services outside their private network (HTTP/HTTPS and SSL). Usually these exposures must exist to promote...

Compare Technical Terms in Oracle Apps with Real Time Example

The below example explains a few of the important terms and concepts used in the Oracle E-Business Suite. This would be a good starting point for the beginners to better understand the concepts behind Oracle Applications. Say Puneet is the owner of a wholesale fruit shop. He buys various fruits like apples, oranges, mangos and grapes etc from farmers directly and sells them to retail shop owners and also to the direct customers. The farmers are referred to as VENDORS / SUPPLIERS in Oracle Applications. Puneet keeps track of all his vendors’ information like addresses, bank account and the amount he owes to them for the fruits that he bought etc, in a book named PAYABLES.Puneet gets an order from a retail shop owner of Fruit Mart, for a shipment of 11 bags of apples, 25 bags of oranges and 32 KGS of grapes. In Oracle Apps, bags and KGS are referred to as UOM (unit of measure), Fruit Mart is called CUSTOMER and the order is referred to as SALES ORDER. Puneet maintains a book called ORDER MANAGEMENT where he writes down all the details of the SALES ORDERS that he gets from his customers. Say the fruits have been shipped to the customer Fruit Mart. Puneet now sends him the details like cost of each bag/fruit, the total amount that the customer has to pay etc on a piece of paper which is called INVOICE / TRANSACTION. Once the INVOICE has been sent over, the customer then validates this against the actual quantity of fruits that he received and will process the payments accordingly. The invoice amount could be paid as a single amount or could be paid in installments. Puneet’s customer, Fruit Mart pays him in installments (partial payments). So Puneet has to make a note of the details like date received, amount received, amount remaining, amount received for what goods/shipments/invoice etc, when Puneet receives the payments. This detail is called RECEIPT, which will be compared to the invoice by Puneet to find how much Fruit Mart has paid to him and how much has to be paid yet. This information is maintained in a book named RECEIVABLES to keep track of all the customers, their addresses (to ship the items), what and how much he has shipped to his customers and the amount his customers owe him etc. Puneet’s fruit business has begun to improve and has attracted more and more customers. As a result, Puneet decided to buy a cold storage unit where he could stock more fruits. In Apps, this cold storage unit is known as WAREHOUSE and all the fruits are referred to as INVENTORY.  Due to increase in customers, Puneet needs to hire more people to help him out in his business without any hiccups. These workers are called EMPLOYEES. At the end of every month, Puneet pays the salary for all his employees through Checks. These checks are nothing but PAYROLL in Apps. At the end of every month, Puneet prepares a balance sheet in a book called GENERAL LEDGER to determine how much profit/loss he got and keeps track of the money going out and going in.  As the business grows, it becomes impossible to record everything on a paper. To make everybody’s life easier, Oracle has very good tools in the market, which help the business men to keep track of everything. One such tool is Oracle E-Business Suite.   Oracle Applications is not a single application, but is a collection of integrated applications. Each application is referred to as a module and has its own functionality trying to serve a business purpose. Few of the modules are Purchasing, Accounts Payables, Accounts Receivables, Inventory, Order Management, Human Resources, General Ledger, and Fixed Assets etc.

The below example explains a few of the important terms and concepts used in the Oracle E-Business Suite. This would be a good starting point for the beginners to better understand the concepts behind...

Oracle AP Invoice APIs

These APIs are handful when you want to do Insert, Update or Delete programmatically for some business requirements (rare cases!)  API NameProcedure NameDescriptionAP_AI_TABLE_HANDLER_PKGinsert_rowInserts a row in AP_INVOICES_ALL update_rowUpdates a row in AP_INVOICES_ALL delete_rowDeletes a row in AP_INVOICES_ALL. Also subsequently delete rows in the related tables like AP_INVOICE_LINES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL, AP_PAYMENT_SCHEDULES_ALL, AP_HOLDS_ALL and AP_SELF_ASSESSED_TAX_DIST_ALL   API NameProcedure NameDescriptionAP_AIL_TABLE_HANDLER_PKGcheck_uniqueCheck the Uniqueness of a Rowinsert_rowInserts a row in AP_INVOICE_LINES_ALLupdate_rowUpdates a row in AP_INVOICE_LINES_ALL delete_rowDeletes a row in AP_INVOICE_LINES_ALL. Also subsequently delete rows in the related tables like AP_INVOICE_DISTRIBUTIONS_ALL   API NameProcedure NameDescriptionAP_AID_TABLE_HANDLER_PKGcheck_uniqueCheck the Uniqueness of a Rowinsert_rowInserts a row in AP_INVOICE_DISTRIBUTIONSupdate_rowUpdates a row in AP_INVOICE_DISTRIBUTIONSdelete_rowDeletes a row in AP_INVOICE_DISTRIBUTIONS   API NameProcedure NameDescriptionAP_AIP_TABLE_HANDLER_PKGinsert_rowInserts a row in AP_INVOICE_PAYMENTSupdate_amountsUpdate amounts in AP_INVOICE_PAYMENTS   API NameProcedure NameDescriptionAP_AC_TABLE_HANDLER_PKGinsert_rowInserts a row in AP_CHECKS_ALLupdate_rowUpdates a row in AP_CHECKS delete_rowDeletes a row in AP_CHECKSupdate_amountsUpdate amounts in AP_CHECKS 

These APIs are handful when you want to do Insert, Update or Delete programmatically for some business requirements (rare cases!)   API Name Procedure Name Description AP_AI_TABLE_HANDLER_PKG insert_row Inser...

Entity Object Extension in OAF

In the exercise we have taken “Create Data Entry OAF Page“can be found @https://blogs.oracle.com/prajkumar/entry/insert_data_oaf_page We are going to extend InsertEO. Our business requirement is to add Validation on Column1. The length of entered data in Column1 should be more than 5 Characters.  1. FTP this project from application server and open in JDeveloper 2. Create a New Entity Object (EO)Right click on InsertDemo > New > ADF Business Components > Entity Object Name – ExtInsertEOPackage -- prajkumar.oracle.apps.fnd.insertdemo.schema.serverExtends -- prajkumar.oracle.apps.fnd.insertdemo.schema.server.InsertEO    Click on Next - > New from Table  Include all the attributes of parent EO  Next -> Next Check Validation Method check box and Finish  3. Add following code in ExtInsertEOImpl.java import oracle.apps.fnd.framework.OAException; protected void validateEntity(){ super.validateEntity(); String column1Value = getColumn1(); if (column1Value.length() < 5) {  String message = "Length of String" + " " + column1Value + "is less than 5 characters";  throw new OAException(message, OAException.INFORMATION); }} 4. Substitute your New EO with parent EORight click on InsertDemo > Project Properties > Business Components > SubstitutionsIn Available list select InsertEO and in Substitute list select New EO ExtInsertEO and click on Add and then Ok  5. After substitution import *.jpxIn our case it will modify InsertDemo.jpx at project locationi.e. -- D:\xxxx\jdevhome\jdev\myclasses Open Command Prompt and go to following location of your project D:\xxxx\jdevbin\oaext\binUse this Import Command to import jpx  6. Bounce the server 7. Verify the substitution has applied properlyRun InsertPG page and click on About this Page link   Expand Business Component References DetailsUnder that section click on InsertVO which is EO based [it should be ExtInsertEO based]    8. Congratulation you have successfully finished. Run Your InsertPG page and Test Your Work   

In the exercise we have taken “Create Data Entry OAF Page“can be found @ https://blogs.oracle.com/prajkumar/entry/insert_data_oaf_page   We are going to extend InsertEO. Our business requirement is to...

End Date Responsibility for Oracle FND User

API - fnd_user_pkg.delrespExample --Consider FND_USER = ‘PRAJKUMAR’ having responsibility ‘Application Developer’  Let us try to END_DATE ‘Application Developer’ Responsibility with fnd_user_pkg.delresp API-- ------------------------------------------------------------------- End Date Responsibility from Oracle FND User-- -----------------------------------------------------------------DECLARE   v_user_name                   VARCHAR2 (100) := 'PRAJKUMAR';   v_responsibility_name   VARCHAR2 (100) := 'Application Developer';   v_application_name        VARCHAR2 (100) := NULL;   v_responsibility_key        VARCHAR2 (100) := NULL;   v_security_group              VARCHAR2 (100) := NULL;BEGIN   SELECT  fa.application_short_name,                     fr.responsibility_key,                     frg.security_group_key    INTO        v_application_name,                      v_responsibility_key,                      v_security_group    FROM      fnd_responsibility       fr,                     fnd_application            fa,                     fnd_security_groups  frg,                     fnd_responsibility_tl   frt     WHERE  fr.application_id               = fa.application_id     AND        fr.data_group_id             = frg.security_group_id     AND        fr.responsibility_id          = frt.responsibility_id     AND        frt.LANGUAGE                 = USERENV ('LANG')     AND        frt.responsibility_name  = v_responsibility_name;      fnd_user_pkg.delresp      (    username           => v_user_name,           resp_app            => v_application_name,           resp_key             => v_responsibility_key,            security_group   => v_security_group       );     COMMIT;      DBMS_OUTPUT.put_line (   'Responsiblity '        || v_responsibility_name        || ' is removed from the user '        || v_user_name        || ' Successfully'        );EXCEPTION     WHEN OTHERS THEN              DBMS_OUTPUT.put_line               (   'Error encountered while deleting responsibilty from the user and the error is '                    || SQLERRM                );END; / After API Run --  

API - fnd_user_pkg.delresp Example -- Consider FND_USER = ‘PRAJKUMAR’ having responsibility ‘Application Developer’     Let us try to END_DATE ‘Application Developer’ Responsibility with...

EO based VO Extension in OAF

In the exercise we have taken “OAF Search Page“can be found @https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page We are going to extend SearchVO of SearchPG page. Our business requirement is to add Creation Date attribute in the results table region  1. Analyze the PageClick on “About this Page” link to check that which ViewObject is associated with the table region [ResultsRN]    Here we can see that results table has SearchVO attached to it. Now click on Business Component Reference details and check the path of SearchVO  Now click on SearchVO which is an EO based [SearchEO] to check whether it has Creation Date attribute or not which we want to add  Here we can see that our VO does not have CreationDate attribute.So for adding this attribute we need to perform VO Extension.FTP this project from application server and open in JDeveloper 2. Create a New View Object (VO)Right click on SearchDemo > New > ADF Business Components > View ObjectPackage -- prajkumar.oracle.apps.fnd.searchdemo.serverName – ExtSearchVOExtends -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchVO  The next screen allows the addition or deletion of Entity Objects. No change is required here for this extension so simply select Next  The next pane allows additional attributes to be added or attributes to be removed. In this case add CreationDate attributes to the selected list Note -- Please note the new attribute you would be adding will be coming as Transient Click on Next -> Next  Modify above SQL statement with below SQL to add new attribute CREATION_DATE SELECT  SearchEO.COLUMN1,                SearchEO.COLUMN2,                SearchEO.ROWID,                SearchEO.CREATION_DATEFROM     XX_SEARCH_DEMO     SearchEO Click on Next -> NextGenerate ExtSearchVORowImpl   Click Finish  Note -- Now as our attribute created as Transient hence to fix this issue we have two options:1. We need to correct our XML file generated as it is a known error with Jdeveloper2. Double click on that attribute i.e CreationDate and in the View Object Attribute window, enter attribute name in 'Expression' column i.e. CreationDate Lets try first method --Open your ExtSearchVO.xml file in some notepad editor.Scroll to bottom of that fileUpdate with  3. Substitute your New VO with parent VORight click on SearchDemo > Project Properties > Business Components > SubstitutionsIn Available list select SearchVO and in Substitute list select New VO ExtSearchVO and click on Add and then Ok  4. After substitution import *.jpxIn our case it will modify SearchDemo.jpx at project location i.e. -- D:\xxxx\jdevhome\jdev\myclassesOpen Command Prompt and go to following location of your projectD:\xxxx\jdevbin\oaext\bin Use this Import Command to import jpx 5. Personalize the page to create new itemOn SearchPG click on Personalize Page linkSelect Complete View Radio Button  Click on Create Item on Table: (ResultTable)  Set item style as messageStyledTextSet Following PropertiesId – CreationDateIdData Type -- DatePrompt – Creation DateView Instance – ExtSearchVO1View Attribute – CreationDate  Click Apply > Return to Application 6. Congratulation you have successfully finished. Run Your SearchPG page and Test Your WorkNote -- You can notice page has new Column with name Creation Date   

In the exercise we have taken “OAF Search Page“can be found @ https://blogs.oracle.com/prajkumar/entry/create_oaf_search_page   We are going to extend SearchVO of SearchPG page. Our business requirement...

Set Default Value for messageTextInput in OAF

1. Create a New OA Workspace and Empty OA ProjectFile > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarSetDefaultValDemo Automatically a new OA Project will also be created Project Name -- SetDefaultProj Default Package -- prajkumar.oracle.apps.fnd.setdefaultproj 2. Create Application Module AMRight Click on SetDefaultProj > New > ADF Business Components > Application Module Name -- SetDefaultAMPackage -- prajkumar.oracle.apps.fnd.setdefaultproj.serverCheck Application Module Class: SetDefaultAMImpl Generate JavaFile(s) 3. Create a OA components PageRight click on SetDefaultProj > New > Web Tier > OA Components > PageName -- SetDefaultPGPackage -- prajkumar.oracle.apps.fnd.setdefaultproj.webui 4. Select SetDefaultPG and go to the strcuture pane where a default region has been created 5. Select region1 and set the following properties:  AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitleSet Default Value Window TitleTitleSet Default Value HeaderAM Definitionprajkumar.oracle.apps.fnd.setdefaultproj.SetDefaultAM 6. Create the Second RegionRight click on PageLayoutRN > New > Region  AttributePropertyIDMainRNRegion StylemessageComponentLayout7. Create messageTextInputMainRN > New > messageTextInput  AttributePropertyIDMyTextitemIdStyle PropertymessageTextInputLength20Maximum Length50 8. Save Your Work 9. Add a ControllerMainRN > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.setdefaultvaldemo.webuiClass Name -- SetDefaultValCO 10. Edit Your ControllerAdd Following Code in processRequest import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;public void processRequest(OAPageContext pageContext, OAWebBean webBean){ super.processRequest(pageContext, webBean); String myValue = "My Default Value"; OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId"); textBean.setValue(pageContext, myValue);} 11. Test Your Work 

1. Create a New OA Workspace and Empty OA Project File > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarSetDefaultValDemo   Automatically a new OA Project will also...

Application Module Extension in OAF

Like the Controller extension, AM extension is also not supported by Oracle. However for some business needs we have to extend it sometimes.In this exercise we have taken our “Data Entry OAF page” can be found @ https://blogs.oracle.com/prajkumar/entry/insert_data_oaf_page to extend application module i.e. InsertAMThis AM can be found under below BC4J package prajkumar.oracle.apps.fnd.insertdemo.server.InsertAM Why we are extending AM:-This InsertAM contains an apply method which subsequently commits the transaction.public void apply() {  getTransaction().commit();}Our business need is to capture user name and user id at runtime and insert it into a custom audit table for audit purpose Here is Audit Table script --CREATE TABLE xx_audit (   -- -------------------    -- Data Columns    -- --------------------     user_id                  VARCHAR(50),     user_name            VARCHAR(50),     -- -------------------    -- 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); Steps to Extend Application Module (AM)1. Create a New Application Module (AM)Right Click on InsertDemo > New > ADF Business Components > Application Module Package -- prajkumar.oracle.apps.fnd.insertdemo.serverName -- ExtendedAMExtends -- prajkumar.oracle.apps.fnd.insertdemo.server.InsertAM      Write following code in ExtendedAMImpl.javaimport oracle.apps.fnd.framework.OAException;import java.sql.PreparedStatement;import java.sql.Connection;public class ExtendedAMImpl extends InsertAMImpl{  ....  public void apply()  {   java.sql.Date d = getOADBTransaction().getCurrentDBDate().dateValue();   try    {     Connection conn = getOADBTransaction().getJdbcConnection();   String Query = "insert into xx_audit values(:1,:2,:3,:4,:5,:6,:7)";   PreparedStatement stmt = conn.prepareStatement(Query);      stmt.setInt(1, getOADBTransaction().getUserId());   stmt.setString(2, getOADBTransaction().getUserName());   stmt.setDate(3, d);   stmt.setInt(4, getOADBTransaction().getUserId());   stmt.setDate(5, d);   stmt.setInt(6, getOADBTransaction().getUserId());   stmt.setInt(7, getOADBTransaction().getUserId());   stmt.execute();  }    catch(Exception exception)  {   throw new OAException("Error in Staffing Query"+exception, OAException.ERROR);    }   super.apply();  } } 2. Perform AM SubstitutionDouble Click on InsertDemo.jpxBusiness Components > Substitutions   3. After substitution it will modify *.jpxIn our case it will modify InsertDemo.jpx at project locationi.e. -- D:\xxxx\jdevhome\jdev\myclasses 4. Migrate/ Import the modified jpxOpen Command Prompt and go to following location of your project D:\xxxx\jdevbin\oaext\bin Use this Import Command to import jpx     5. Congratulation you have successfully finished. Run Your InsertPG page and Test Your Work         

Like the Controller extension, AM extension is also not supported by Oracle. However for some business needs we have to extend it sometimes. In this exercise we have taken our “Data Entry OAF page” can...

Import Data from *.xlsx file to DB Table through OAF page

1. Create a New Workspace and ProjectFile > 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 following JAR files to Apache Library1. poi-ooxml-3.7.jarhttp://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.poi/poi-ooxml/3.7  2. ooxml-schemas-1.1.jarhttp://mvnrepository.com/artifact/org.apache.poi/ooxml-schemas/1.1  3. stax-api-1.0.1.jarhttp://www.jarfinder.com/index.php/jars/versionInfo/69009  4. log4j-1.2.16.jarhttp://mvnrepository.com/artifact/log4j/log4j/1.2.16  5. poi-ooxml-schemas-3.7.jarhttp://mavenhub.com/mvn/central/org.apache.poi/poi-ooxml-schemas/3.7  6. poi-3.7-20101029.jarhttp://mvnrepository.com/artifact/org.apache.poi/poi/3.7-beta1  7. xmlbeans-2.4.0.jarhttp://www.jarfinder.com/index.php/jars/versionInfo/14387  8. dom4j-1.6.1.jarhttp://grepcode.com/snapshot/repo1.maven.org/maven2/dom4j/dom4j/1.6.1   Steps to add JAR files in Local MachineRight Click on ImportxlsDemo > Project Properties > Libraries > Add jar/Directory and browse to directory where all JAR files have been downloaded and select the JAR files    Click here to know Steps to Add JAR file into R12 server in OA 3. Create a New Application Module (AM)Right Click on ImportxlsDemo > New > ADF Business Components > Application Module Name -- ImportxlsAMPackage -- prajkumar.oracle.apps.fnd.importxlsdemo.serverCheck Application Module Class: ImportxlsAMImpl Generate JavaFile(s) 4. Create Test Table in which we will insert data from *.xlsx fileCREATE 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 ObjectName – ImportxlsEOPackage -- prajkumar.oracle.apps.fnd.importxlsdemo.schema.serverDatabase 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 ObjectName -- ImportxlsVOPackage -- prajkumar.oracle.apps.fnd.importxlsdemo.server In Step2 in Entity Page select ImportxlsEO and shuttle it to selected listIn Step3 in Attributes Window select all columns and shuttle them to selected list In Java pageSelect Generate Java File for View Object Class: ImportxlsVOImpl -> Generate Java File -> Bind Variable AccessorsSelect Generate Java File for View Row Class: ImportxlsVORowImpl -> Generate Java File -> Accessors 7. Add Your View Object to Root UI Application ModuleRight click on ImportxlsAM > Edit ImportxlsAM > Data Model >Select ImportxlsVO and shuttle to Data Model list 8. Create a New PageRight click on ImportxlsDemo > New > Web Tier > OA Components > PageName -- ImportxlsPGPackage -- 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:  AttributePropertyIDPageLayoutRNAM Definitionprajkumar.oracle.apps.fnd.importxlsdemo.server.ImportxlsAMWindow TitleImport Data From Excel(*.xlsx) through OAF Page Demo WindowTitleImport Data From Excel(*.xlsx) through OAF Page Demo 11. Create messageComponentLayout Region Under Page Layout RegionRight click PageLayoutRN > New > Region  AttributePropertyIDMainRNItem StylemessageComponentLayout 12. Create a New Item messageFileUpload Bean under MainRNRight click on MainRN > New > messageFileUploadSet Following Properties for New Item --  AttributePropertyIDMessageFileUploadItem StylemessageFileUpload 13. Create a New Item Submit Button Bean under MainRNRight click on MainRN > New > messageLayoutSet Following Properties for messageLayout --  AttributePropertyIDButtonLayout Right Click on ButtonLayout > New > Item  AttributePropertyIDGoItem StylesubmitButtonAttribute Set/oracle/apps/fnd/attributesets/Buttons/Go 14. Create Controller for page ImportxlsPGRight Click on PageLayoutRN > Set New ControllerPackage Name: prajkumar.oracle.apps.fnd.importxlsdemo.webuiClass Name: ImportxlsCO Write Following Code in ImportxlsCO in processFormRequestimport 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); OAApplicationModule am = pageContext.getApplicationModule(webBean); if (pageContext.getParameter("Go") != null) {  DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject("MessageFileUpload");   String fileName;  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.javaimport oracle.jbo.domain.BlobDomain;import java.io.IOException;import org.apache.poi.ss.usermodel.Cell;import org.apache.poi.ss.usermodel.DateUtil;import org.apache.poi.ss.usermodel.Row;import org.apache.poi.xssf.usermodel.XSSFSheet;import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;import java.io.*;import java.text.DateFormat;import java.text.SimpleDateFormat;import oracle.apps.fnd.framework.server.OAViewObjectImpl;import org.apache.poi.xssf.usermodel.XSSFWorkbook;public void createRecord(String[] excel_data){  ImportxlsVOImpl vo = (ImportxlsVOImpl)getImportxlsVO1(); vo.InsertRecord(excel_data); getTransaction().commit();}   public void ReadExcel(BlobDomain fileData) throws IOException{ try {  InputStream in = fileData.getBinaryStream();  XSSFWorkbook workbook = new XSSFWorkbook(in);    XSSFSheet sheet = workbook.getSheetAt(0);         int rowsCount = sheet.getLastRowNum();  for (int i = 0; i <= rowsCount; i++)  {   int j = 0;   int colCounts;   Row row = sheet.getRow(i);   try   {    colCounts = row.getLastCellNum();   }   catch (NullPointerException e)   {    colCounts=1;   }   String[] excel_data = new String[colCounts+1];      for (int k = 0; k < colCounts; k++)   {    j=j+1;    try    {     Cell cell = row.getCell(k);     switch (cell.getCellType())     {      case Cell.CELL_TYPE_STRING:      excel_data[j] = cell.getRichStringCellValue().getString();      break;      case Cell.CELL_TYPE_NUMERIC:      if (DateUtil.isCellDateFormatted(cell))      {       DateFormat df = new SimpleDateFormat("MM/dd/yyyy");       excel_data[j] =df.format(cell.getDateCellValue());      }      else      {       int resultVar;        resultVar = (int)cell.getNumericCellValue();       excel_data[j] = Integer.toString(resultVar);      }      break;      case Cell.CELL_TYPE_BOOLEAN:      excel_data[j] = Boolean.toString(cell.getBooleanCellValue());      break;      case Cell.CELL_TYPE_FORMULA:      excel_data[j] = (String)cell.getCellFormula();      break;            default:      excel_data[j] = "";     }    }    catch (NullPointerException e)    {     excel_data[j] = "";    }   }   createRecord(excel_data);  } } catch (IOException e) {  e.printStackTrace(); }}  Write Following Code in ImportxlsVOImpl.javaimport oracle.apps.fnd.framework.server.OAViewObjectImpl;import oracle.jbo.Row;public void InsertRecord(String[] excel_data){ try {  executeQuery();     Row row = createRow();    for (int i=1; i < excel_data.length; i++)  {   row.setAttribute("Column" +i ,excel_data[i]);   insertRow(row);  } } catch(Exception e) {  System.out.println(e.getMessage()); }} 15. Congratulation you have successfully finished. Run Your page and Test Your Work Consider Excel PRAJ_TEST.xlsx with following data -- Lets Try to import this data into DB Table --     

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...

Oracle iRecruitment vacancy Segregation Full Solution

This document describes the detailed steps for implementing Vacancy segregation in Oracle iRecruitment. The solution is configurable and can be very easily rolled out to new business groups as required.This Solution allows attaching each external Oracle iRecruitment URL with one or more business groups. By doing so, the URL will secure the vacancies against one or more Business Groups. Therefore this design implements segregation of Oracle iRecruitment vacancies as per a set of Business Groups.  This image shows iRecruitment Visitors homepage before implementing the solution. Note - After implementing the solution list of locations available for the search becomes restricted along with the restricted list of vacancies available for search. Installation Steps1. Create a custom copy of IrcVisitor.jsp and CompileIn this step, you will create a custom copy of IrcVisitor.jsp. You will have to repeat this step for each unique segregation URL that you wish to create in Oracle iRecruitmentcd $OA_HTMLcp IrcVisitor.jsp XXUSIrcVisitor.jsp 2. Edit the Custom Copy of IrcVisitor.jspcd $OA_HTMLvi XXUSIrcVisitor.jsp Search for textString responsibilitykey = "IRC_EXT_CANDIDATE";And replace with above sentence byString responsibilitykey = "XX_US_IRC_EXT_CANDIDATE"; Save the file XXUSIrcVisitor.jsp Before to replace the responsibilitykey -- After replacing the responsibilitykey -- 3. Compile the JSP file and bounce oacorecd $FND_TOP/patch/115/bin/perl ojspCompile.pl --compile -s 'XXUSIrcVisitor.jsp' --flushcd $ADMIN_SCRIPTS_HOMEadoacorectl.sh stopadoacorectl.sh start 4. Create Custom ResponsibilityCreate Custom Responsibility “XX US iRecruitment External Candidate Resp” as given below screen shot --  The features of this responsibility are similar to Standard IRC_EXT_CANDIDATE.  Note – Include all Function Exclusions at the time of responsibility creation and do not forget to set “Available From” option to “Oracle Self Service Web Applications” 5. Copy the profile options from IRC_EXT_CANDIDATE to XX_US_IRC_EXT_CANDIDATEUse script Copy_Profile_Values.sql to copy the profile valuesAfter running the script, able to see the profile option values assigned to the new responsibility, as shown in below –    Note – Profile Option values will be get copied across from the Standard Responsibility to the Custom Responsibility. However, the Script ensures that the profile option “IRC: Registration Responsibility” points to new custom responsibility 6. Create a Descriptive Flexfield for Mapping the Business GroupsIn this step, create a context sensitive Flexfield against the Lookup entry screen. This will ensure that business groups can be picked from LOV when defining the lookup codes. So have to create Flexfield context for each segregated URL.For Example – from setup perspective, will create lookup type = “US_VACANCY_BG_LIST” and each lookup code will be mapped to a business group via descriptive Flexfield.The context sensitive Flexfield will ensure that this DFF will appear only when lookup codes against the lookup type = “US_VACANCY_BG_LIST” Download US_VACANCY_BG_LIST.ldt file and following FNDLOAD commandFNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct US_VACANCY_BG_LIST.ldtAfter running this FNDLOAD check following setups have been configured – Go to Application Developer > Flexfield > Descriptive > Register  Query using following criteriaApplication -- Application Object LibraryName -- FND_COMMON_LOOKUPS  Click on “Reference Fields”  Go to Application Developer > Flexfield > Descriptive > Segments  Query using following criteria –Application – Application Object LibraryTitle – Common Lookups   Select US_VACANCY_BG_LIST > Segments  7. Assign business groups to lookup type for securityIn this step, create lookup type names US_VACANCY_BG_LIST. This lookup type has lookup codes. Each lookup code entry will represent a business group that is available to the Custom Oracle iRecruitment Responsibility/ URL. This lookup type is attached to a custom Oracle iRecruitment responsibility via a custom profile optionNote – The name of the lookup type will match the DFF context value for Common Lookups descriptive Flexfield. The number of lookup types created will be same as the number of custom Oracle iRecruitment URL’s that you wish to create for segregating the vacancies. Typically if a URL restricts the vacancies listed by one business group, then for such cases only one single lookup will be created with the lookup type. Create Custom Lookup –Navigate to Responsibility Application Developer > Application > Lookups > Common       Save Everything. 8. Create a custom profile optionThis profile option will map the lookup type to a responsibility. Effectively a set of business groups will be mapped to a responsibility. The custom iRecruitment responsibility will be mapped to a URL. Therefore this profile will dictate the list of business groups which have theirs vacancies exposed to a custom Oracle iRecruitment URL. Download US_VAC_INCLUDED_ORG_LOOKUP_TYPE_PROFILE.ldt file and following FNDLOAD commandFNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct US_INCLUDED_ORG_LOOKUP_TYPE_PRF.ldt After running the above script, the profile option and its value will be created as shown below Navigate to responsibility Application Developer > ProfileQuery Profile Name as “XX_US_VAC_INCLUDED_ORG_LOOKUP_TYPE”  Navigate to responsibility System Administrator > Profile > SystemQuery with following Criteria –Responsibility -- XX US iRecruitment External Candidate RespProfile -- XX US Vacancy Included Organizations LKP Type   Note – Assign value US_VACANCY_BG_LIST to profile Option “XX US Vacancy Included Organizations LKP Type” at responsibility level, as shown in above picture. If FNDLOAD was run, then manual step is not required. 9. Assign Custom responsibility to US_GUEST_USERNavigate to System Administrator > Security > User > DefineAssign responsibility “XX US iRecruitment External Candidate Resp” to GUEST_USER user as shown below  10. Create grant for Custom ResponsibilityNavigate to Functional Administrator Responsibility > HomeClick Create Grant  In the Name field, type in a unique name “XX US iRecruitment External Candidate Resp”In the Security Context Region give following Values –Grantee Type – Specific UserGrantee – GUESTResponsibility -- XX US iRecruitment External Candidate Resp  Click Next ButtonIn the Set region query up ‘IRC External Site Visitor Permission Set’ and Select Next   On the review page verify that data is correct and then click Finish buttonThe grant should be created 11. Create PL/ SQL packages for securityRun the SQL Scripts by connecting to APPS schemaXX_SECURE_VACANCY_PKG.pksXX_SECURE_VACANCY_PKG.pkb 12. Register the row level securityRun the SQL scripts by connecting to APPs schemaXX_SECURE_VACANCY.sql 13. Run your Custom JSP page and test your work  Note - After implementing the solution list of locations available for the search becomes restricted along with the restricted list of vacancies available for search.  

This document describes the detailed steps for implementing Vacancy segregation in Oracle iRecruitment. The solution is configurable and can be very easily rolled out to new business groups as...

Controller Extension in OAF

Oracle does not recommend that customers extend controller objects associated with regions or webbeans in shipped E-Business Suite product pages.Controller class (oracle.apps.fnd.framework.webui.OAControllerImpl) methods should effectively be considered private, since their implementation is subject to change. Controller extensions are therefore not considered to be durable between upgrades.If it is absolutely essential to handle custom form submit events on a shipped product page, processFormRequest() is the only method that should be overriden in a controller class, although the risks outlined above still apply. Let us try to Extend Controller in OAF Page –Create one search page as explained in below link –https://blogs.oracle.com/prajkumar/entry/create_oaf_search_pageIn this exercise I am going to extend CO of SearchPG. First lets create CO for SearchPG.Right Click PageLayoutRN under SearchPG page > Set New Controller Package Name -- prajkumar.oracle.apps.fnd.searchdemo.webuiClass Name --  SearchCONow we will extend this newly created CO under this exercise. The purpose of this exercise is to modify the VO query of results table. I have changed the Column1 and Column2 fields Property Selective Search Criteria as False.Now when we click on Go button all the records are displaying in the results table and our OBJECTIVE is to bind the VO query of results table in such a way that in result Column1 value val5 and Column2 value val6 should not come as result on click Go button   Now for knowing which controller to extend we click on "About This Page" Link and select Expand All. Here we can see the Name of the controller that we need to extend   1. Create a New Workspace and ProjectFile > New > General > Workspace Configured for Oracle Applications File Name – PrajkumarCOExtensionDemoAutomatically a new OA Project will also be createdProject Name -- COExtensionDemo Default Package -- prajkumar.oracle.apps.fnd.coextensiondemo 2. Create a New Java ClassRight Click on COExtensionDemo > New > General > Java Class Name -- ExtendedCOPackage -- prajkumar.oracle.apps.fnd.coextensiondemo.serverExtends -- prajkumar.oracle.apps.fnd.searchdemo.webui.SearchCO  Note -- Give the Name of your Extended Class give its package path and in the extends property select base class  3. Write below logic in ExtendedCO Java Classpackage prajkumar.oracle.apps.fnd.coextensiondemo.webui;     import prajkumar.oracle.apps.fnd.searchdemo.webui.SearchCO;import oracle.apps.fnd.framework.webui.OAPageContext;import oracle.apps.fnd.framework.webui.beans.OAWebBean;import oracle.apps.fnd.framework.OAApplicationModule;import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;import prajkumar.oracle.apps.fnd.searchdemo.server.SearchVOImpl; public class XXItemSearchCO extends ItemSearchCO{ public XXItemSearchCO() { }          public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)  {   super.processFormRequest(pageContext, webBean);   OAApplicationModule am = pageContext.getApplicationModule(webBean);   OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");        //Capturing Go Button ID   String go = queryBean.getGoButtonName();               //If its Not NULL which mean user has pressed "Go" Button   if(pageContext.getParameter(go)!=null)   {    // Setting whereClause at Runtime to restrict the query     SearchVOImpl vo = (SearchVOImpl)am.findViewObject("SearchVO1");    vo.setWhereClause(null);    vo.setWhereClause("Column1 <>:1 AND Column2 <>:2");   vo.setWhereClauseParam(0,"val5");   vo.setWhereClauseParam(1,"val6");  } }} 4. Attach new controller to SearchPG through personalizationClick on Personalize Page link on top right hand side of your page  Note -- If you are not able to see this link then go through below link –https://blogs.oracle.com/prajkumar/entry/how_to_enable_personalization_link Click on Complete View -> Expand All -> Click on personalize icon next to Page Layout  Now at site level give the path of extended controller as we are extending the controller at SITE LEVELprajkumar.oracle.apps.fnd.coextensiondemo.webui.ExtendedCO  Click Apply -> Return to Application 5. Congratulation you have successfully finished. Run Your SearchPG page and Test Your Work  Click GoNote – Record with Column1 value val5 and Column2 value val6 is not coming in result  

Oracle does not recommend that customers extend controller objects associated with regions or webbeans in shipped E-Business Suite product pages. Controller class...

Oracle iRecruitment Vacancy Segregation Solution

Business NeedsIn large organizations that have implemented Oracle iRecruitment, usually there is a business need to have multiple external facing Oracle iRecruitment URL’s. Each such URL might correspond to one or more business groups For example, the standard URL http://nacdellxx.com:XXXX/xx/IrcVisitor.jsp can display all the vacancies across all the business groups in Organization.  However business might need URLs similar to below –http://nacdellxx.com:XXXX/xx/India.jsphttp://nacdellxx.com:XXXX/xx/USA.jsp Business has a need to create multiple facing URL’s in Oracle iRecruitment  Business ChallengesBusiness want to secure the vacancies against one or more Business Groups, and thus displaying vacancies only for specific set of departments/ locations Business Solution·         A custom copy of IrcVisitor.jsp will be created·         The customized copy of IrcVisitor.jsp will reference a custom Oracle iRecruitment responsibility·         A lookup type will be defined for each custom Oracle iRecruitment responsibility. Each lookup code entry within lookup type will map to a business group·         The lookup type definition will be attached to custom Oracle iRecruitment responsibility via a profile option. Effectively this allows a set of business groups to be associated with a specific custom iRecruitment responsibility                         Figure: Oracle iRecruitment Vacancy Segregation Solution Blue Print Solution Features·         This solution allows attaching each external Oracle iRecruitment URL with one or more business groups. By doing so, the URL will secure the vacancies as per a set of Business Groups·         The solution is configurable and can be very easily rolled out to new business groups as required by simple mapping Benefits·         By this Solution Oracle iRecruitment URL will secure the vacancies against one or more business groups, and thus displaying vacancies only for specific set of departments/ locations To get Full Solution Implementation steps Click Here

Business Needs In large organizations that have implemented Oracle iRecruitment, usually there is a business need to have multiple external facing Oracle iRecruitment URL’s. Each such URL...

Import Data from Excel sheet to DB Table through OAF page

1. Create a New Workspace and ProjectFile > 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 LibraryDownload 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 MachineRight 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      Click here to know Steps to Add JAR file into R12 server in OA  3. Create a New Application Module (AM)Right Click on ImportxlsDemo > New > ADF Business Components > Application Module Name -- ImportxlsAMPackage -- 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 excelCREATE 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 ObjectName – ImportxlsEOPackage -- prajkumar.oracle.apps.fnd.importxlsdemo.schema.serverDatabase 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 keyCheck 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 ObjectName -- ImportxlsVOPackage -- prajkumar.oracle.apps.fnd.importxlsdemo.server In Step2 in Entity Page select ImportxlsEO and shuttle it to selected listIn 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 ModuleRight click on ImportxlsAM > Edit ImportxlsAM > Data Model >Select ImportxlsVO and shuttle to Data Model list 8. Create a New PageRight click on ImportxlsDemo > New > Web Tier > OA Components > PageName -- ImportxlsPGPackage -- 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:  AttributePropertyIDPageLayoutRNAM Definitionprajkumar.oracle.apps.fnd.importxlsdemo.server.ImportxlsAMWindow TitleImport Data From Excel through OAF Page Demo WindowTitleImport Data From Excel through OAF Page Demo 11. Create messageComponentLayout Region Under Page Layout RegionRight click PageLayoutRN > New > Region  AttributePropertyIDMainRNItem StylemessageComponentLayout 12. Create a New Item messageFileUpload Bean under MainRNRight click on MainRN > New > messageFileUploadSet Following Properties for New Item --  AttributePropertyIDMessageFileUploadItem StylemessageFileUpload 13. Create a New Item Submit Button Bean under MainRNRight click on MainRN > New > messageLayoutSet Following Properties for messageLayout --  AttributePropertyIDButtonLayout Right Click on ButtonLayout > New > Item  AttributePropertyIDGoItem StylesubmitButtonAttribute Set/oracle/apps/fnd/attributesets/Buttons/Go 14. Create Controller for page ImportxlsPGRight Click on PageLayoutRN > Set New ControllerPackage Name: prajkumar.oracle.apps.fnd.importxlsdemo.webuiClass Name: ImportxlsCO Write Following Code in ImportxlsCO in processFormRequestimport 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.javaimport 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();    }    else if (cell.getType() == CellType.NUMBER)    {       System.out.println("I got a number " + cell.getContents());     excel_data[j] = cell.getContents();    }    else    {     excel_data[j] = "";    }     }   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 --     

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...

OAF Page to Upload Files into Server from local Machine

1. Create a New Workspace and ProjectFile > 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 -- FileUploadAMPackage -- prajkumar.oracle.apps.fnd.fileuploaddemo.serverCheck Application Module Class: FileUploadAMImpl Generate JavaFile(s) 3. Create a New PageRight click on FileUploadDemo > New > Web Tier > OA Components > PageName -- FileUploadPGPackage -- 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 --    AttributePropertyIDPageLayoutRNAM Definitionprajkumar.oracle.apps.fnd.fileuploaddemo.server.FileUploadAMWindow TitleUploading File into Server from Local Machine Demo WindowTitleUploading File into Server from Local Machine Demo   6. Create messageComponentLayout Region Under Page Layout RegionRight click PageLayoutRN > New > Region  AttributePropertyIDMainRNItem StylemessageComponentLayout 7. Create a New Item messageFileUpload Bean under MainRNRight click on MainRN > New > messageFileUploadSet Following Properties for New Item --  AttributePropertyIDMessageFileUploadItem StylemessageFileUpload 8. Create a New Item Submit Button Bean under MainRNRight click on MainRN > New > messageLayoutSet Following Properties for messageLayout --  AttributePropertyIDButtonLayout Right Click on ButtonLayout > New > Item  AttributePropertyIDSubmitItem StylesubmitButtonAttribute Set/oracle/apps/fnd/attributesets/Buttons/Go 9. Create Controller for page FileUploadPGRight Click on PageLayoutRN > Set New ControllerPackage Name: prajkumar.oracle.apps.fnd.fileuploaddemo.webuiClass Name: FileUploadCO Write Following Code in FileUploadCO processFormRequestimport 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);     }} CODE #1 -- If Page has not deployed at instance, testing at Local Machine, use following Codepublic 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");    String contentType = (String) fileUploadData.selectValue(null, "UPLOAD_FILE_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); }    } CODE #2 -- If Page has been Deployed at Instance, Use Following Code 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");     String contentType = (String) fileUploadData.selectValue(null, "UPLOAD_FILE_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     Page has deployed and Used CODE #2 Before Upload the File  After Upload the File     Page has not been deployed and Used CODE #1 Before Upload the File  After Upload the File 

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...

Partial Page Rendering in OAF Page

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 ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- PPRProjProject Name – PPRDemoProjDefault Package -- prajkumar.oracle.apps.fnd.pprdemo 2. Create Application Module AMPPRDemoProj right click > New > ADF Business Components > Application ModuleName -- PPRAMPackage -- prajkumar.oracle.apps.fnd.pprdemo.server Check Application Module Class: PPRAMImpl Generate JavaFile(s) 3. Create a PPRVO View ObjectPPRDemoProj> New > ADF Business Components > View ObjectsName – PPRVOPackage – prajkumar.oracle.apps.fnd.pprdemo.server In Attribute Page Click on New button and create transient primary key attribute with the following properties:  AttributePropertyNameRowKeyTypeNumberUpdateableAlwaysKey Attribute(Checked) Click New button again and create transient attribute with the following properties:  AttributePropertyNameTextItem2RenderTypeBooleanUpdateableAlways Note – No Need to generate any JAVA files for PPRVO 4. Add Your View Object to Root UI Application ModuleRight 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 PagePPRDemoProj right click > New > OA Components > PageName – PPRPGPackage -- prajkumar.oracle.apps.fnd.pprdemo.webui 6. Modify the Page Layout (Top-level) Region  AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitlePPR Demo Window Title TrueTitlePPR Demo Page HeaderAM Definitionprajkumar.oracle.apps.fnd.pprdemo.server.PPRAM 7. Create the Second Region (Main Content Region)Right click on PageLayoutRN > New > Region  AttributePropertyIDMainRNRegion StylemessageComponentLayout 8. Create Two Text Items Create First messageTextItem --Right click on MainRN > New > messageTextInput  AttributePropertyIDTextItem1Region StylemessageTextInputPromptText Item1Length20Disable Server Side ValidationTrueDisable Client Side ValidationTrueAction TypefirePartialActionEventTextItem1ChangeSubmitTrue 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  AttributePropertyIDTextItem2Region StylemessageTextInputPromptText Item2Length20Rendered${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 PageSelect PageLayoutRN in Structure pane right click > Set New ControllerPackage 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     

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...

Key Flex Fields, KFF in OAF

1. Create a New Workspace and ProjectRight 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 -- KFFAMPackage -- 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 ObjectName -- KFFVOPackage -- 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_idFROM    gl_code_combinations_kfv In Step8 Check Object Class: KFFVOImpl -> Generate Java File -> Bind Variable Accessors 4. Add View Object to Root UI Application ModuleRight Click on KFFAM > Edit KFFAM > Data Model and shuttle KFFVO from Available View Objects to Data Model 5. Create a New PageRight click on KFFDemo > New > Web Tier > OA Components > PageName -- KFFPGPackage -- 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:  AttributePropertyIDPageLayoutRNAM Definitionprajkumar.oracle.apps.fnd.kffdemo.server.KFFAMWindow TitleKey Flex Field Demo WindowTitleKey Flex Field Demo  8. Create Stack Layout Region Under Page Layout RegionRight click PageLayoutRN > New > Region  AttributePropertyIDMainRNAM DefinitionstackLayout 9. Create a New Item of type Flex under the Stack Layout RegionRight click on MainRN > New > ItemSet Following Properties for New Item --  AttributePropertyIDKeyFlexItemItem StyleFlexPromptAccounting Key Flex FieldAppl Short NameSQLGLNameGL#TypeKeyView InstanceKFFVO1  10. Create Controller for page KFFPGRight Click on PageLayoutRN > Set New ControllerPackage Name: prajkumar.oracle.apps.fnd.kffdemo.webuiClass 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    

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...

Create Auto Customization Criteria OAF Search Page

1. Create a New Workspace and ProjectRight 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 -- CustSearchAMPackage -- 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_LEVELValue – MANAGE_STATEClick 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 ObjectName – CustSearchEOPackage -- prajkumar.oracle.apps.fnd.custsearchdemo.schema.serverDatabase 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 ObjectName -- CustSearchVOPackage -- 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 ModuleSelect Right click on CustSearchAM > Application Modules > Data ModelSelect CustSearchVO and shuttle to Data Model list 8. Create a New PageRight click on CustSearchDemo > New > Web Tier > OA Components > PageName -- CustSearchPGPackage -- 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 -- PageLayoutRNRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAMWindow Title – AutoCustomize Search Page WindowTitle – AutoCustomization Search PageAuto Footer -- True 11. Add a Query Bean to Your PageRight click on PageLayoutRN > New > RegionSelect new region region1 and set following propertiesID – QueryRNRegion Style – queryConstruction Mode – autoCustomizationCriteriaInclude Simple Panel – FalseInclude Views Panel – FalseInclude Advanced Panel – False 12. Create a New Region of style tableRight Click on QueryRN > New > Region Using WizardApplication Module – prajkumar.oracle.apps.fnd.custsearchdemo.server.CustSearchAMAvailable View Usages – CustSearchVO1 In Step2 in Region Properties set following propertiesRegion ID – CustSearchTableRegion 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 PanelRight Click on QueryRN > New > simpleSearchPanelAutomatically region2 (header Region) and region1 (MessageComponentLayout Region) createdSet Following Properties for region2Id – SimpleSearchHeaderText -- 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 TextInputBean1Id – SearchColumn1Search Allowed – TrueData Type – VARCHAR2Maximum Length –CSS Class – OraFieldTextPrompt – Column1 Message TextInputBean2Id – SearchColumn2Search Allowed -- TrueData Type – VARCHAR2Maximum Length – 100CSS Class – OraFieldTextPrompt – 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 propertiesId – SearchColumn1MapSearch Item – SearchColumn1Result Item – Column1 18. Now again right click on simpleSearchMappings -> New -> queryCriteriaMap, and then set the below propertiesId – SearchColumn2MapSearch Item – SearchColumn2Result Item – Column2 19. Congratulation you have successfully finished Auto Customization Search page. Run Your CustSearchPG page and Test Your Work      

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...

Oracle HRMS API - Hire Into Job

API - hr_employee_api.hire_into_jobExample --  Consider a Contact for some employee already exist in Oracle System. Now that Contact has got Job, so his Person type should be converted to Employee from Contact (External)  Following API helps to create assignment for that Contact and helps to change his Person Type  DECLARE     -- Local Variables     -- ---------------------     lc_dt_ud_mode             VARCHAR2(100)  := NULL;     ln_person_id                 NUMBER               := 32981;     ln_object_number        NUMBER               := 1;     ld_effective_date            DATE                     := TO_DATE('28-JUN-2012');     lc_employee_number  VARCHAR2(100)  := 'CONTACT_TEST_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 Hire to Job API   -- -------------------------------------------   ld_effective_start_date           DATE;   ld_effective_end_date            DATE;   lb_assign_payroll_warning   BOOLEAN;   lb_orig_hire_warning              BOOLEAN;   ln_assignment_id                    NUMBER; BEGIN   -- Find Date Track Mode   -- ----------------------------   dt_api.find_dt_upd_modes   (   -- Input data elements       -- ---------------------------       p_effective_date                 => TO_DATE('28-JUN-2012'),       p_base_table_name         => 'PER_ALL_PEOPLE_F',       p_base_key_column         => 'PERSON_ID',       p_base_key_value             => ln_person_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;    -- Hire into Job API   -- ------------------------   hr_employee_api.hire_into_job   (   -- Input Data Elements       -- -----------------------------       p_effective_date                     => ld_effective_date,       p_person_id                           => ln_person_id,       p_datetrack_update_mode  => lc_dt_ud_mode,       -- Output Data Elements       -- ----------------------------       p_object_version_number    => ln_object_number,       p_employee_number             => lc_employee_number,       p_assignment_id                   => ln_assignment_id,       p_effective_start_date           => ld_effective_start_date,       p_effective_end_date            => ld_effective_end_date,       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; 

API - hr_employee_api.hire_into_job Example --   Consider a Contact for some employee already exist in Oracle System. Now that Contact has got Job, so his Person type should be converted to Employee from...

Update records in OAF Page

1. Create a Search Page to Create a page please go through the following linkhttps://blogs.oracle.com/prajkumar/entry/create_oaf_search_page 2. Implement Update Action in SearchPGRight click on ResultTable in SearchPG > New > Item Set following properties for New Item  AttributePropertyIDUpdateActionItem StyleimageImage URIupdateicon_enabled.gifAtribute Set/oracle/apps/fnd/attributesets/Buttons/UpdatePromptUpdateAdditional TextUpdate recordHeight24Width24Action TypefireActionEventupdateSubmitTrueParametersName – PColumn1Value -- ${oa.SearchVO1.Column1}Name – PColumn2Value -- ${oa.SearchVO1.Column2} 3. Create a Update PageRight click on SearchDemo > New > Web Tier > OA Components > PageName – UpdatePGPackage – 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:  AttributePropertyIDPageLayoutRNRegion StylePageLayoutAM Definitionprajkumar.oracle.apps.fnd.searchdemo.server.SearchAMWindow TitleUpdate Page WindowTitleUpdate PageAuto FooterTrue 6. Create the Second Region (Main Content Region)Select PageLayoutRN right click > New > RegionID – MainRNRegion Style – messageComponentLayout 7. Create first Item (Empty Field)MainRN > New > messageTextInput  AttributePropertyIDColumn1Style PropertymessageTextInputPromptColumn1Data TypeVARCHAR2Length20Maximum Length100View InstanceSearchVO1View AttributeColumn1 8. Create second Item (Empty Field)MainRN > New > messageTextInput  AttributePropertyIDColumn2Style PropertymessageTextInputPromptColumn2Data TypeVARCHAR2Length20Maximum Length100View InstanceSearchVO1View AttributeColumn2 9. Create a container Region for Apply and Cancel Button in UpdatePGSelect MainRN of UpdatePGMainRN > messageLayout  AttributePropertyRegionButtonLayout 10. Create Apply ButtonSelect ButtonLayout > New > Item  AttributePropertyIDApplyItem StylesubmitButtonAttribute/oracle/apps/fnd/attributesets/Buttons/Apply 11. Create Cancel ButtonSelect ButtonLayout > New > Item  AttributePropertyIDCancelItem StylesubmitButtonAttribute/oracle/apps/fnd/attributesets/Buttons/Cancel 12. Add Page Controller for SearchPGRight Click on PageLayoutRN of SearchPG > Set New ControllerName – SearchCOPackage -- 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 UpdatePGRight Click on PageLayoutRN of UpdatePG > Set New ControllerName – UpdateCOPackage -- 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             

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...

Add Responsibility For Oracle FND User

API - fnd_user_pkg.addresp Example ---- ------------------------------------------------------------ Add Responsibility to Oracle FND User-- -----------------------------------------------------------DECLARE    lc_user_name                        VARCHAR2(100)    := 'PRAJ_TEST';    lc_resp_appl_short_name   VARCHAR2(100)    := 'FND';    lc_responsibility_key          VARCHAR2(100)    := 'APPLICATION_DEVELOPER';    lc_security_group_key        VARCHAR2(100)    := 'STANDARD';    ld_resp_start_date                DATE                        := TO_DATE('25-JUN-2012');    ld_resp_end_date                 DATE                        := NULL;BEGIN     fnd_user_pkg.addresp     (   username           => lc_user_name,        resp_app             => lc_resp_appl_short_name,        resp_key             => lc_responsibility_key,        security_group  => lc_security_group_key,        description         => NULL,        start_date           => ld_resp_start_date,        end_date            => ld_resp_end_date    ); COMMIT;EXCEPTION            WHEN OTHERS THEN                        ROLLBACK;                        DBMS_OUTPUT.PUT_LINE(SQLERRM);END;/SHOW ERR; 

API - fnd_user_pkg.addresp Example -- -- ---------------------------------------------------------- -- Add Responsibility to Oracle FND User-- -----------------------------------------------------------...

API to UPDATE Oracle FND User

API - fnd_user_pkg.updateuser Example -- Consider a FND User having following Details --  Lets Try to Update its Email Id from PRAJ_TEST@abc.com to PRAJ_TEST@def.com -- -------------------------------------------------- API to UPDATE Oracle FND User-- ------------------------------------------------DECLARE    lc_user_name                           VARCHAR2(100)   := 'PRAJ_TEST';    lc_user_password                   VARCHAR2(100)   := 'Oracle123';    ld_user_start_date                   DATE                      := TO_DATE('23-JUN-2012');    ld_user_end_date                    VARCHAR2(100)  := NULL;    ld_password_date                   VARCHAR2(100)  := TO_DATE('23-JUN-2012');    ld_password_lifespan_days  NUMBER               := 90;    ln_person_id                            NUMBER                := 32979;    lc_email_address                     VARCHAR2(100)  := 'PRAJ_TEST@def.com';BEGIN   fnd_user_pkg.updateuser   (  x_user_name                           => lc_user_name,      x_owner                                   => NULL,      x_unencrypted_password    => lc_user_password,      x_start_date                             => ld_user_start_date,      x_end_date                              => ld_user_end_date,      x_password_date                   => ld_password_date,      x_password_lifespan_days  => ld_password_lifespan_days,      x_employee_id                       => ln_person_id,      x_email_address                    => lc_email_address   ); COMMIT;EXCEPTION    WHEN OTHERS THEN                      ROLLBACK;                      DBMS_OUTPUT.PUT_LINE(SQLERRM);END;/SHOW ERR;    

API - fnd_user_pkg.updateuser Example -- Consider a FND User having following Details --     Lets Try to Update its Email Id from PRAJ_TEST@abc.com to PRAJ_TEST@def.com   -- ----------------------------------...

API to CREATE Oracle FND User

API - fnd_user_pkg.createuser Example ---- ---------------------------------------- API to CREATE FND User-- --------------------------------------DECLARE   lc_user_name                          VARCHAR2(100)   := 'PRAJ_TEST';   lc_user_password                  VARCHAR2(100)   := 'Oracle123';   ld_user_start_date                  DATE                      := TO_DATE('23-JUN-2012');   ld_user_end_date                   VARCHAR2(100)  := NULL;   ld_password_date                  VARCHAR2(100)  := TO_DATE('23-JUN-2012');   ld_password_lifespan_days  NUMBER              := 90;   ln_person_id                             NUMBER              := 32979;   lc_email_address                     VARCHAR2(100) := 'PRAJ_TEST@abc.com';BEGIN  fnd_user_pkg.createuser  (  x_user_name                            => lc_user_name,     x_owner                                    => NULL,     x_unencrypted_password     => lc_user_password,     x_start_date                              => ld_user_start_date,     x_end_date                               => ld_user_end_date,     x_password_date                    => ld_password_date,     x_password_lifespan_days   => ld_password_lifespan_days,     x_employee_id                        => ln_person_id,     x_email_address                     => lc_email_address );  COMMIT;EXCEPTION       WHEN OTHERS THEN                       ROLLBACK;                       DBMS_OUTPUT.PUT_LINE(SQLERRM);END;/SHOW ERR;  

API - fnd_user_pkg.createuser Example -- -- -------------------------------------- -- API to CREATE FND User -- --------------------------------------DECLARE   lc_user_name                        ...

Implement Dependent LOV in OA Framework

Let us try to create a Dependent LOV. In this exercise first Lov Input is “Employee Name” based on Employee Name Second Lov Input will give “Dependent Name” 1. Create a New Workspace and ProjectRight click Workspaces and click create new OAworkspace and name it as PRajkumarDependentLovDemo. Automatically a new OA Project will be created. Name the project as DependentLovDemo and package as prajkumar.oracle.apps.fnd.dependentlovdemo Note -- Check Run Option Property for Project.Right Click on DependentLovDemo > Oracle Applications > Run Options. Check OADeveloperMode should not be in Selected Options if it is there in Selected Options list then shuttle it back to Available Options  2. Create a New Application Module (AM)Right Click on DependentLovDemo > New > ADF Business Components > Application Module Name -- DependentLovAMPackage -- prajkumar.oracle.apps.fnd.dependentlovdemo.server 3. Create a New View Object (VO)Right click on DependentLovDemo > New > ADF Business Components > View ObjectName – DependentLovVO1Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT  person_id, full_nameFROM     per_all_people_fWHERE  SYSDATE BETWEEN effective_start_date AND effective_end_date 4. Create a New View Object for Second Lov (VO)Right click on DependentLovDemo > New > ADF Business Components > View ObjectName – DependentLovVO2Package -- prajkumar.oracle.apps.fnd.dependentlovdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the query SELECT  pcr.person_id, papf.full_nameFROM     per_contact_relationships pcr,                per_all_people_f  papfWHERE  papf.person_id  = pcr.contact_person_idAND       SYSDATE  BETWEEN pcr.date_start AND NVL(pcr.date_end,SYSDATE)AND       SYSDATE  BETWEEN papf.effective_start_date AND papf.effective_end_date 5. Add Your View Objects to Root UI Application ModuleSelect Right click on DependentLovAM > Edit DependentLovAM > Data Model >Select DependentLovVO1 and DependentLovVO2 and shuttle to Data Model list  Create First LOV Region for VO DependentLovVO1 6. Create First LOV RegionRight click on DependentLovDemo > New > Web Tier > OA Components > RegionName -- FirstLovRNPackage -- prajkumar.oracle.apps.fnd.dependentlovdemo.webuiRegion Style -- listOfValuesScope -- Public Note - The property Scope is the key property which makes the LOV region public and makes it usable in multiple pages 7. Right click on FirstLovRN and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and select DependentLovVO1_1. Click Next  Region Id – FirstLovRN Region style – table  8. Shuttle the two attributes to the right side.That is PersonId and FullName  9. Set Region Item properties as below –  IDPromptStyleDatatypePersonId_LOVPersonIdformValueNUMBERFullName_LOVFullNamemessageStyledTextVARCHAR2  10. Click Next and Finish 11. Select PersonId_LOV and Set Following Properties –  AttributePropertySearch AllowedFalseSelective Search CriteriaFalse 12. Select FullName_LOV and Set Following Properties –  AttributePropertySearch AllowedTrueSelective Search CriteriaFalse Now Same way Create Second LOV Region for VO DependentLovVO2 13. Create Second LOV RegionRight click on DependentLovDemo > New > Web Tier > OA Components > RegionName -- SecondLovRNPackage -- prajkumar.oracle.apps.fnd.dependentlovdemo.webuiRegion Style -- listOfValuesScope -- Public Note - The property Scope is the key property which makes the LOV region public and makes it usable in multiple pages 14. Right click on SecondLovRN and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAM and select DependentLovVO2_1. Click Next  Region Id – SecondLovRN Region style – table  15. Shuttle the two attributes to the right side.That is PersonId and FullName  16. Set Region Item properties as below –  IDPromptStyleDatatypeSecond_PersonId_LOVPersonIdmessageStyledTextNUMBERSecond_FullName_LOVFullNamemessageStyledTextVARCHAR2   17. Click Next and Finish 18. Select Second_PersonId_LOV and Set Following Properties –  AttributePropertySearch AllowedFalseSelective Search CriteriaTrue 19. Select Second_FullName_LOV and Set Following Properties –  AttributePropertySearch AllowedTrueSelective Search CriteriaFalse 20. Create a New PageRight click on DependentLovDemo > New > Web Tier > OA Components > Page  AttributePropertyNameDependentLovPGPackageprajkumar.oracle.apps.fnd.dependentlovdemo.webui 21. Select the DependentLovPG and go to the strcuture pane where a default region has been created 22. Select region1 and set the following properties:  AttributePropertyIDPageLayoutRNAM Definitionprajkumar.oracle.apps.fnd.dependentlovdemo.server.DependentLovAMWindow TitleDependent List of values Demo WindowTitleDependent List of values Demo 23. Right click PageLayoutRN and  click new Region  AttributePropertyIDMainRNRegion StylemessageComponentLayout 24. Create a New item to store Return result of First LOV and to give Search Criteria to second LOVSelect PageLayoutRN > New > ItemSet following Properties for New Item –  AttributePropertyIDParentPersonIdItem StyleformValueData TypeNumber Build First LOV on Page: 25. Right click the MainRN and click new messageLovInputSet Following Properties for Newly Created messageLovInput  AttributePropertyIDEmployee_NameExternal Lov/prajkumar/oracle/apps/fnd/dependentlovdemo/webui/FirstLovRNSearch AllowedFalseSelective Search CriteriaTruePromptEmployee Name Select LovMap1 and set following properties --  AttributePropertyLov Region ItemFullName_LOVReturn ItemEmployee_NameCriteria ItemEmployee_Name Create LovMap2 and set following properties for that --Select Employee_Name > lovMappings right click New > lovMapSet following properties for lovMap2 --  AttributePropertyLov Region ItemPersonId_LOVReturn ItemParentPersonId Build Second LOV on Page: 26. Right click the MainRN and click new messageLovInputSet Following Properties for Newly Created messageLovInput  AttributePropertyIDDependent_NameExternal Lov/prajkumar/oracle/apps/fnd/dependentlovdemo/webui/SecondLovRNSearch AllowedTrueSelective Search CriteriaTruePromptDependent Name Select LovMap3 and set following properties --  AttributePropertyLov Region ItemSecond_FullName_LOVReturn ItemDependent_NameProgrammatic QueryTrue Create LovMap4 and set following properties for that --Select Dependent_Name > lovMappings right click New > lovMapSet following properties for lovMap4 --  AttributePropertyLov Region ItemSecond_PersonId_LOVCriteria ItemParentPersonIdRequiredTrue 27. Congratulation you have successfully finished. Run Your page and Test Your Work         

Let us try to create a Dependent LOV. In this exercise first Lov Input is “Employee Name” based on Employee Name Second Lov Input will give “Dependent Name”   1. Create a New Workspace and Project Right...

Oracle HRMS API – Create Employee

API - hr_employee_api.create_employeeExample --  -- 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; 

API - hr_employee_api.create_employee Example --    -- Create Employee  -- ------------------------- DECLARE   lc_employee_number                       PER_ALL_PEOPLE_F.EMPLOYEE_NUMBER%TYPE    := 'PRAJ_01';...

Oracle HRMS API – Update Employee

API - hr_person_api.update_personExample -- 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 

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     -- -----------------------  ...

Oracle HRMS API – Create Employee Contact

API - hr_contact_rel_api.create_contactExample -- DECLARE     ln_contact_rel_id                   PER_CONTACT_RELATIONSHIPS.CONTACT_RELATIONSHIP_ID%TYPE;     ln_ctr_object_ver_num         PER_CONTACT_RELATIONSHIPS.OBJECT_VERSION_NUMBER%TYPE;     ln_contact_person                 PER_ALL_PEOPLE_F.PERSON_ID%TYPE;     ln_object_version_number  PER_CONTACT_RELATIONSHIPS.OBJECT_VERSION_NUMBER%TYPE;     ld_per_effective_start_date DATE;     ld_per_effective_end_date  DATE;     lc_full_name                            PER_ALL_PEOPLE_F.FULL_NAME%TYPE;     ln_per_comment_id              PER_ALL_PEOPLE_F.COMMENT_ID%TYPE;     lb_name_comb_warning     BOOLEAN;     lb_orig_hire_warning           BOOLEAN; BEGIN    -- Create Employee Contact    -- -------------------------------------     hr_contact_rel_api.create_contact     (    -- Input data elements           -- -----------------------------           p_start_date                                      => TO_DATE('14-JUN-2011'),           p_business_group_id                    => fnd_profile.value('PER_BUSINESS_GROUP_ID'),           p_person_id                                      => 32979,           p_contact_type                                 => 'M',           p_date_start                                      => TO_DATE('14-JUN-2011'),           p_last_name                                     => 'TEST',           p_first_name                                     => 'CONTACT',           p_personal_flag                               => 'Y',           -- Output data elements           -- --------------------------------          p_contact_relationship_id            => ln_contact_rel_id,          p_ctr_object_version_number      => ln_ctr_object_ver_num,          p_per_person_id                              => ln_contact_person,          p_per_object_version_number     => ln_object_version_number,          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_name_combination_warning  => lb_name_comb_warning,          p_orig_hire_warning                      => lb_orig_hire_warning     );  COMMIT;EXCEPTION            WHEN OTHERS THEN                      ROLLBACK;                      dbms_output.put_line(SQLERRM);END;/SHOW ERR; 

API - hr_contact_rel_api.create_contact Example --   DECLARE     ln_contact_rel_id                   PER_CONTACT_RELATIONSHIPS.CONTACT_RELATIONSHIP_ID%TYPE;     ln_ctr_object_ver_num       ...

Oracle HRMS API – Create Employee Address

API - hr_person_address_api.create_person_addressExample -- DECLARE    ln_address_id                           PER_ADDRESSES.ADDRESS_ID%TYPE;    ln_object_version_number    PER_ADDRESSES.OBJECT_VERSION_NUMBER%TYPE;BEGIN   -- Create Employee Address   -- --------------------------------------    hr_person_address_api.create_person_address    (     -- Input data elements          -- ------------------------------          p_effective_date                    => TO_DATE('08-JUN-2011'),          p_person_id                           => 32979,          p_primary_flag                     => 'Y',          p_style                                     => 'US',          p_date_from                           => TO_DATE('08-JUN-2011'),          p_address_line1                   => '50 Main Street',          p_address_line2                   => NULL,          p_town_or_city                     => 'White Plains',          p_region_1                              => 'Westchester',          p_region_2                              => 'NY',          p_postal_code                        => 10601,          p_country                                => 'US',          -- Output data elements          -- --------------------------------          p_address_id                          => ln_address_id,          p_object_version_number   => ln_object_version_number   );  COMMIT;EXCEPTION       WHEN OTHERS THEN                       ROLLBACK;                       dbms_output.put_line(SQLERRM);END;/SHOW ERR;  

API - hr_person_address_api.create_person_address Example --   DECLARE    ln_address_id                           PER_ADDRESSES.ADDRESS_ID%TYPE;    ln_object_version_number  ...

Oracle HRMS API – Update Employee Address

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;   

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   ...

Oracle HRMS API – Create Employee Element Entry

API - pay_element_entry_api.create_element_entryExample --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; 

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; ...

Oracle HRMS API – Delete Employee Element Entry

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; 

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    ...

Oracle HRMS API – Rehire Employee

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; 

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    ...

Oracle HRMS API – Create Employee Payment Method

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;  

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      ...

Oracle HRMS API – Create or Update Employee Phone

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; 

API --  hr_phone_api.create_or_update_phone   Example -- DECLARE       ln_phone_id                              PER_PHONES.PHONE_ID%TYPE;       ln_object_version_number  ...

Oracle HRMS API – Create or Update Employee Salary

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 APIExample -- 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; 

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  ...

Oracle HRMS API –Update Employee Fed Tax Rule

API --  pay_federal_tax_rule_api.update_fed_tax_ruleExample --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; 

API --  pay_federal_tax_rule_api.update_fed_tax_rule Example -- DECLARE   lb_correction                              BOOLEAN;    lb_update                                   BOOLEAN;   lb_update_override...

Oracle HRMS API – Create Employee State Tax Rule

API --  pay_state_tax_rule_api.create_state_tax_ruleExample -- 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; 

API --  pay_state_tax_rule_api.create_state_tax_rule Example --   DECLARE     lc_dt_ud_mode                     VARCHAR2(100)     := NULL;     ln_assignment_id                 NUMBER                  ...

Oracle HRMS API – Update Employee State Tax Rule

API --  pay_state_tax_rule_api.update_state_tax_ruleExample -- 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; 

API --  pay_state_tax_rule_api.update_state_tax_rule Example --   DECLARE     lc_dt_ud_mode                       VARCHAR2(100)   := NULL;     ln_assignment_id                  NUMBER                  :=...

Oracle HRMS API – Update Employee Assignment

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 IdAPI -- hr_assignment_api.update_emp_asg To UpdateGrade, Location, Job, Payroll, Organization, Employee Category, People GroupAPI -- 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;  

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,...

Create LOV in ADF Application

1. Create a New Application New > Applications > Fusion Web Application (ADF) Application Name – LovApp Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.lov   2. We need to have table from where LOV values will come. Lets Create table   CREATE TABLE lov_table_demo (     -- ---------------------       -- Data Columns       -- ---------------------        Column1                  VARCHAR2(100),       Column2                  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 );   3. Lets put some data in the tables -- Insert Data into Master Table INSERT INTO lov_table_demo VALUES ( 'VAL1', 'VAL2', SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO lov_table_demo VALUES ( 'VAL3', 'VAL4', SYSDATE, 0, SYSDATE, 0, 0);   4. Create EO for Our Page (Entity Object)   Note - EO is as per User Requirement, currently we are going to create EO from above created table as demo purpose   Right Click on Model > New > ADF Business Components > Entity Object Package -- Demo.adf.lov.model.entities Name – Column1EO Schema Object -- LOV_TABLE_DEMO   Note – By default ROWID will be the primary key if we will not make any column to be primary key in Attribute Setting Page   Check the Accessors, Create Method, and Remove Method   Check “Generate Default View Object CheckBox” Package – Demo.adf.lov.model.queries Name – Column1VO   Check “Application Module” Checkbox Package – Demo.adf.lov.model.services Name – Column1AM     5. Create View Object for Column1 LOV (View Object) Right Click on Model > New > ADF Business Components > View Object Package -- Demo.adf.lov.model.queries Name – Column1LovVO Display Name -- Column1 Lov View Object     Select Column1EO Entity and Move to selected area uncheck the option Updatable     Select Column1 attribute and move to Selected area         Click Finish   6. Create LOV Double Click on Column1VO in Demo.adf.lov.queries section Select Column1 attribute in attribute page and click “+” green button at the bottom under List of Values Section     Click the green + button with List Data Source     Select Column1LovVO in Available object and change the Name at bottom to Column1LOVAcessor and Press > button to Create Accessor for LOV and click OK     Choose Column1 in List Attribute Return Values will populate automatically. Your screen should similar to this     Go to UI Hints tab Leave the list type asChoice List (There are many type of LOVs available) Move Column1 Name from Available to Selected Area Choose Labeled Item (First of List) at very bottom Include “No Selection” Item:     Click OK   7. Linking LOV to JSF Page Create a JSF Page Right Click on ViewController > New > Web Tier > JSF > JSF Page File Name – LovDemo.jspx Initial Page Layout and Content – select Blank Page Expand Page Implementation and select Automatically Expose UI Components in a New Managed Bean     Expand the DataControl > Column1VO Select Column1 attribute and Drag and Drop it to FormLayout Menu will appear select Single Selection > ADF One Choice List as Shown in the Slide     8. Your Final Page will look like this below slide     9. Congratulation you have successfully finished. Test Your Work Your LovDemo Page is Ready     Conclusion With Oracle ADF application development becoming fast and easy. See how easy is to create LOVs in your ADF application as like in Oracle Forms

1. Create a New Application New > Applications > Fusion Web Application (ADF) Application Name – LovApp Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.lov   2....

Create Master Detail Form in Oracle ADF

1. Create a New Application New > Applications > Fusion Web Application (ADF)     Application Name – MasterDetailApp Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.masterdetail             2. We need two tables one table will be act as Master table and second table will be act as Child or detail table. Lets Create two tables CREATE TABLE master_table_demo (    -- --------------------      -- Data Columns      -- --------------------       Column1                    VARCHAR2(100),      Column2                    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 ); CREATE TABLE detail_table_demo (     -- --------------------       -- Data Columns       -- --------------------        Column1                  VARCHAR2(100),       Column2                  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 );   Note – Consider Master Table is Linked to Detail Table with Column1   3. Lets put some data in the tables -- Insert Data into Master Table INSERT INTO master_table_demo VALUES ( 'VAL1', 'VAL2', SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO master_table_demo VALUES ( 'VAL3', 'VAL4', SYSDATE, 0, SYSDATE, 0, 0);   -- Insert Data into Detail Table INSERT INTO detail_table_demo VALUES ( 'VAL1', 'VAL6', SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO detail_table_demo VALUES ( 'VAL3', 'VAL8', SYSDATE, 0, SYSDATE, 0, 0);   4. Create Master EO and VO (Entity Object and View Object) Right Click on Model > New > ADF Business Components > Entity Object Package -- Demo.adf.masterdetail.model.entities Name – MasterEO Schema Object -- MASTER_TABLE_DEMO   Note – By default ROWID will be the primary key if we will not make any column to be primary key in Attribute Setting Page   Check the Accessors, Create Method, and Remove Method Check Generate Default View Object CheckBox Package – Demo.adf.masterdetail.model.queries Name – MasterVO   5. Create Detail EO and VO (Entity Object and View Object) Right Click on Model > New > ADF Business Components > Entity Object Package -- Demo.adf.masterdetail.model.entities Name – DetailEO Schema Object -- DETAIL_TABLE_DEMO   Note – By default ROWID will be the primary key if we will not make any column to be primary key in Attribute Setting Page   Check the Accessors, Create Method, and Remove Method Check Generate Default View Object CheckBox Package – Demo.adf.masterdetail.model.queries Name – DetailVO   6. Create ViewLink between MasterVO and DetailVO Right Click on Model > New > ADF Business Components > View Link Package -- Demo.adf.masterdetail.model.queries Name – MasterDetailVL Display Name – Master Detail View Link Extends – Null (Blank)     Expand MasterVO in the Source Section and select Column1 do the same for DetailVO in the destination and press Add button then NEXT (Because Column1 is common column between both the tables as per our assumption to create view link)     Leave the default Accessors Names as shown in slide and press Finish     7. Create AM (Application Module) Right Click on Model > New > ADF Business Components > Application Module Package -- Demo.adf.masterdetail.model.services Name – MasterDetailAM Display Name -- Master Detail Application Module     Select MasterVO and DetailVO via MasterDetailVL and shuffle to right in Data Model       Check Generate Application Module Class: MasterDetailAMImpl       8. Create JSF Page Right Click on ViewController > New > Web Tier > JSF > JSF Page File Name – MasterDetail.jspx Initial Page Layout and Content – select Blank Page Expand Page Implementation and select Automatically Expose UI Components in a New Managed Bean   Refine Page Layout As below -- 1. Drop PanelSplitter from the Components Palette 2. Drop PanelBox then drop Panel Accordion in the First facet of the Panel-splitter and set Text – Master 3. Drop another Panel-splitter in second facet and set the Orientation property to Vertical from Property Inspector 4. Drop Panel Accordion in the first facets of the Last panel splitter set Text – Detail 5. Drop Panel Accordion in the Second facet of the last panel-splitter set Text – Edit Detail Page and structure will look like as below slide –          9. Create Data-bound Components in Page Expand the Data Controls Drag MasterVO1 to Detail Panelbox and choose Form > ADF Read-only Form. Choose the fields as shown in the slide       Note – Select Checkbox “Include Navigation Controls”     Expand the Data Controls Drag DetailVO1 to Detail Panelbox and choose Table > ADF Read-only Table     Note -- Select CheckBox “Enable Sorting” and “Enable Filtering” and Under Row Selection select “Multiple Rows”     Expand the same DetailVO1 node from data control and drag to Edit Detail section and choose Form > ADF Form. Choose the fields as shown in the slide   Note – Select CheckBox Include Submit Button     Final page will look like this following slide –     Set Style Class Property to AFStrechWidth for af:panelAccordion – pa2 Panel as shown in slide. For Accordion to stretch the table at Runtime 10. Congratulation you have successfully finished. Test Your Work Your Master Detail Page is Ready  

1. Create a New Application New > Applications > Fusion Web Application (ADF)     Application Name – MasterDetailApp Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix...

Create Simple Search form in Oracle ADF

1. Create a New Application New > Applications > Fusion Web Application (ADF) Application Name – SearchForm Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.searchform             2. Create Test Table and insert data some data in it (For Testing Purpose) CREATE TABLE xx_search_demo (    -- ---------------------      -- Data Columns      -- ---------------------      column1                  VARCHAR2(100),      column2                  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_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO xx_search_demo VALUES (‘val3’, ’val4’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO xx_search_demo VALUES (‘val5’, ’val6’, SYSDATE, 0, SYSDATE, 0, 0);   3. Create EO Right Click on Model > New > ADF Business Components > Entity Object     Package -- Demo.adf.searchform.model.entities Name – SearchEO Schema Object – XX_SEARCH_DEMO Note – By default ROWID will be the primary key if we will not make any column to be primary key in Attribute Settings Page  Check the Accessors, Create Method, and Remove Method         Check Generate Default View Object CheckBox Package – Demo.adf.searchform.model.queries Name – SearchVO   Check Application Module CheckBox Package – Demo.adf.searchform.model.services Name – SearchAM       4. Define Bind Variables Double Click on SearchVO in Model Project go to query page   Bind Variable name and type as following make sure required check box is un-checked Name – Col1 Type -- String     5. Create Named View Criteria Double Click on SearchVO in Model Project go to query page. Expand the View Crriteria accordion and click on Green button     View Criteria is actually conditions on VOs which you usually define declaratively      1.      Expand the View Critieria Section in SearchVO page and click the Green plus sign      2.      Give a proper name to your View Criteria           Criteria Name -- SearchVOCriteria      3.      Click on Add Item            Click the ( ) group press Add item and select values as sown in slide make sure you have selected the bind variable Col1           Attribute – Column1           Operator – Equals           Operand – Bind Variable           Parameter – Col1           Un-check Ignore Case and Check Ignore Null Values     6. Create Search Form Right Click on ViewController > New > Web Tier > JSF > JSF Page File Name – Search Initial Page Layout and Content – Quick Start Layout Click on Browse and select One Column Stretched and check Apply Theme       Expand Page Implementation and Select Automatically Expose UI Components in a New Managed Bean Select SearchVO and Expand the Data Control panel and Drag and drop the Named View Critieria “SearchVOCriteria” to the page Choose Query > ADF Query Panel with Table as shown in the slide         The Page would look like this --     7. Refine Layout Change the Header from “SearchEO” to “Search Demo”. To change select panel Header and change Text property to “Simple Search Demo”   Note - You can change form properties like Column names and page width as per your requirements   8. Congratulation you have successfully finished. Test Your Work Your Simple Search Form is Ready       Expand the Bind variable accordion and click on Green button  

1. Create a New Application New > Applications > Fusion Web Application (ADF) Application Name – SearchForm Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix...

ADF Hello World Tutorial

1. Create a New Application New > Applications > Fusion Web Application (ADF)     Application Name – HelloWorld Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix – Demo.adf.helloworld             2. Create JSF page You will see Model and ViewController in HelloWorld application. Now Click on ViewController and choose New Web Tier > JSF > JSF Page     File Name – HelloWorld.jspx Check “Create XML Document (*.jspx)” Select “Blank Page” in “Initial Page Layout and Content” Section Select “Automatically Expose UI Components in a New Managed Bean” in “Page Implementation” Section     3. Drag Decorative Box from Layout option available in Component Palate     4. Drag item of type “Input Text”, “Button” on the center face of decorativeBox from Common Components Section     5. Drag item of type “Output Text” on Top of decorativeBox from Common Components Section     6. Select “af:decorativeBox” then go to Property Pallete and Double Click “Panel Group Layout” in “Layout” Section     Select “af:panelGroupLayout – scroll” and set following property Halign -- center       7. Select “top” then go to Property Pallete and Double Click “Panel Group Layout” in “Layout” Section       Select “af:panelGroupLayout – scroll” under “top” and set following property Halign – center     8. Set Bind Action Property for commandButton Double Click on commandButton that will open set Bind Action Property window as shown below     Click Ok and then Write Following Code in cb1_action() which you have created just now   public String cb1_action() { RichInputText inputText = getIt1();       String name = "Hello "+(String)inputText.getValue()+ "!!";       ot1.setValue(name);       return null; }   9. following properties for commandButton, input text and outputText   Set Following Properties for inputText item Label – Name 1. Id – it1   Set Following Properties for commandButton item Id – Go Action – cb1_action() Text – Go   Set Following Properties for outputText item Id – ot1 Value – Null (Blank) InlineStyle -- color:Red; font-family:Georgia, 'Times New Roman', times, Serif; font-size:xx-large; Color – Red Font -- Georgia, 'Times New Roman', times, Serif Size -- xx-large   10. Congratulation you have successfully finished. Test Your Work Your Hello World Page is Ready          

1. Create a New Application New > Applications > Fusion Web Application (ADF)     Application Name – HelloWorld Directory -- (Jdev install dir)/jdeveloper/(project name) Application Package Prefix...

Call OAF Page from D2K form

This blog is about to call OAF page from D2K form. We will take one D2K form from there we will try to call our OAF Page with parameters. In OAF page, there it will show that parameter values as message when it will open Let us Create Our OAF Page 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name – CallOAFfromD2KFormProject Name – CallOAFfromD2KProj Default Package -- prajkumar.oracle.apps.fnd.CallOAFfromD2K 2. Create Application Module AMCallOAFfromD2KProj right click > New > ADF Business Components > Application ModuleName -- CallOAFfromD2KAMPackage -- prajkumar.oracle.apps.fnd.CallOAFfromD2K.server Check Generate JavaFile(s) 3. Create a OA components PageCallOAFfromD2KProj right click > New > OA Components > PageName -- CallOAFfromD2KPG Package -- prajkumar.oracle.apps.fnd.CallOAFfromD2K.webui 4. Modify the Page Layout (Top-level) RegionID -- PageLayoutRNRegion Style – pageLayoutForm Property – TrueAuto Footer -- TrueWindow Title – OAF Page Call From D2K Form Window TitleTitle -- OAF Page Call From D2K Form HeaderAM Definition -- prajkumar.oracle.apps.fnd.CallOAFfromD2K.server.CallOAFfromD2KAM 5. Consider following D2K formThis Form has First Name and Last Name. We will send First Name and Last Name values to our OAF page as parameter  6. Add following Code in WHEN_BUTTON_PRESSED trigger of SUBMIT button  DECLAREBEGIN fnd_function.execute (   FUNCTION_NAME  =>'CALL_OAF_FROM_D2K',     OPEN_FLAG              =>'Y',     SESSION_FLAG         =>'Y',     OTHER_PARAMS     =>'FIRSTNAME=' || :CALLOAFFROMD2KBLOCK.FIRST_NAME || '&LASTNAME=' || :CALLOAFFROMD2KBLOCK.LAST_NAME );END; Note – Here FUNCTION_NAME is OAF page function name  7. Add a Controller in OAF PageSelect PageLayoutRN right click > Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.CallOAFfromD2K.webui Class Name -- CallOAFfromD2KCO 8. Add following Code in Controller import oracle.apps.fnd.framework.OAException;...public void processRequest(OAPageContext pageContext, OAWebBean webBean){ super.processFormRequest(pageContext, webBean);    String firstName = pageContext.getParameter("FIRSTNAME") ; String lastName = pageContext.getParameter("LASTNAME") ; String message = "Hello " + firstName + " " + lastName; throw new OAException(message, OAException.INFORMATION);} 9. Build Your Controller 10. Congratulation you have successfully finished. Run Form and Test Your Work   

This blog is about to call OAF page from D2K form. We will take one D2K form from there we will try to call our OAF Page with parameters. In OAF page, there it will show that parameter values as...

Execute parameterized PL SQL procedure from OAF page

Let us try to call PL/SQL package from OAF page. We will try to send two interger values to one PL/SQL procedure which will do sum of that numbers and will return back sum of that numbers 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- ParameterizedProcProjProject Name – ParameterizedProcDemoDefault Package -- prajkumar.oracle.apps.fnd.parameterizedprocdemo 2. Create Application Module AMRight click on ParameterizedProcProj > New > ADF Business Components > Application ModuleName -- ParameterizedProcDemoAMPackage -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.serverCheck Application Module Class: ParameterizedProcDemoAMImpl Generate JavaFile(s) 3. Create a New PageRight click on ParameterizedProcProj > New > Web Tier > OA Components > PageName -- ParameterizedProcDemoPGPackage -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webui 4. Select region1 and set the following properties:ID -- PageLayoutRNRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.server.ParameterizedProcDemoAMWindow Title – Execute Paramterized Procedure Demo Page WindowTitle – Execute Paramterized Procedure Demo Page HeaderAuto Footer – True 5. Add a New Region MainRNSelect PageLayoutRN right click > New > RegionID -- MainRNRegion Style – messageComponentLayout 6. Create messageTextInput Items Create item1Select MainRN > New > messageTextInputSet following Properties for Text Item1ID – item1Item Style – messageTextInputData Type -- NumberPrompt – Text Item1Maximum Length – 20Length -- 20 Create item2Select MainRN > New > messageTextInputSet following Properties for Text Item1ID – item2Item Style – messageTextInputData Type -- NumberPrompt – Text Item2Maximum Length – 20Length -- 20 7. Create a Submit ButtonRight Click on MainRN > New > messageLayoutSelect newly created messageLayout right click > New > itemSet Following Properties for newly created itemID – SumItem Style – submitButtonAttribute Set -- /oracle/apps/fnd/attributesets/Buttons/GoPrompt – Sum 8. Run Your Page UI is ready --   9. Let us create a package and package body which we will call from OAF pageThis Package takes three parameters all are number. First two are IN parameters and last is OUT as sum of first two numbers Package Spec CREATE OR REPLACE PACKAGE APPS.test_package AUTHID CURRENT_USERISPROCEDURE data_sum(   item1            IN      NUMBER,     item2            IN      NUMBER,     data_sum     OUT  NUMBER);END test_package;/SHOW ERRORS;EXIT; Package Body CREATE OR REPLACE PACKAGE BODY APPS.test_package IS PROCEDURE data_sum(   item1          IN    NUMBER,    item2          IN    NUMBER,    data_sum  OUT NUMBER)ISBEGIN data_sum := item1 + item2;END data_sum; END test_package;/SHOW ERRORS;EXIT; 10. Add Following Code in your AMImpl Class (ParameterizedProcDemoAMImpl.java) import oracle.apps.fnd.framework.server.OADBTransaction;import oracle.apps.fnd.framework.server.OADBTransactionImpl;import oracle.jdbc.OracleCallableStatement;import java.sql.Types;import oracle.apps.fnd.framework.OAException; ... public String dataSumAction(String item1,String item2){ OADBTransaction oadbtransaction = (OADBTransaction)getTransaction();  OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();  String retValues;  StringBuffer str = new StringBuffer(); str.append( " BEGIN "); str.append( " test_package.data_sum( "); str.append( "       item1           => :1, "); str.append( "       item2           => :2, "); str.append( "       data_sum    => :3  "); str.append( "    ); "); str.append( " END; ");  OracleCallableStatement oraclecallablestatement =   (OracleCallableStatement)oadbtransaction.createCallableStatement(str.toString(), 1);  try{  oraclecallablestatement.setInt(1,  Integer.parseInt(item1) );  oraclecallablestatement.setInt(2,  Integer.parseInt(item2) );   oraclecallablestatement.registerOutParameter(3, Types.VARCHAR);   oraclecallablestatement.execute();                      retValues = oraclecallablestatement.getString(3); } catch(Exception e) {  throw OAException.wrapperException(e); } return retValues;} 11. Add Controller for Page ParameterizedProcDemoPG Select PageLayoutRN right click Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.parameterizedprocdemo.webuiClass Name -- ParameterizedProcDemoCOAdd Following Code in Controller import oracle.apps.fnd.framework.OAException;import oracle.apps.fnd.framework.OAApplicationModule;import java.io.Serializable; ...public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){ super.processFormRequest(pageContext, webBean);    OAApplicationModule am = pageContext.getApplicationModule(webBean);      if (pageContext.getParameter("Sum") != null)          {             Serializable[] parameters1 = { pageContext.getParameter("item1"),       pageContext.getParameter("item2"),      };                      String retVals1 = (String)am.invokeMethod("dataSumAction", parameters1);   String message = "Sum:  " + retVals1;                      throw new OAException(message, OAException.INFORMATION); }} 12. Congratulation you have successfully finished. Run Your ParameterizedProcDemoPG page and Test Your Work     

Let us try to call PL/SQL package from OAF page. We will try to send two interger values to one PL/SQL procedure which will do sum of that numbers and will return back sum of that numbers   1. Create a...

Implement Master Detail Relationship in OAF Page

Let us try to implement Master Detail Relationship in advanceedTable. We will create two tables master table and child table. Both have relationship with each other with Column1  (Note - Column1 is a primary key in both tables) 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- MasterDetailProjProject Name – MasterDetailDemo Default Package -- prajkumar.oracle.apps.fnd.masterdetaildemo 2. Create Application Module AMMasterDetailDemo right click > New > ADF Business Components > Application ModuleName -- MasterdetailDemoAMPackage -- prajkumar.oracle.apps.fnd.masterdetaildemo.serverCheck Generate JavaFile(s) 3. We need two tables one table will be act as Master table and second table will be act as Child or detail table. Lets Create two tables-- Master TableCREATE TABLE master_table_demo(   -- ---------------------      -- Data Columns    -- ---------------------    Column1                     VARCHAR2(100),    Column2                     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);  -- Detail TableCREATE TABLE detail_table_demo(   -- ---------------------      -- Data Columns    -- ---------------------    Column1                     VARCHAR2(100),    Column2                     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);  Note – Consider Master Table is Linked to Detail Table with Column1 4. Lets put some data in the tables-- Insert Data into Master TableINSERT INTO master_table_demo VALUES ( ‘VAL1’, ‘VAL2’, SYSDATE, 0, SYSDATE, 0, 0);INSERT INTO master_table_demo VALUES ( ‘VAL3’, ‘VAL4’, SYSDATE, 0, SYSDATE, 0, 0); -- Insert Data into Detail TableINSERT INTO detail_table_demo VALUES ( ‘VAL1’, ‘VAL6’, SYSDATE, 0, SYSDATE, 0, 0); INSERT INTO detail_table_demo VALUES ( ‘VAL3’, ‘VAL8’, SYSDATE, 0, SYSDATE, 0, 0); 5. Create a New Entity Object (EO) for Master TableRight click on MasterDetailDemo > New > ADF Business Components > Entity ObjectName – MasterEOPackage -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.serverDatabase Objects -- master_table_demo Note -- Make Column1 as a primary key   Check the Accessors, Create Method, Validation Method and Remove Method 6. Create a New Entity Object (EO) for Detail TableRight click on MasterDetailDemo > New > ADF Business Components > Entity ObjectName – DetailEOPackage -- prajkumar.oracle.apps.fnd.masterdetaildemo.schema.serverDatabase Objects -- detail_table_demo Note -- Make Column1 as a primary key   Check the Accessors, Create Method, Validation Method and Remove Method Note – Column1 in both tables is common Column to make parent child relationship 7. Lets Create View Object for Master TableRight click on MasterDetailDemo > New > ADF Business Components > View ObjectName -- MasterVOPackage -- prajkumar.oracle.apps.fnd.masterdetaildemo.serverIn Step2 in Entity Page select MasterEO and shuttle them to selected listCreate transient item by clicking on NewName – DetailFlag Type -- Boolean  In Step3 in Attributes Window select columns Column1, Column2, DetailFlag and shuttle them to selected list In Java page deselect Generate Java file for View Object Class: MasterVOImpl 8. Lets Create View Object for Detail TableRight click on MasterDetailDemo > New > ADF Business Components > View ObjectName -- DetailVOPackage -- prajkumar.oracle.apps.fnd.masterdetaildemo.serverIn Step2 in Entity Page select DetailEO and shuttle them to selected listIn Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected list In Java page deselect Generate Java file for View Object Class: DetailVOImpl 9. Create View Link Add Your View Object to Root UI Application ModuleRight click on MasterDetailDemo > New > ADF Business Components > View LinkName – MasterdetailDemoVL Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.server  10. Add Your View Object to Root UI Application ModuleRight click on MasterdetailDemoAM > Application Modules > Data Model > Select MasterVO, DetailVO via ViewLink, DetailVO and shuttle to Data Model list  11. Create a New PageRight click on MasterdetailDemo > New > Web Tier > OA Components > PageName -- MasterdetailDemoPG Package -- prajkumar.oracle.apps.fnd.masterdetaildemo.webui 12. Select MasterdetailDemoPG and go to the strcuture pane where a default region has been created 13. Select region1 and set the following properties:ID -- PageLayoutRNRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAMWindow Title – Master Detail Demo Page WindowTitle – Master Detail Demo Page Header Auto Footer – True 14. Add a New Region MainRNSelect PageLayoutRN right click > New > RegionID -- MainRN Region Style – header 15. Create a Master Table RegionSelect MainRN > New > RegionID – MainTableRNRegion Style -- advancedTableView Instance -- MasterVO1Detail View Attribute – DetailFlagChild View Attribute -- Column1View Link Instance -- MasterdetailDemoVL1Width – 100% Rendered – True 16. Create Columns and their items for MainTableRNCreate Column1Select MainTableRN > New > columnSelect column1 > New > ItemID – item1Item Style – messageStyledTextView Attribute – Column1 Create Column2Select MainTableRN > New > columnSelect column2 > New > ItemID – item2Item Style – messageStyledText View Attribute – Column2 17. Create a Detail RegionSelect MainTableRN > New > detailA new Region will be get created under detail set following properties for that regionID – DetailRN Region Style – header 18. Create a DetailTable RegionSelect DetailRN > New > RegionFor New region set following PropertiesID – DetailTableRNRegion Style – advancedTableView Instance -- DetailVO2View Link Instance -- MasterdetailDemoVL1Width – 100%Rendered – True 19. Create Columns and their items for DetailTableRNCreate Column3Select DetailTableRN > New > columnSelect column3 > New > ItemID – item3Item Style – messageStyledTextView Instance – DetailVO2View Attribute – Column1 Create Column4Select DetailTableRN > New > columnSelect column4 > New > ItemID – item4Item Style – messageStyledTextView Instance – DetailVO2 View Attribute – Column2 20. Add Controller for Page MasterdetailDemoPG Select PageLayoutRN right click Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.masterdetaildemo.webuiClass Name -- MasterdetailDemoCOSet Following Code in CO  import oracle.apps.fnd.framework.webui.OAPageContext;import oracle.apps.fnd.framework.webui.beans.OAWebBean;import prajkumar.oracle.apps.fnd.masterdetaildemo.server.MasterdetailDemoAMImpl;...public void processRequest(OAPageContext pageContext, OAWebBean webBean){ super.processRequest(pageContext, webBean); MasterdetailDemoAMImpl AM =  (MasterdetailDemoAMImpl)pageContext.getApplicationModule(webBean); pageContext.writeDiagnostics(this, "Calling Method", 1); AM.MasterDetails(pageContext,webBean);} 21. Add Following Code in your AMImpl Class (MasterdetailDemoAMImpl.java) import oracle.apps.fnd.framework.webui.OAPageContext;import oracle.apps.fnd.framework.webui.beans.OAWebBean;...public void MasterDetails(OAPageContext pageContext,OAWebBean webBean) {  MasterVOImpl pvo = getMasterVO1();         pvo.executeQuery(); }22. Final Structure pane will look like following picture 23. Congratulation you have successfully finished. Run Your MasterdetailDemoPG page and Test Your Work   

Let us try to implement Master Detail Relationship in advanceedTable. We will create two tables master table and child table. Both have relationship with each other with Column1   (Note - Column1 is a...

Implement Train in OAF Page

Let us try to implement train between three pages. Consider three pages each having Text Item 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- TrainProjProject Name – TrainDemoProjDefault Package -- prajkumar.oracle.apps.fnd.traindemo 2. Create Application Module AMTrainDemoProj right click > New > ADF Business Components > Application ModuleName -- TrainDemoAMPackage -- prajkumar.oracle.apps.fnd.traindemo.serverCheck Generate JavaFile(s) Create Three Pages TrainDemoPG1, TrainDemoPG2 and TrainDemoPG3 as similar way as mention below to create TrainDemoPG13. Create a OA components PagesTrainDemoProj right click > New > OA Components > PageName – TrainDemoPG1Package -- prajkumar.oracle.apps.fnd.traindemo.webui 4. Modify the Page Layout (Top-level) Region AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitleTrain Demo Window TitleTitleTrain Demo Page HeaderAM Definitionprajkumar.oracle.apps.fnd.traindemo.server.TrainDemoAM 5. Create the Second Region (Main Content Region)Select PageLayoutRN right click > New > Region AttributePropertyIDMainRNRegion StylemessageComponentLayout  Create Text Items for all three pages say TextItemPage1, TextItemPage2 and TextItemPage3 in respective pages TrainDemoPG1, TrainDemoPG2 and TrainDemoPG3 in similar way of as mention below to create TextItemPage1 in page TrainDemoPG16. Create Text ItemsSelect MainRN right click > New > messageTextInputPrompt – TextItemPage1Length -- 20 7. Create a Standalone Train RegionTrainDemoProj > New > Web Tier > OA Components > RegionName -- TrainRNPackage – prajkumar.oracle.apps.fnd.traindemo.webuiStyle – trainSelect TrainRN inStructure pane and open property inspector and set Allow Interaction property to True 8. Add Three Train Nodes to TrainRNRight Click on TrainRN in Structure pane > New > LinkSet the link properties as follow -- ID – TrainStep1Item Style – linkText – Step 1Destination URI – OA.jsp?page=/prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG1 Right Click on TrainRN in Structure pane > New > LinkSet the link properties as follow -- ID – TrainStep2Item Style – linkText – Step 2Destination URI – OA.jsp?page=/prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG2 Right Click on TrainRN in Structure pane > New > LinkSet the link properties as follow -- ID – TrainStep3Item Style – linkText – Step 3Destination URI – OA.jsp?page=/prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG3 9. Add Train Region to each of your PagesFor each of three pages in multistep flow, right click the pageLayoutRN in structure panel, and select New > location from page Context menuSet following properties as follow -- ID – TrainDemoRNExtends -- /prajkumar/oracle/apps/fnd/traindemo/webui/TrainRN 10. Create a Standalone (Shared) TrainFooterRNTrainDemoProj > New > Web Tier > OA Components > RegionName -- TrainFooterRNPackage -- prajkumar.oracle.apps.fnd.traindemo.webuiRegion Style -- pageButtonBar 11. Add navigrationBarSelect TrainFooterRN in Structure pane right click > New > RegionSet the region properties as follows:ID -- NavBarRegion Style – navigationBarFirst Step – 1Last Step – 3 12. Add Links to the navigrationBarRight Click on NavBar > New > linkSet Item’s properties as follows:ID – Step1LinkItem Style – linkText – Step 1 of 3: Page1Warn About Changes – FalseDestination URI -- /prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG1 Right Click on NavBar > New > linkSet Item’s properties as follows:ID – Step2LinkItem Style – linkText – Step 2 of 3: Page2Warn About Changes – FalseDestination URI -- /prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG2 Right Click on NavBar > New > linkSet Item’s properties as follows:ID – Step3LinkItem Style – linkText – Step 3 of 3: Page3Warn About Changes – FalseDestination URI -- /prajkumar/oracle/apps/fnd/traindemo/webui/TrainDemoPG3 13. Initialize the Footer RegionSelect TrainFooterRN in Structure pane right click > Set New ControllerClass Name -- TrainDemoCOPackage Name – prajkumar.oracle.apps.fnd.traindemo.webuiAdd following code in processRequest() import oracle.apps.fnd.framework.webui.beans.nav.OATrainBean;import oracle.apps.fnd.framework.webui.beans.nav.OANavigationBarBean;...public void processRequest(OAPageContext pageContext, OAWebBean webBean){ super.processRequest(pageContext, webBean); OATrainBean trainBean =  (OATrainBean)pageContext.getPageLayoutBean().getLocation(); trainBean.prepareForRendering(pageContext);  int step = trainBean.getSelectedTrainStepRenderedIndex(); OANavigationBarBean navBean =  (OANavigationBarBean)webBean.findChildRecursive("NavBar"); navBean.setValue(step+1);} // end processRequest() 14. Add the Navigation Region to your pagesFor each of three pages in the multistep flow, right click the PageLayoutRN in Structure pane and select New > RegionSet the region’s properties as follow:ID -- PageButtonBarStyle -- pageButtonBarExtends -- /prajkumar/oracle/apps/fnd/traindemo/webui/TrainFooterRN15. Congratulation you have successfully finished. Run Your TrainDemoPG1 page and Test Your Work   

Let us try to implement train between three pages. Consider three pages each having Text Item   1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle...

OAF Developer Guide

      Here I will be sharing all the Oracle Applications Framework related articles  Item TypeAuthor12345678910111213141516171819202122232425262728D2k to OAF TransformationInstall OA Framework jDeveloperOAF Hello World TutorialImplement External LOV in OAFImplement Dependent LOV in OAFImplement PopList in OA FrameworkCreate Data Entry OAF PageCreate Auto Customization Criteria OAF Search PageCreate OAF Search PageClear/ Reset Result Table of Search page in OAFUpdate Records in OAF PageCreate and Update on one click in OA FrameworkDelete records in OAF PageImplement Train in OAF PageCall D2K Form from OAF PageCall OAF Page From D2K FormGet Host Name and URL of OAF PagePartial Page Rendering in OAFImplement Master Detail Relationship in OAF PageExecute parameterized PL SQL procedure from OAF pageWorking with Key Flex Fields in OAFSet default Value for messageTextInput itemOAF Page to Upload Files into Server from Local MachineDeploy JAR File into R12 in OA ServerImport Data from Excel sheet to DB Table Import Data from *.xlsx file to DB TableDeploy OAF pageBounce Apache ServerPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet RajkumarPuneet Rajkumar

      Here I will be sharing all the Oracle Applications Framework related articles  Item Type Author 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 D2k to OAF Transformation Install OA...

Create and Update on one click in OA Framework

 We will try to implement Search Page with one text item as ID. Based on ID control will go to second page. Second page contain three text rows. ID will be displayed on second page as Styled Text in all three rowsIf match will be found based on ID then search result will come. If not found then empty rows will come. Based on that new data can be inserted there and existing data can be updated directly with one button click ‘Apply’  1. Create a New Workspace and ProjectRight click Workspaces and click create new OAworkspace.File Name – PrajkumarSearchProject Name -- SearchDemo package -- prajkumar.oracle.apps.fnd.searchdemo 2. Create a New Application Module (AM)Right Click on SearchDemo > New > ADF Business Components > Application Module Name -- SearchAMPackage -- prajkumar.oracle.apps.fnd.searchdemo.server 3. Enable Passivation for the Root UI Application Module (AM)Right Click on SearchAM > Edit SearchAM > Custom Properties >Name – RETENTION_LEVELValue – MANAGE_STATEClick add > Apply > OK 4. Create Test Table and insert data some data in it (For Testing Purpose)CREATE TABLE xx_create_upd_demo(    -- ---------------------     -- Data Columns     -- ----------------------     column1                  VARCHAR2(100),     column2                  VARCHAR2(100),     column3                  VARCHAR2(100),      column4                  NUMBER,      -- ---------------------      -- 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 SearchDemo > New > ADF Business Components > Entity ObjectName – SearchEOPackage -- prajkumar.oracle.apps.fnd.searchdemo.schema.serverDatabase Objects -- xx_create_upd_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 SearchDemo > New > ADF Business Components > View ObjectName -- SearchVOPackage -- prajkumar.oracle.apps.fnd.searchdemo.serverIn Step2 in Entity Page select SearchEO and shuttle them to selected listIn Step3 in Attributes Window select columns Column1, Column2, Column3, Column4 and shuttle them to selected listIn Java page select Generate Java File for View Object Class: SearchVOImpl and Generate Java File for View Row Class: SearchVORowImpl 7. Add Your View Object to Root UI Application ModuleSelect Right click on SearchAM > Application Modules > Data Model >Select SearchVO and shuttle to Data Model list 8. Create a New PageRight click on SearchDemo > New > Web Tier > OA Components > PageName -- SearchPGPackage -- prajkumar.oracle.apps.fnd.searchdemo.webui 9. Select the SearchPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties:ID – PageLayoutRNScope -- PublicRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAMWindow Title –Page WindowTitle – Page HeaderAuto Footer – True 11. Create the Second Region (Main Content Region)ID – MainRNRegion Style -- messageComponentLayoutAuto Footer – True 12. Create the first Item (Empty Field)MainRN > New > messageTextInputSet Following properties for new itemID – MyIdStyle Property – messageTextInputPrompt – IdData Type – Number Length – 20Maximum Length – 100 13. Create a container Region for Go-ButtonMainRN > messageLayoutSet ID -- ButtonLayout 14. Create a Item (Go Button)Select ButtonLayout > New > ItemID – GoItem Style – submitButtonAttribute -- /oracle/apps/fnd/attributesets/Buttons/Go 15. Create a New Second PageRight click on SearchDemo > New > Web Tier > OA Components > PageName -- CreateUpdPGPackage -- prajkumar.oracle.apps.fnd.searchdemo.webui 16. Select the CreateUpdPG and go to the strcuture pane where a default region has been created 17. Select region1 and set the following properties:ID – PageLayoutRNScope -- PublicRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAMWindow Title –Page WindowTitle – Page HeaderAuto Footer – True 18. Create the Second Region (Main Content Region)ID – MainRNRegion Style -- tableAuto Footer – TrueRecords Displayed – 3 19. Create the first Item (Empty Field)MainRN > New > itemSet Following properties for new itemID – Column1Style Property – messageTextInputPrompt – Column1Data Type – VARCHAR2 Length – 20Maximum Length – 100View Instance -- SearchVO1View Attribute -- Column1 Create Second ItemMainRN > New > itemSet Following properties for new itemID – Column2Style Property – messageTextInputPrompt – Column2Data Type – VARCHAR2 Length – 20Maximum Length – 100View Instance -- SearchVO1View Attribute -- Column2 Create Third ItemMainRN > New > itemSet Following properties for new itemID – Column3Style Property – messageTextInputPrompt – Column3Data Type – VARCHAR2 Length – 20Maximum Length – 100View Instance -- SearchVO1View Attribute -- Column3 Create Fourth ItemMainRN > New > itemSet Following properties for new itemID – Column4Style Property – messageStyledTextPrompt – Column4Data Type – NUMBERView Instance -- SearchVO1View Attribute -- Column4 20. Add Controller for Page SearchPG Select PageLayoutRN right click Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.searchdemo.webuiClass Name -- SearchCOAdd Following code in that controller import com.sun.java.util.collections.HashMap;import oracle.apps.fnd.framework.webui.OAWebBeanConstants; public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){  super.processFormRequest(pageContext, webBean);  if (pageContext.getParameter("Go") != null)  {   String userContent = pageContext.getParameter("MyId");   HashMap hmap = new HashMap();   hmap.put("MyId", userContent);    pageContext.setForwardURL(       "OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/CreateUpdPG",       null,                                    OAWebBeanConstants.KEEP_MENU_CONTEXT,                                                           null,                                                           hmap,                                    true,        OAWebBeanConstants.ADD_BREAD_CRUMB_NO,     OAWebBeanConstants.IGNORE_MESSAGES);  }}  21. Add Return Link to come back to SearchPG from CreateUpdPGSelect CreateUpdPG in Structure Panel Select PageLayoutRN > New > returnNavigationID – ReturnLinkDestination URI – OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG&retainAM=YText – Return to SearchPG 22. Add pageButtonBar region to implement Apply ButtonRight click on PageLayout > New > RegionSet following properties for new regionID -- ButtonBarRegion Style – pageButtonBarSelect ButtonBar right click > New > ItemSelect newly created item and set following properties –ID – ApplyItem Style – submitButtonAttribute Set -- /oracle/apps/fnd/attributesets/Buttons/Apply 23. Add Controller for Page CreateUpdPG Select PageLayoutRN right click Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.searchdemo.webuiClass Name -- CreateUpdCOAdd Following code in that controller import java.io.Serializable;import oracle.apps.fnd.framework.OAApplicationModule;import oracle.apps.fnd.framework.webui.OAWebBeanConstants;public void processRequest(OAPageContext pageContext, OAWebBean webBean){  super.processRequest(pageContext, webBean);  OAApplicationModule am = pageContext.getApplicationModule(webBean);   String val = pageContext.getParameter("MyId");   Serializable[] params = { val };  am.invokeMethod("createRow", params);               } public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){  super.processFormRequest(pageContext, webBean);  OAApplicationModule am = pageContext.getApplicationModule(webBean);   if (pageContext.getParameter("Apply") != null)  {  am.getTransaction().commit(); pageContext.setForwardURL(  "OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",         null,                  OAWebBeanConstants.KEEP_MENU_CONTEXT,                  null,                  null,                  true,                  OAWebBeanConstants.ADD_BREAD_CRUMB_NO,                  OAWebBeanConstants.IGNORE_MESSAGES);        }} 24. Add Following code in SearchAMImpl.java import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;import oracle.jbo.Row;public void createRow(String Val){  SearchVOImpl vo = getSearchVO1();  vo.initQuery(Val);   int rowCount = vo.getRowCount();  if ( rowCount < 3 )  {   for(int i = 3; i != rowCount ; rowCount++)   {           Row studrow = vo.createRow();     vo.last();    vo.next();                     vo.insertRow(studrow);    vo.setCurrentRow(studrow);    vo.getCurrentRow().setAttribute("Column4",Val);    studrow.setNewRowState(Row.STATUS_INITIALIZED);   }  } } 25. Add Following code in SearchVOImpl.java import oracle.jbo.domain.Number;import oracle.apps.fnd.framework.OAException;import oracle.apps.fnd.framework.server.OAViewObjectImpl;public void initQuery(String Val){  if ((Val != null) && (!("".equals(Val.trim()))))  {   // Do the following conversion for type consistency.   Number Val2 = null;                         try   {    Val2 = new Number(Val);   }    catch(Exception e)    {    throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");   }                               setWhereClause("Column4 = :1");   setWhereClauseParams(null); // Always reset   setWhereClauseParam(0, Val2);   executeQuery(); }} 26. Congratulation you have successfully finished. Run Your SearcgPG page and Test Your Work      

  We will try to implement Search Page with one text item as ID. Based on ID control will go to second page. Second page contain three text rows. ID will be displayed on second page as Styled Text in...

Oracle FNDLOAD Scripts

Download Script Upload Script  1. Lookups-- -------------FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_CUSTOM_LKP.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME="XXCUST" LOOKUP_TYPE="XX_LOOKUP_TYPE"  FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_CUSTOM_LKP.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  2. Concurrent Program-- ----------------------------- FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CUSTOM_CP.ldt PROGRAM APPLICATION_SHORT_NAME="XXCUST" CONCURRENT_PROGRAM_NAME="XX_CONCURRENT_PROGRAM"  FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_CUSTOM_CP.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  3. Profile-- --------- FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct XX_CUSTOM_PRF.ldt PROFILE PROFILE_NAME="XX_PROFILE_NAME" APPLICATION_SHORT_NAME="XXCUST"  $FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct XX_CUSTOM_PRF.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  4. Request Set and Link-- ------------------------------ FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XX_CUSTOM_RS.ldt REQ_SET REQUEST_SET_NAME='REQUEST_SET_NAME'  FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct  XX_CUSTOM_RS.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  5. FND Message-- ---------------------FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XX_CUSTOM_MESG.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME="XXCUST" MESSAGE_NAME="MESSAGE_NAME%"  FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XX_CUSTOM_MESG.ldt UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  6. D2K FORMS-- ------------------ $FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FRM.ldt FORM FORM_NAME="FORM_NAME"       $FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FRM.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  7. Form Function-- --------------------- FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FUNC.ldt FUNCTION FUNCTION_NAME="FORM_FUNCTION_NAME"  $FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XX_CUSTOM_FUNC.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  8. Alerts-- --------- FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct XX_CUSTOM_ALR.ldt ALR_ALERTS APPLICATION_SHORT_NAME=XXCUST ALERT_NAME="XX - Alert Name"  FNDLOAD apps/apps 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct XX_CUSTOM_ALR.ldt CUSTOM_MODE=FORCE  9. Value Set-- -------------- $FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XX_CUSTOM_VS.ldt VALUE_SET FLEX_VALUE_SET_NAME="XX Value Set Name"  $FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct XX_CUSTOM_VS.ldt - WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE  10. Data Definition and Associated Template--- ---------------------------------------------------------- FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD  $XDO_TOP/patch/115/import/xdotmpl.lct XX_CUSTOM_DD.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME='XXCUST' DATA_SOURCE_CODE='XX_SOURCE_CODE' TMPL_APP_SHORT_NAME='XXCUST' TEMPLATE_CODE='XX_SOURCE_CODE'  FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XX_CUSTOM_DD.ldt  11. DATA_TEMPLATE (Data Source .xml file)--- ---------------------------------------------------------- java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))' -LOB_TYPE DATA_TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME  java oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))' -LOB_TYPE DATA_TEMPLATE -LOB_CODE XX_TEMPLATE -XDO_FILE_TYPE XML -FILE_NAME $DATA_FILE_PATH/$DATA_FILE_NAME.xml -APPS_SHORT_NAME XXCUST -NLS_LANG en -TERRITORY US -LOG_FILE $LOG_FILE_NAME  12. RTF TEMPLATE (Report Layout .rtf file)--- ------------------------------------------------------- java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=XX_SERVICE_NAME)))' -LOB_TYPE TEMPLATE -LOB_CODE XX_TEMPLATE -APPS_SHORT_NAME XXCUST -LANGUAGE en -TERRITORY US -lct_FILE $XDO_TOP/patch/115/import/xdotmpl.lct -LOG_FILE $LOG_FILE_NAME  java oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME apps -DB_PASSWORD apps -JDBC_CONNECTION '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XX_HOST_NAME)(PORT=XX_PORT_NUMBER))(CONNECT_DATA=(SERVICE_NAME=SERVICE_NAME)))' -LOB_TYPE TEMPLATE -LOB_CODE XX_TEMPLATE -XDO_FILE_TYPE RTF -FILE_NAME $RTF_FILE_PATH/$RTF_FILE_NAME.rtf -APPS_SHORT_NAME XXCUST -NLS_LANG en -TERRITORY US -LOG_FILE $LOG_FILE_NAME

Download Script Upload Script   1. Lookups -- -------------FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XX_CUSTOM_LKP.ldt FND_LOOKUP_TYPE...

Get Host Name and URL of OAF Page

This blog is about to get Host name and URL of OAF page. We will try to implement one button which will give host and URL of OAF page 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- HostandURLProject Name – HostandURLProjDefault Package -- prajkumar.oracle.apps.fnd.hostandurl 2. Set Run Options in OA Project SettingSelect Your Project in the Navigator and choose Project PropertiesSelect Oracle Applications > Run OptionsSelect OADeveloperMode and OADiagnostic, and move them to selected Options List 3. Create Application Module AMHostandURLProj right click > New > ADF Business Components > Application ModuleName -- HostandURLAMPackage -- prajkumar.oracle.apps.fnd.hostandurl.serverCheck Generate JavaFile(s) 4. Create a OA components PageHostandURLProj right click > New > OA Components > PageName -- HostandURLPGPackage -- prajkumar.oracle.apps.fnd.hostandurl.webui 5. Modify the Page Layout (Top-level) Region  AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitleGet Host and URL Window TitleTitleGet Host and URL Page HeaderAM Definitionprajkumar.oracle.apps.fnd.hostandurl.server.HostandURLAM 6. Create the Second Region (Main Content Region)Select PageLayoutRN right click > New > Region  AttributePropertyIDMainRNRegion StylemessageComponentLayout 7. Create a container Region for Go-ButtonSelect MainRN right click > New > messageLayout  AttributePropertyRegionButtonLayout 8. Create a Item (Go Button)Select ButtonLayout > New > Item  AttributePropertyIDGoItem StylesubmitButtonAttribute Set/oracle/apps/fnd/attributesets/Buttons/Go 9. Add a ControllerSelect MainRN right click > Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.hostandurl.webuiClass Name -- HostandURLCO 10. Edit Your Controller Add Following Code in processFormRequestimport java.net.*;import java.io.*;import oracle.apps.fnd.framework.OAException;import oracle.apps.fnd.framework.webui.OAPageContext; public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){ super.processFormRequest(pageContext, webBean); if (pageContext.getParameter("Go") != null) {  // To get Host Name  try  {   InetAddress addr = InetAddress.getLocalHost();     byte[ ] ipAddr = addr.getAddress();     String hostname = "Host Name: " +addr.getHostName();     pageContext.putDialogMessage(new OAException(hostname,    OAException.WARNING));  }  catch (UnknownHostException e)    {    }   // To Get Page URL    String pageURL = "Current Page URL: " + pageContext.getCurrentUrl ();    pageContext.putDialogMessage(new OAException(pageURL,    OAException.WARNING)); }} 11. Congratulation you have successfully finished. Run Your page and Test Your Work  

This blog is about to get Host name and URL of OAF page. We will try to implement one button which will give host and URL of OAF page   1. Create a New OA Workspace and Empty OA Project File> New >...

Implement PopList in OA Framework

1. Create a New Workspace and ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- PopListDemoProject Name – PopListDemoDefault Package -- prajkumar.oracle.apps.fnd.poplistdemo 2. Create a New Application Module (AM)Right Click on PopListDemo > New > ADF Business Components > Application Module Name -- poplistdemoAMPackage -- prajkumar.oracle.apps.fnd.poplistdemo.server 3. Create a New View Object (VO)Right click on PopListDemo > New > ADF Business Components > View ObjectName -- poplistdemoVOPackage -- prajkumar.oracle.apps.fnd.poplistdemo.serverNote - The VO is not based on any EO so click next and go to the query section and paste the query SELECT  'poplist_item1' poplist_itemsFROM     DUALUNIONSELECT  'poplist_item2'FROM     DUALUNIONSELECT  'poplist_item3'FROM     DUAL 4. Create a New PageRight click on PopListDemo > New > Web Tier > OA Components > PageName -- poplistdemoPGPackage -- prajkumar.oracle.apps.fnd.poplistdemo.webui 5. Select the poplistdemoPG and go to the strcuture pane where a default region has been created 6. Select region1 and set the following properties:ID -- PageLayoutRNAM Definition -- prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoAMWindow Title -- PopList Demo WindowTitle – PopList Demo Header 7. Right click PageLayoutRN and  click new RegionID -- MainRNRegion Style – messageComponentLayout 8. Verify Your VO attribute nameSelect poplistdemoVO right click > Edit poplistdemoVO > Attributes > Verify the Name it should be “poplist_items” if it is not then edit it and enter name “poplist_items” 9. Create the first Item (Empty Field)MainRN > New > messageChoice Set following properties for new itemID – MyPopListRequired -- YesPicklist View Definition -- prajkumar.oracle.apps.fnd.poplistdemo.server.poplistdemoVOPicklist Display Attribute – poplist_items (Name of Attribute in  Your VO)Picklist Value Attribute -- poplist_itemsCSS Class – OraFieldTextPrompt – My PopList 10. Congratulation you have successfully finished. Run Your page and Test Your Work 

1. Create a New Workspace and Project File> New > General> Workspace Configured for Oracle Applications File Name -- PopListDemo Project Name – PopListDemo Default Package -- prajkumar.oracle.apps.fnd.popli...

Call D2K Form from OAF Page

This blog is about to call D2K form from OAF page. We will try to implement a OAF page to Call Application Developer > Profile Form by clicking Go Button 1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle ApplicationsFile Name -- CallformfromOAFProject Name – Calld2kformfromOAFDefault Package -- prajkumar.oracle.apps.fnd.Calld2kformfromOAF 2. Set Run Options in OA Project SettingSelect Your Project in the Navigator and choose Project PropertiesSelect Oracle Applications > Run OptionsSelect OADeveloperMode and OADiagnostic, and move them to selected Options List 3. Create Application Module AMCalld2kformfromOAF right click > New > ADF Business Components > Application ModuleName -- Calld2kformfromOAFAMPackage -- prajkumar.oracle.apps.fnd.Calld2kformfromOAF.serverCheck Generate JavaFile(s) 4. Create a OA components PageCalld2kformfromOAF right click > New > OA Components > PageName -- Calld2kformfromOAFPGPackage -- prajkumar.oracle.apps.fnd.Calld2kformfromOAF.webui 5. Modify the Page Layout (Top-level) Region  AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitleCall D2K from OAF Page Window TitleTitleCall D2K from OAF Page HeaderAM Definitionprajkumar.oracle.apps.fnd.Calld2kformfromOAF.server. Calld2kformfromOAFAM 6. Create the Second Region (Main Content Region)Select PageLayoutRN right click > New > Region  AttributePropertyIDMainRNRegion StylemessageComponentLayout 7. Create a container Region for Go-ButtonSelect MainRN right click > New > messageLayout  AttributePropertyRegionButtonLayout 8. Create a Second Item (Go Button)Select ButtonLayout > New > Item  AttributePropertyIDGoItem StylesubmitButtonAttribute Set/oracle/apps/fnd/attributesets/Buttons/Go 9. Add a ControllerSelect MainRN right click > Set New ControllerPackage Name -- prajkumar.oracle.apps.fnd.Calld2kformfromOAF.webuiClass Name -- Calld2kformfromOAFCO 10. Edit Your ControllerAdd Following Code in processFormRequestpublic void processFormRequest(OAPageContext pageContext, OAWebBean webBean){ super.processFormRequest(pageContext, webBean); if (pageContext.getParameter("Go") != null) {  //form:APPLICATION_SHORT_NAME:RESPONSIBILITY_KEY:DATA_GROUP_NAME  //:FORM_FUNCTION_NAME    String destination =   "form:FND:APPLICATION_DEVELOPER:STANDARD:FND_FNDPOMPO";                                pageContext.forwardImmediatelyToForm(destination);               }} 11. Congratulation you have successfully finished. Run Your page and Test Your Work  

This blog is about to call D2K form from OAF page. We will try to implement a OAF page to Call Application Developer > Profile Form by clicking Go Button   1. Create a New OA Workspace and Empty...

Delete Records in OAF Page

1. Create a Search Page to Create a page please go through the following linkhttps://blogs.oracle.com/prajkumar/entry/create_oaf_search_page 2. Implement a Delete in your SearchEOImpl Classpublic void remove(){ super.remove();} // end remove()  3. Create a Delete ImageSelect ResultsTable right click > New > ItemSet following properties for New ItemID – DeleteActionItem Style – imageImage URI – deleteicon_enabled.gifAtribute Set -- /oracle/apps/fnd/attributesets/Buttons/DeletePrompt -- DeleteAdditional Text – Delete record action enabledHeight – 24Width – 24Action Type – fireActionEvent – deleteSubmit – TrueSelect Parameter Properties define parameter name as Column1 and whose value is ${oa.SearchVO1.Column1}Select Parameter Properties define parameter name as Column2 and whose value is ${oa.SearchVO1.Column2} Select OK button to create your request parameters 4. Add Page ControllerAdd a New Contoller for SearchPGName – SearchCO Package -- prajkumar.oracle.apps.fnd.searchdemo.webui Implement Delete Action5. Add deleteRecord() method to SearchAMImplimport oracle.apps.fnd.framework.OAViewObject;import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;import oracle.jbo.domain.Number;import oracle.apps.fnd.framework.server.OAViewObjectImpl;import oracle.jbo.RowSetIterator;... public void deleteRecord(String Column1){ OAViewObject vo = (OAViewObject)getSearchVO1();  SearchVORowImpl row = null;   int fetchedRowCount = vo.getFetchedRowCount();  RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");  if (fetchedRowCount > 0)  {  deleteIter.setRangeStart(0);      deleteIter.setRangeSize(fetchedRowCount);     for (int i = 0; i < fetchedRowCount; i++)    {      row = (SearchVORowImpl)deleteIter.getRowAtRangeIndex(i);      row.remove();      getTransaction().commit();      break;    }  } deleteIter.closeRowSetIterator();} // end deleteRecord  Note – Create Standard FND Messages DELETE_RECORD_WARN and DELETE_CONFIRM   6. Add DeleteSelection Handler Code to SearchCO.processFormRequest()import com.sun.java.util.collections.HashMap;import oracle.apps.fnd.framework.webui.OADialogPage;import oracle.apps.fnd.framework.webui.OAWebBeanConstants;import oracle.apps.fnd.common.MessageToken;import oracle.apps.fnd.framework.OAException;import oracle.apps.fnd.framework.webui.OAWebBeanConstants;import oracle.apps.fnd.framework.OARow;import oracle.apps.fnd.framework.OAApplicationModule;... OAApplicationModule am = pageContext.getApplicationModule(webBean);OAViewObject vo =(OAViewObject)am.findViewObject("SearchVO1"); String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE); OARow row = (OARow)am.findRowByRef(rowRef); if ("delete".equals(pageContext.getParameter(EVENT_PARAM))){ String Column1 = (String)row.getAttribute("Column1"); String Column2 = (String)row.getAttribute("Column2");  String Column3 = pageContext.getParameter("Column1"); String Column4 = pageContext.getParameter("Column2");  MessageToken[] tokens = { new MessageToken("COLUMN1", Column1),         new MessageToken("COLUMN2", Column2)}; OAException mainMessage = new OAException("FND",  "DELETE_RECORD_WARN", tokens);  OADialogPage dialogPage = new OADialogPage(OAException.WARNING,  mainMessage, null, "", "");  String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null); String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null); dialogPage.setOkButtonItemName("DeleteYesButton");  dialogPage.setOkButtonToPost(true); dialogPage.setNoButtonToPost(true); dialogPage.setPostToCallingPage(true); dialogPage.setOkButtonLabel(yes); dialogPage.setNoButtonLabel(no);  java.util.Hashtable formParams = new java.util.Hashtable(1); formParams.put("Column1", Column3); formParams.put("Column2", Column4); dialogPage.setFormParameters(formParams); pageContext.redirectToDialogPage(dialogPage);}  7. Add Delete Confirmation Handler Code to SearchCO.processFormRequest()import java.io.Serializable;import oracle.apps.fnd.framework.OAApplicationModule;... else if (pageContext.getParameter("DeleteYesButton") != null){ String Column1 = (String)row.getAttribute("Column1"); String Column2 = (String)row.getAttribute("Column2"); Serializable[] parameters = { Column1 };  OAApplicationModule am =   pageContext.getApplicationModule(webBean);  am.invokeMethod("deleteRecord", parameters);  OAException message = new OAException("FND",   "DELETE_CONFIRM", null,   OAException.CONFIRMATION, null);  pageContext.putDialogMessage(message);}  8. Congratulation you have successfully finished. Run Your page and Test Your Work     

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 a Delete in your SearchEOImpl Class public...

Create OAF Search Page

1. Create a New Workspace and ProjectRight click Workspaces and click create new OAworkspace and name it as PRajkumarSearch. Automatically a new OA Project is also created. Name the project as SearchDemo and package as prajkumar.oracle.apps.fnd.searchdemo 2. Create a New Application Module (AM)Right Click on SearchDemo > New > ADF Business Components > Application Module Name -- SearchAM Package -- prajkumar.oracle.apps.fnd.searchdemo.server 3. Enable Passivation for the Root UI Application Module (AM)Right Click on SearchAM > Edit SearchAM > Custom Properties >Name – RETENTION_LEVELValue – MANAGE_STATE Click add > Apply > OK 4. Create Test Table and insert data some data in it (For Testing Purpose)CREATE TABLE xx_search_demo(    -- --------------------     -- Data Columns     -- --------------------     column1                  VARCHAR2(100),     column2                  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_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0);INSERT INTO xx_search_demo VALUES (‘val1’, ’val2’, SYSDATE, 0, SYSDATE, 0, 0);INSERT INTO xx_search_demo VALUES (‘val3’, ’val4’, SYSDATE, 0, SYSDATE, 0, 0);INSERT INTO xx_search_demo VALUES (‘val5’, ’val6’, 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 ObjectName – SearchEOPackage -- prajkumar.oracle.apps.fnd.searchdemo.schema.serverDatabase Objects -- XX_SEARCH_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 SearchDemo > New > ADF Business Components > View ObjectName -- SearchVOPackage -- prajkumar.oracle.apps.fnd.searchdemo.serverIn Step2 in Entity Page select SearchEO and shuttle them to selected listIn Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected list In Java page Select Generate Java file for View Object Class: SearchVOImpl and Generate Java File for View Row Class: SearchVORowImpl 7. Add Your View Object to Root UI Application ModuleSelect Right click on SearchAM > Edit SearchAM > Data Model > Select SearchVO and shuttle to Data Model list 8. Create a New PageRight click on SearchDemo > New > Web Tier > OA Components > PageName -- SearchPG Package -- prajkumar.oracle.apps.fnd.searchdemo.webui 9. Select the SearchPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties:ID -- PageLayoutRNRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.searchdemo.server.SearchAMWindow Title -- Search Page WindowTitle -- Search Page Auto Footer -- True 11. Add a Query Bean to Your PageRight click on PageLayoutRN > New > RegionSelect new region region1 and set following propertiesID – QueryRNRegion Style – queryConstruction Mode – resultBasedSearchInclude Simple Panel – TrueInclude Views Panel – True Include Advanced Panel – True 12. Add a Result Data Table to your QueryRNSelect QueryRN right click > New > Region using WizardIn BC4J Objects page, Select your SearchAM and then select your SearchVO1 Note – DO NOT select Use this as Application Module Definition for this region checkbox In Region Properties page, set Region ID value to ResultsTable and Region Style to tableIn view Attributes page, select attributes from Available View Attributes list and shuttle them toSelected View Atributes list:Column1Column2 In Region Items Page, you can set ID, Style and Attributes Set. Currently we are going to set only Style as messageStyledText 13. Set and verify Your Results Table Region PropertiesID – ResultsTableRegion Style – tableAM – Please Donot put any AMRendered – TrueRecords Displayed – 10Width – 100% User Personalization – True 14. Set or Verify Column1 Item PropertiesSearch Allowed -- TrueSort Allowed – ascendingInitial Sort Seqence – firstSelective Search Criteria – True User Personalization – True 15. Set or Verify Column2 Item PropertiesSearch Allowed – TrueSort Allowed -- ascendingSelective Search Criteria – True User Personalization – True 16. Congratulation you have successfully finished Search page. Run Your SearchPG page and Test Your Work   

1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarSearch. Automatically a new OA Project is also created. Name the project as...

Create Data Entry OAF Page

1. Create a New Workspace and ProjectRight click Workspaces and click create new OAworkspace and name it as PRajkumarInsert. Automatically a new OA Project is also created. Name the project as InsertDemo and package as prajkumar.oracle.apps.fnd.insertdemo 2. Create a New Application Module (AM)Right Click on InsertDemo > New > ADF Business Components > Application Module Name -- InsertAMPackage -- prajkumar.oracle.apps.fnd.insertdemo.server 3. Enable Passivation for the Root UI Application Module (AM)Right Click on InsertAM > Edit InsertAM > Custom Properties >Name – RETENTION_LEVELValue – MANAGE_STATEClick add > Apply > OK 4. Create Test Table in which we will insert data (For Testing Purpose)CREATE TABLE xx_insert_demo(        -- ---------------------          -- Data Columns           -- ---------------------          column1                           VARCHAR2(100),          column2                           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 InsertDemo > New > ADF Business Components > Entity ObjectName – InsertEOPackage -- prajkumar.oracle.apps.fnd.insertdemo.schema.serverDatabase Objects -- XX_INSERT_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 InsertDemo > New > ADF Business Components > View ObjectName -- InsertVOPackage -- prajkumar.oracle.apps.fnd.insertdemo.serverIn Step2 in Entity Page select InsertEO and shuttle them to selected listIn Step3 in Attributes Window select columns Column1, Column2 and shuttle them to selected listIn Java page deselect Generate Java file for View Object Class: InsertVOImpl and Select Generate Java File for View Row Class: InsertVORowImpl 7. Add Your View Object to Root UI Application ModuleRight click on InsertAM > Edit InsertAM > Data Model >Select InsertVO in Available View Objects list and shuttle to Data Model list 8. Create a New PageRight click on InsertDemo > New > Web Tier > OA Components > PageName -- InsertPGPackage -- prajkumar.oracle.apps.fnd.insertdemo.webui 9. Select the InsertPG and go to the strcuture pane where a default region has been created 10. Select region1 and set the following properties:ID -- PageLayoutRNRegion Style -- PageLayoutAM Definition -- prajkumar.oracle.apps.fnd.insertdemo.server.InsertAMWindow Title -- Date Entry Page WindowTitle -- Data Entry PageAuto Footer -- True 11. Right click PageLayoutRN > New > RegionID -- MainRNRegion Style -- defaultSingleColumn 12. Create Text Input ItemsRight click on MainRN > New > ItemSet following properties for New ItemID -- COLUMN1Item Style -- messageTextInputMaximum Length -- 100Length -- 20Prompt -- Column1View Instance -- InsertVO1View Attribute -- Column1 Again Right click on MainRN > New > ItemSet following properties for New Item ID -- COLUMN2Item Style -- messageTextInputMaximum Length -- 100Length -- 20Prompt -- Column2View Instance -- InsertVO1View Attribute – Column2 13. Add Apply and Cancel ButtonsRight click on PageLayoutRN > New > Region         ID -- PageButtons         Region Style -- pageButtonBar Right click on PageButtons > New > ItemID -- CancelItem Style -- submitButtonAttribute Set -- /oracle/apps/fnd/attributesets/Buttons/CancelDisable Server Side Validation -- TruePrompt -- CancelWarm About Changes -- FalseAdditional Text – Select to cancel this transaction. Right click on PageButtons > New > ItemID -- ApplyItem Style -- submitButtonAttribute Set -- /oracle/apps/fnd/attributesets/Buttons/ApplyPrompt -- ApplyAdditional Text – Select to save this transaction. 14. Implement Row Initialization (Create a View Object Row)Add createRecord method to your InsertAMImpl classimport oracle.jbo.Row;import oracle.apps.fnd.framework.OAViewObject;...  public void createRecord(){ OAViewObject vo = (OAViewObject)getInsertVO1();  if (!vo.isPreparedForExecution()) { vo.executeQuery(); }  Row row = vo.createRow(); vo.insertRow(row); row.setNewRowState(Row.STATUS_INITIALIZED);}  15. Create Controller for Page  PageLayoutRN > Set New Controller >Package Name: prajkumar.oracle.apps.fnd.insertdemo.webuiClass Name: InsertCO 16. Add Create Page Initialization to your ControllerAdd following code to your processRequest()import oracle.apps.fnd.framework.OAApplicationModule;... public void processRequest(OAPageContext pageContext,OAWebBean webBean){ super.processRequest(pageContext, webBean);    if (!pageContext.isFormSubmission())  {   OAApplicationModule am = pageContext.getApplicationModule(webBean);   am.invokeMethod("createRecord", null);  }  } 17. Add below method in InsertAMImpl Class to handle Apply Button actionimport oracle.jbo.Transaction;... public void apply(){ getTransaction().commit();} 18. Add below Logic in InsertCO to handle Apply ButtonAdd following code to your processFormRequest()import oracle.jbo.domain.Number; import oracle.apps.fnd.common.MessageToken;import oracle.apps.fnd.framework.OAException;import oracle.apps.fnd.framework.OAViewObject;import oracle.apps.fnd.framework.webui.OAWebBeanConstants;...public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){super.processFormRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); // Pressing the "Apply" button means the transaction should be // validated and committed.               if (pageContext.getParameter("Apply") != null)  {  OAViewObject vo = (OAViewObject)am.findViewObject("InsertVO1");  String column1 = (String)vo.getCurrentRow().getAttribute("Column1");  String column2 = (String)vo.getCurrentRow().getAttribute("Column2");                       am.invokeMethod("apply");                       // Create a FND Message with name "TEST_CREATE_CONFIRM" with two // tokens                     MessageToken[] tokens = { new MessageToken("COLUMN1", column1),                          new MessageToken("COLUMN2", column2)                          };   OAException confirmMessage = new OAException( "FND",                                 "TEST_CREATE_CONFIRM", tokens,                                 OAException.CONFIRMATION, null);     pageContext.putDialogMessage(confirmMessage);  pageContext.forwardImmediately(   "OA.jsp?page=/prajkumar/oracle/apps/fnd/insertdemo/webui/InsertPG",    null, OAWebBeanConstants.KEEP_MENU_CONTEXT,    null,    null,    true, // retain AM    OAWebBeanConstants.ADD_BREAD_CRUMB_NO); }}   19. Congratulations you have successfully created data insert page. Run InsertPG page to test Your Work       

1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarInsert. Automatically a new OA Project is also created. Name the project as...

Implement External LOV in OA Framework

1. Create a New Workspace and ProjectRight click Workspaces and click create new OAworkspace and name it as PRajkumarLovDemo. Automatically a new OA Project is also created. Name the project as LovDemo and package as prajkumar.oracle.apps.fnd.lovdemo 2. Create a New Application Module (AM)Right Click on LovDemo > New > ADF Business Components > Application Module Name -- LovAM Package -- prajkumar.oracle.apps.fnd.lovdemo.server 3. Create a New View Object (VO)Right click on LovDemo > New > ADF Business Components > View ObjectName -- LovVOPackage -- prajkumar.oracle.apps.fnd.lovdemo.server Note - The VO is not based on any EO so click next and go to the query section and paste the querySELECT          employee_number, full_nameFROM             per_all_people_f WHERE           SYSDATE BETWEEN effective_start_date AND effective_end_date  4. Add View Object to Root UI Application Module 5. Create a New PageRight click on LovDemo > New > Web Tier > OA Components > PageName -- LovPG Package -- prajkumar.oracle.apps.fnd.lovdemo.webui 6. Select the LovPG and go to the strcuture pane where a default region has been created 7. Select region1 and set the following properties:  ID -- PageLayoutRNAM Definition -- prajkumar.oracle.apps.fnd.lovdemo.server.LovAMWindow Title -- List of values Demo WindowTitle – List of values Demo 8. Right click PageLayoutRN and  click new RegionID -- MainRNRegion Style – messageComponentLayoutNote - Style is given as messageComponentlayout because we are going to create only message components that is messageLovInput item in that region 9. Create a New RegionRight click on LovDemo > New > Web Tier > OA Components > RegionName -- EmployeeLovRNPackage -- prajkumar.oracle.apps.fnd.lovdemo.webuiRegion Style -- listOfValuesScope -- Public Note - The property Scope is the key property which makes the LOV region public and makes it usable in multiple pages 10. Select EmployeeLovRN. Right click on EmployeeLovRN in Structure pane and click table using wizard. In the wizard choose the prajkumar.oracle.apps.fnd.lovdemo.server.LovAM and select the LovVO1. Click NextRegion Id -- LovRN Region style -- table 11. Shuttle the two attributes to the right side.That is EmployeeNumber and FullName 12. Click next, check the mapping and then finish 13. Select the field FullName and set the following properties:Search Allowed -- TrueSelective Search Criteria – True Note - The first property lets users search on these values in the LOV, and the second property ensures that the users specify search criteria for at least one of these values to avoid a blind query Attaching External LOV to Page: 14. Click on LovPG and right click the MainRN and click new messageLovInputExternal Lov -- /prajkumar/oracle/apps/fnd/lovdemo/webui/EmployeeLovRNLov Region Item -- FullNameReturn Item -- item1Criteria Item -- item1Prompt -- Employee Name 15. Congratulation you have successfully finished. Run Your page and Test Your Work       

1. Create a New Workspace and Project Right click Workspaces and click create new OAworkspace and name it as PRajkumarLovDemo. Automatically a new OA Project is also created. Name the project as...

OAF Hello World Tutorial

1. Create a New OA Workspace and Empty OA ProjectFile> New > General> Workspace Configured for Oracle Applications       2. Set Run Options in OA Project SettingSelect Your Project in the Navigator and choose Project PropertiesSelect Oracle Applications > Run OptionsSelect OADeveloperMode and OADiagnostic, and move them to selected Options List 3. Create Application Module AM     4. Create a OA components Page   5. Modify the Page Layout (Top-level) Region   AttributePropertyIDPageLayoutRNRegion StylepageLayoutForm PropertyTrueAuto FooterTrueWindow TitleHello World Window TitleTitleHello World Page HeaderAM Definitionprajkumar.oracle.apps.ak.hello.server.HelloAM   6. Create the Second Region (Main Content Region)   AttributePropertyIDMainRNRegion StylemessageComponentLayout  7. Create the first Item (Empty Field)MainRN > New > messageTextInput   AttributePropertyIDHelloNameStyle PropertymessageTextInputPromptNameLength20Maximum Length50    8. Create a container Region for Go-ButtonMainRN > messageLayout    AttributePropertyIDButtonLayout   9. Create a Second Item (Go Button)Select ButtonLayout > New > Item   AttributePropertyIDGoItem StylesubmitButtonAttribute/oracle/apps/fnd/attributesets/Buttons/Go     10. Save Your Work 11. Run Your Page UI is ready 12. Add a ControllerMainRN > Set New Controller    13. Edit Your ControllerAdd Following OA Exception as a last line in import sectionimport oracle.apps.fnd.framework.OAException;Add Following Code in processFormRequest     public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)     {            super.processFormRequest(pageContext, webBean);             if (pageContext.getParameter("Go") != null)             {                     String userContent = pageContext.getParameter("HelloName");                     String message = "Hello, " + userContent + "!";                     throw new OAException(message, OAException.INFORMATION);      }     }   14. Build Your Controller  15. Test Your Work Your Hello World Page is Ready      

1. Create a New OA Workspace and Empty OA Project File> New > General> Workspace Configured for Oracle Applications               2. Set Run Options in OA Project Setting Select Your Project in the Navigator...

Install OA Framework jDeveloper

Basic Installation Steps - 1. Download JDeveloper 10.1.3.3.0.  Available Oracle patch is p8431482_R12_GENERIC.zip       Unzip the patch p8431482_R12_GENERIC.zip i.e. in D:\ 2. Specify the path of  jdev in following location       My Computer>Properties>Advanced>Environment Variables as given below screen shot    3. Download dbc file of Oracle application instance from $FND_TOP/secure     ( it is like a tnsnames.ora file having connection detail )       Place the file at location D:\p8431482_R12_GENERIC\jdevhome\jdev\dbc_files\secure 4. Open JDeveloper and set database connection goto Connection Navigator > Database and create a new connection  Note Give user name and password do not give any role and do not check Deploy Password checkbox Note Give Host Name, JDBC port, and SID. Keep driver as thin. Now JDeveloper is ready to use 5. Create a sample workspace and project to know setting during creation of project 1.      Goto Application Navigator right click > New > General > Workspace Configured for Oracle Applications 2.   Give workspace name  3.      Give project name and Default package Note Default package is <3rd party identifier>.oracle.apps.<application_short_name>.<component>.[<subcomponent>]     Example: mycompany.oracle.apps.po.requisition.webui 4.      Give database connection detail  5.      Give your dbc file location, application username, application password, application short name, and responsibility key       i.e. Application short key and responsibility key is nothing but assigned responsibility detail to the application user for example if application user has System Administrator responsibility then Application short name will be “SYSADMIN” and responsibility key will be “SYSTEM_ADMINISTRATOR”. These values are required to compile and run the page because page required context during run time so it will login the application with given username and password and it will take context from assigned responsibility  6.      Click Next. Creation of Workspace and project has finished 

Basic Installation Steps -   1. Download JDeveloper 10.1.3.3.0.  Available Oracle patch is p8431482_R12_GENERIC.zip        Unzip the patch p8431482_R12_GENERIC.zip i.e. in D:\   2. Specify the path of  jdev...

Commit in SQL

SQL Transaction Control Language Commands (TCL)                                          (COMMIT) Commit TransactionAs 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 table2.      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 transaction3.      Oracle releases locks held on rows and tables4.      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.ExamplesCommitting an InsertINSERT INTO table_name VALUES (val1, val2); COMMIT WORK;·         COMMENTComment 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.ExamplesThe following statement commits the current transaction and associates a comment with it:COMMIT     COMMENT 'In-doubt transaction Code 36, Call (415) 555-2637';·         WRITE ClauseUse 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.ExamplesTo 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.ExamplesForcing 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';

SQL Transaction Control Language Commands (TCL)                                           (COMMIT)  Commit Transaction As a SQL language we use transaction control language very frequently. Committing...

Oracle D2K to OA Framework Transformation

What is the difference between Oracle 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 HelloWorldStep 1Create 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.helloThis 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 2Next, you will create a OA Page within hello projectThink 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 3You 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 FrameworkStep 4Add a button to one of the nested regionsThe 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.NoteWhat is the difference between processRequest and processFormRequest?These two methods are available in the Default Controller class that gets created.processFormRequestThis method is commonly used to react/respond to the event that has taken place, for example click of a button.Some examples areif(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.processRequestIn 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 5In 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 fieldHelloName = (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 processFormRequestNote 2. If the field comes from View Object, then do not use setText in controllerNote 3. For control fields [that are not based on View Objects], you can use setText to assign values in processRequest methodLets take some notes to expand beyond the HelloWorld ProjectNote 1In 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 2In 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 3Apart 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 4When 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 formsNote 5Controller 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 6In 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 7Inside 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 8In 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 9I 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 ");

What is the difference between Oracle 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...