How to create ADF BC components like EO from  "View with INSTEAD OF trigger

I have a "View with INSTEAD OF trigger" on a external schema. is it possible to create ADF EO on top of this view in my local schema?. If possible, then is it possible to insert/update that external table using ADF standard data controls and Application module?. I'm trying to see if it's possible with standard ADF controls without calling pl/sql API to insert/update that external table. any ideas are appreciated.
Regards,
Surya

http://stegemanoracle.wordpress.com/2006/03/15/using-updatable-views-with-adf/

Similar Messages

  • ADF BC: Creating updatable VO based upon DB View with "instead of" trigger

    Hello all,
    I have got an interesting issue. I have an Oracle DB view that is used to hide some complexity in the underlying DB design (it does some unions). This view is updatable because we have created an "instead of" update trigger to update the correct table when a row is updated. This is working fine in SQL.
    Next, we have created an ADF Entity object based upon the view, specifying an appropriate PK for the DB View. Then, we have created an updatable VO based upon the EO. All well and good so far. The issue we have is in trying to commit changes to the DB - because the ADF BC framework is trying to lock the row to update (using SELECT ... FOR UPDATE), it's not working because of ORA-02014 - cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    This leads me to thinking about overridding doSelect() on the EO as hinted here http://radio.weblogs.com/0118231/stories/2005/07/28/differenceBetweenViewObjectSelectAndEntityDoselectMethod.html
    As a temporary test, we have over-ridden the EO's doSelect to call super.doSelect(false) and it does work, although we will have lost update issues as detailed in Steve's article.
    My questions:
    1). Is overriding doSelect() the correct thing here? Perhaps there is a better way of handling this problem? I do have a base EO class from which all of the EO's extend, so adding this behavior should be straightforward.
    2). Does anyone have example doSelect implementation? I am thinking of overriding doSelect for my EO and calling super.doSelect (lock=false), but then I need to deal with some possible exceptions, no?
    Kind regards,
    John

    Hi John,
    I have exactly the same issue as you experienced back in January. I have a complex data modelling requirement which requires the need to pivot rows into columns using ROW_NUMBER() and PARTITION clauses. To hide the complexity from the middle tier, I have created a database view and appropriate INSTEAD OF triggers and mapped my EO to the view. I have overriden the lock() method on the EO implementation class (to avoid ORA-02014) and would like to try the same solution you used with the pl/sql call to lock the record.
    My question is, how did you manage the release of the lock if the transaction was not rolled back or committed by your application i.e. if the user closed the browser for instance.
    In my naivity, I would like to think that the BC4J framework would release any locks for the database session when it found the servlet session to be terminated however my concern is that the lock would persist and cause complications.
    Any assistance greatly appreciated (if you would be willing to supply your lock() method and pl/sql procedure logic I would be even more grateful!).
    Many thanks,
    Dave
    London

  • Returning newly created IDs from View with Instead Of

    Hi All,
    I have the following table:
    CREATE TABLE TBLSIM_SUPPLIER_H
        "SS_ID" NUMBER(10,0) NOT NULL ENABLE,
        "SS_GUID" NVARCHAR2(36) NOT NULL ENABLE,
        "SS_NAME" NVARCHAR2(50) NOT NULL ENABLE,
        "SS_H_IS_ACTIVE" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
        "SS_H_RE_ID"     NUMBER(10,0) NOT NULL ENABLE,
        "SS_H_DATE" DATE DEFAULT SYSDATE NOT NULL ENABLE,
        "SS_H_MASTER_ID" NUMBER(10,0),
        CONSTRAINT "TBLSIM_SUPPLIER_PK" PRIMARY KEY ("SS_ID") ENABLE,
        CONSTRAINT "TBLSIM_SUPPLIER_FK_M_ID" FOREIGN KEY ("SS_H_MASTER_ID") REFERENCES "TBLSIM_SUPPLIER_H" ("SS_ID") ENABLE
      )on which is enabled this trigger
    CREATE OR REPLACE TRIGGER TBLSIM_SUPPLIER_H_TRG BEFORE
      INSERT ON TBLSIM_SUPPLIER_H FOR EACH ROW BEGIN <<COLUMN_SEQUENCES>> BEGIN IF :NEW.SS_ID IS NULL THEN
      SELECT TBLSIM_SUPPLIER_H_SEQ.NEXTVAL INTO :NEW.SS_ID FROM DUAL;
    END IF;
    IF :NEW.SS_GUID IS NULL THEN
      :NEW.SS_GUID  := UTILITYPKG.formatted_guid;
    END IF;
    END COLUMN_SEQUENCES;
    END;UTILITYPKG.formatted_guid returns a standard 36chr GUID
    I then created a view
    CREATE OR REPLACE FORCE VIEW TBLSIM_SUPPLIER
    AS
      SELECT SS_ID,
        SS_GUID,
        SS_NAME,
        SS_H_IS_ACTIVE,
        SS_H_RE_ID,
        SS_H_DATE
      FROM TBLSIM_SUPPLIER_H
      WHERE (ss_h_is_active = 1);on which I enabled the trigger
    CREATE OR REPLACE TRIGGER TBLSIM_SUPPLIER_INS INSTEAD OF
      INSERT ON TBLSIM_SUPPLIER FOR EACH ROW
        BEGIN
      INSERT INTO TBLSIM_SUPPLIER_H (ss_name, ss_h_is_active, ss_h_re_id, ss_h_date)
        VALUES (:NEW.ss_name, 1, :NEW.ss_h_re_id, SYSDATE);
    END TBLSIM_SUPPLIER_INS;I then have a stored Procedure
    PROCEDURE SimSupplier_Create(
          cur_tblresource_id_in IN tblresource.re_id%TYPE
        , ss_name_in IN tblsim_supplier.ss_name%TYPE
        , ss_id_out OUT tblsim_supplier.ss_id%TYPE
        , ss_guid_out OUT tblsim_supplier.ss_guid%TYPE
      ) AS
      BEGIN
        INSERT INTO tblsim_supplier (
          , ss_name
          , ss_h_re_id
        VALUES ( 
          , ss_name_in
          , cur_tblresource_id_in
       RETURNING ss_id, ss_guid INTO ss_id_out, ss_guid_out;
      END SimSupplier_Create; What happens is that the RETURNING clause is not available.
    Any way of getting the ID & GUID of the just inserted record out of the prcedure?
    Thanks
    Andrea

    Why do you need this instead of trigger? Can't you simply insert into the view? Maybe enable WITH CHECK OPTION to prevent wrong values beeing entered via the view. Or simply insert into the table and not the view. As long as it is done in the procedure, you are safe that there is no priviledge confict.
    Edited by: Sven W. on Oct 17, 2012 5:38 PM

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

  • How to create a tree structure,like I want to create Bill/Payment Tree

    How to create a tree structure , like I want to create a Bill/Payment Tree containing a single node for all A/R related activities for a specific bill period, in reverse chronological order. Basically the tree should look like
    + Bill - Date: 03-17-2010 Complete
    +++++ CR Note - Date: 05-04-2010 Complete
    ++++++++++ Pay - Date: 05-04-2010 Frozen
    + Bill - Date: 03-17-2010 Complete
    +++++ Pay - Date: 05-04-2010 Frozen
    And finally this should be attached as tab on the control central

    The FTree package provides functions to populate the tree - look for the topic "Manipulating a hierarchical tree at runtime
    " in the online help this point to all the functions and triggers

  • How to create a HTML page like iView, thanks in advance!

    How to create a HTML page like iView, thanks in advance!
    I'm a newcomer, would you please tell me how to create a HTML page in WebDynpro ? In fact, i want create one welcome page which use html format and include some javascript.
    thanks again.

    jakinapallykrishna , thank you very much for you reply.
    The pdf file is a simple application, but i want know how create a view in HTML format (<HTML>... </HTML>), maybe use HTMLB control, i don't sure it.
    In fact, I need create a view in portal, some pictures in it, once mouse over one picture, it need change another picture replace old one. I don't know how to do it, just know it can be handled in HTML page. So, i need help.
    Thanks.

  • How to create pdf files in UNIX directory from oracle reports

    I would like to know how to create pdf files in UNIX directory from oracle reports.
    Thanks,

    Please make your question more clear . Also mention the reports version.
    1) If you are runnning reports in Unix, you can give
    .... destype=file desformat=pdf desname=<filename>
    in command line
    Please refer docs below.
    2) If by your question you mean
    "My reports server is running in Windows but I want to ftp my files to Unix after creating it"
    then the answer is that you can use pluggable destination "ftp"
    .... destype=ftp desformat=pdf desname=<ftp url>
    Pluggable destinations download
    http://otn.oracle.com/products/reports/pluginxchange/index.html
    Thanks
    Ratheesh
    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf

  • How to create a Blanket Release in iProc from a approved requistion

    Hi Gurus,
    How to create a blanket Release in iProcurement from a approved requisition. I have followed the below steps.
    1. Created a BPA from Front end.
    2. Run Loader Data program.
    3. Above program reflected the BPA in iProc.
    4. Created requisition from BPA.
    5. Requisition has been approved.
    After this i am stuck. How to proceed ahead. I want to create a Blanket Release from approved PR and then receive in iProcurement.
    please help me on this. We are using 11.5.10.2
    Regards,
    john

    911765 wrote:
    Hi Mahendra,
    Thank you so much for your reply.
    So you mean to say that it all depends upon the Sourcing Rule and ASL based upon that system would automatically create a Blanket Release or If its Automatic Release/Review then we have to manually create release through autocreate.
    The reason why i am asking this query is now when i tested it, system is automatically creating release and starngely there is no Sourcing Rule and ASL has been defined.
    But we are looking for a Manual Release through autocreate window.
    It would be great if you could please suggest.
    Regards,
    JohnJohn,
    When you say system is automatically creating release..as far as i know...it should be referencing a PO..correct...in the releases window..
    can you pull that up..and see if you can get any clue..bcz that PO would BPA...
    Also I am not that much into Iproc...I don't know...whether Iproc has some other setups
    HTH
    Mahendra

  • How to create a transaction code for a function group with screen 100 as st

    Hello ,
    I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
    Customer asked me to create a transaction with the screen 100 as the starting screen.
    Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
    [ It is not a module pool program ].
    Thanks
    Prashanth.
    Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jun 2, 2009 11:49 AM

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • How to  remove the Special characters like @,#,$ ,..from field

    How to  remove the Special characters like @,#,$<,..from text  field. we nedd to remove any specila char from text field .
    ex:text  = just#fi%cation@text
    the text should be justification.

    hi check this ..
    data:char(25) value '5#4#2#&1#&',
         char1(9) .
           replace all occurrences of '#' in char with 'and' .
           replace all occurrences of '&' in char with 'num' .
         write: char.
    or use this..
    data:char(25) value 'test@ing*5#4#2#&1#&',
         char1(9) .
           replace all occurrences of '#' in char with space .
           replace all occurrences of '&' in char with space .
           replace all occurrences of '@' in char with space .
           replace all occurrences of '*' in char with space .
         write: char.
    regards,
    venkat.

  • How to create a service entry sheet based from the PO

    how to create a service entry sheet based from the PO
    Gurus,
    I am creating a service entry sheet from the PO but I am getting an error of u201CPlease maintain services or limits Message no. SE029- Diagnosis(You cannot enter data until the PO item has been maintained correctly) u201C
    The document type of the PO is standard NB, account assignment category is Q- (Proj make to order) and the item category is D(service). Then I am trying also create a PR using account assignment category is Q- (Proj make to order) and the item category is D(service) but still cannot proceed, a message asking me to enter a service entry number. What I know the process is create a PO(maybe based from PR) then post the GR then create a service entry sheet in ML81N but I cannot proceed. Just creating a PR or PO using those mentioned account assignment and item category and getting an error of need to enter a service entry sheet number.
    Please help.thanks!

    HI,
    Process for Creating Service Entry Sheet
    Transaction Code :    ML81N
    1)To open the respective Purchase Order, Click on the u2018Other Purchase Orderu2019, then enter the Purchase Order No.
    2)Click on the u2018Create Entry Sheetu2019 icon(3rd Icon on Top-Left)
    3)Give Short Text (e.g. R/A Bill No. 1) and top service entry sheet number also generated.
    4)Click u2018Service Selectionu2019 Icon on the Bottom of the Screen.
    5)For the 1st Time, when we are making Service Entry Sheet for a respective Purchase Order, we need to u201CAdopt Full Quantityu201D by clicking the Check box next to it, then Enter.  (*For the next time, no adoption is required, just continue)
    6)Select the respective Services by clicking on the Left Hand Side, then Click u2018Servicesu2019 (Adopt services) icon on the Top.
    7)Give the completed Quantity, then Click u2018Acceptu2019 icon(a green flag on the top)
    8)Save .
    9)Service Entry Sheet is SAVED and account posting made.
    Hope, it is useful for you,
    Regards,
    K.Rajendran

  • How do I remove the target-like images from my pdf?

    How do I remove the target-like images from my pdf? There are four of them, one in the very top center, very bottom center, far left center, and far right center.

    Are you saying they haven't always been there? If they have been, they're likely registration marks.

  • How can I fill a table of objects from cursor with select * bulk collect???

    Hi All, I have a TYPE as OBJECT
    create or replace type dept2_o as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    I can fill a table of objects from cursor with out select * bulk collect...., row by row
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    i integer;
    begin
    i:=0;
    dept_o_tab.extend(20);
    for rec in (select * from dept) loop
    i:=i+1;
    dept_o_tab(i):=dept2_o(
    deptno => rec.deptno,
    dname => rec.dname,
    loc =>rec.loc
    end loop;
    for k IN 1..i loop
    dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
    end loop;
    end;
    RESULT
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    But I can't fill a table of objects from cursor with select * bulk collect construction ...
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    begin
    dept_o_tab.extend(20);
    select * bulk collect into dept_o_tab from dept;
    end;
    RESULT
    ORA-06550: line 6, column 39;
    PL/SQL: ORA-00947: not enough values ....
    How can I fill a table of objects from cursor with select * bulk collect???

    create or replace type dept_ot as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    create table dept
    (deptno number
    ,dname varchar2(14)
    ,loc varchar2(13)
    insert into dept values (10, 'x', 'xx');
    insert into dept values (20, 'y', 'yy');
    insert into dept values (30, 'z', 'zz');
    select dept_ot (deptno, dname, loc)
      from dept
    create type dept_nt is table of dept_ot
    declare
       l_depts dept_nt;
    begin
       select dept_ot (deptno, dname, loc)
         bulk collect
         into l_depts
         from dept
       for i in l_depts.first .. l_depts.last
       loop
          dbms_output.put_line (l_depts(i).deptno);
          dbms_output.put_line (l_depts(i).dname);
          dbms_output.put_line (l_depts(i).loc);    
       end loop;
    end;
    /

  • HT204406 How can I subscribe to Itunes Match redeeming from itunes card instead of using credit card?

    How can I subscribe to itunes Match redeeming from itunes card instead of using credit card?

    Do you have another device (eg a computer) that also contains your music? If so, yes, you can turn off iTunes match and sync everything with a cable. Do you tend to buy new music from downloads or ripping CDs? If downloads, you can turn on "download purchases automatically" on the phone to make them available to you there, once you've cable-synced your current library. If CDs, you would have to manually sync with cable (or over local wifi) each time you add a new CD.
    Matt

  • How to create a DVD menu like an animated Flash Menu?

    Hello.  I'm trying to figure out how to create an animated menu in Encore for a DVD, much like how menus are that are created in flash.  How can I create one in Encore for a DVD menu?  Thanks.

    Use After Effects:
    Adobe Encore * Using After Effects to enhance menus
    http://help.adobe.com/en_US/encore/cs/using/WSA5513911-0AD1-440c-BDAD-2E0E806B425E.html

Maybe you are looking for