Keep the record in the view object if deletion failed.

I have a view object which is based on the entity object, when I am trying to delete a row it failed because it has a child record associate with. I know the row is not delete from the database, but the record is deleted fromt the view.
How to keep the record in the View object if delete failed?

Hi,
the row is not delete from the database,refresh the view . re-execute query and the view show the row

Similar Messages

  • Changing the query on a view object

    I have a view object right now, based on an entity. It is the default view object, so that means the query in the view object is straight forward, it grabs all of the attributes from the table. And there is no WHERE clause.
    In reality I only want to show a finite set of rows from my table. Every time a record is changed/edited in this entity and committed, a new row in the database is created with the same information (I'm using CreateWithParams) except for a few columns.
    I actually don't really have update on this table, just creation of new rows. But to the user, I want it to 'look' like they are editing something in the table.
    Example:
    12, 11:32,Thompson, 60 (the user edits this information in an adf table, and a new row is created in the db)
    12, 11:55, Thompson, 75
    I have a timestamp (see above) field in the database that is used as part of my primary key, so that I know which record is the latest.
    When the VO query is run, I want the user to only see the latest row from the db.
    12, 11:55, Thompson, 75
    So...
    I went to my VO, and I changed the WHERE query to add this:
    where t1.TimeStamp = (Select MAX(t2.TimeStamp) FROM rcl.x t2 where t1.uid = t2.uid);
    Now, this isn't a mysql/sql question. There's actually a better query that I'd rather run, but the VO editor doesn't allow me to change the query itself....
    When I save the new WHERE to my VO, run my page again, I get the expected result (showing me only the latest records).
    However, when I try and sort on the table in which my data is displayed, I am now getting ORDER BY errors.
    I don't want my VO to be read-only sql based. I want to be able to update my table, so I have my VO running off of the entity.
    Why doesn't the VO allow me to change the query itself? (Like do a subquery, instead of having my where clause do the work)
    Why are order by errors being thrown when I sort on my adf table after changing the where clause in my view?
    Hopefully I wasn't too convoluted in the explanation of my problem..
    Thanks in advance,
    Joel

    HI Joe,
    Regarding your problem you can do one of the following tasks:
    1- easily to tuning on your view object, I mean in the tuning page of the view you can set that only return 1 record or 2-3 record fetch not all the record.
    in the order by you will order by the timestamp field and descending.
    2- you can order by the timestamp descending and in the where clause only set the rownum<2 (will return the last record) you can also set rownum<5 and get the 4 last record etc.
    3-editing the view query in the expert mode is not advised at all because of many consequences that you will face.
    4- maybe it is not bat that you add a readonly view for the table you mentioned and every time you unpdate the entity just re-execute the read-only view.( this method maybe is good maybe is not it depends on your business logic)
    Regards.
    Edited by: Amir Khanof on Sep 3, 2010 11:11 PM

  • Can a web service be used as the datasource for a View Object?

    Has anyone used a web service as the datasource for a View Object?
    I am trying to do the same thing as "Publishing BC4J Components as a Web Service" example, except I want to recreate the View Objects on the client so that I can iterate through them and display them on a web page.
    I probably have two choices:
    1. Use the web service as the datasource.
    2. Use a file as the datasource with no data and then populate the View Objects from the XML from the Web Service.
    Please advise.
    Thank you.
    Richard Catlin
    SAIC

    You can adapt the examples provided in the BC4J Toy Store demo for how to build a programmatically-populated view object to create a view object that fetches its data from a web service.
    The methods that you need to override are the same for any kind of programmatically-populated view object.

  • Dynamically change the Binding of a view object

    I want to reuse a panel several times in my application. The VO has one bind parameter (:1). The same panel should be reused several times with different bind variables.
    I found a technical note concerning this issue called: How to Dynamically Change the binding of a View Object to a JClient Panel. This works for JDeveloper 9i but not for JDeveloper 19g. Does anybody know how to dynamically change the binding in JDeveloper 10g

    You may use bindRowSetIterator() and pass in a custom fetched ViewObject or a RowSetIterator to the iterator binding that is displayed in your panel.

  • Logic 10.0.07 keeps stopping recording at the same time every time

    Logic 10.0.07 keeps stopping recording at the same time every time 3.14!
    How can i get it to extend on recording time?
    Model Name: Mac Pro
      Model Identifier: MacPro6,1
      Processor Name: 6-Core Intel Xeon E5
      Processor Speed: 3.5 GHz
      Number of Processors: 1
      Total Number of Cores: 6
      L2 Cache (per Core): 256 KB
      L3 Cache: 12 MB
      Memory: 32 GB
      L3 Cache: 12 MB
      Memory: 32 GB
    Model Name:
      L3 Cache: 12 MB
      Memory: 32 GB
    Model Name: Mac Pro
      Model Identifier: Mac
      L2 Cache (per Core): 25
    Model Name: Mac Pro
      Model Identifier: MacPro
      L3 Cache: 12 MB
      Memory: 32
      L3 Cache: 12 MB
      Memory: 32 GB

    Do you have auto drop enabled? Look for a red bar at the top where the green cycle bar is. It will punch you out at the end of the red bar.

  • HT4865 My iPhone 5c keeps signing recording at the top off screen how do u turn it off

    My iPhone 5c keeps signing recording at the top off screen how do u turn it off

    http://support.apple.com/kb/ts3805

  • Will the icloud keep a record that the phone has been tracked or a record of the locations tracked by the app "find my iPhone"

    Will the icloud keep a record that the phone has been tracked or a record of the locations tracked by the app "find my iPhone"

    Not unless you placed a lost device in Lost Mode and it is detected as being online.  If so, it will show its current and previous locations on a map as shown at the bottom of this article: http://help.apple.com/icloud/#mmfc0f0165.

  • ADF BC merge records of 2 view objects into third

    jdev 11.1.1.4
    Hi,
    1) how to merge records of 2 view objects into third view object?
    2) how to search inside view object whether the record already exists?
    I want to do this in AMImpl programmatically.

    hi I find that I can use something as below but it will check for each row at a time.
    String exp = "student_id=" + "'" + studentId.getValue() + "'" + " and " +
    "pass_word=" + "'" + password.getValue() + "'";
    vo.setWhereClause(exp);
    so if there are 10 records(to compare) i have to loop it 10 times(with company id and order id in exp) which i will be getting from some view.
    and have to execute query 10 times so i don't think this is a efficient approach.

  • Scan through the records in the Form and display the message!

    Hello Everyone,
    We have a requirement, I do not know how to achieve it.
    In a Forms 6i, 2 fields Type, Comment.
    Type is a list of Values (1,2,3)
    Comment - Free Text Field.
    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.
    So how to achieve this? How to scan through the records in the Form. Any comments on it would be great.
    Thanks.

    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.I am assuming that you want to check from the first record. Suppose in first record the user coosed 1 and you will check for all the entries for 1.
    Couple of ways to do this.
    1. While user is entering first record. You can keep that selected type value in GLOBAL variable and while he is entering further records you can match type with that global variable. If it is not matching then you can display message.
    2. On KEY-COMMIT trigger you can start loop from first record and can check for all the records one by one. Like.
    DECLARE
      vVal DATATYPE;
    BEGIN
      GO_BLOCK('BLOCK_NAME');
      FIRST_RECORD;
      vVal:=:FORM_TYPE_FIELD;
      LOOP
        IF vVal!=:FORM_TYPE_FIELD THEN
          MESSAGE(..);
          EXIT;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
    END;I would go for earlier approach and will use WHEN-VALIDATE-ITEM / PRE-INSERT for type field for this purpose. Because in KEY-COMMIT the system is doing same thing again.
    -Ammad
    Edited by: Ammad Ahmed on May 15, 2010 12:23 AM
    changes not equal sign to !=

  • Error while saving the records in the database

    Hi,
    I am running into a wierd error.
    I have built a new page which contains the information about the employees. Some of the fields are updatable fields. The page shows the details of the person who logs into the page.
    I am not using EO in this page. The data is queried from the database from VO and displayed in the page and when the records are updated, they are saved in the databased using pl/sql procedure which is
    being called from AM. So i am basically not using VO to save the records in the database.
    The error which i am getting is,
    If 2 users are trying to update the page at the same time, user A's details are updated in user B's page.
    This is really causing the issue. Any help is greatly appreciated.
    Thanks in advance.
    PK

    I have posted the code used along with the dialog page. Please review.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Pavan, Start1",OAFwkConstants.STATEMENT);
    if (pageContext.getParameter("XYZBack")!=null)
    pageContext.setForwardURL("OA.jsp?OAFunc=OAHOMEPAGE"// OAWebBeanConstants.RETURN_TO_MENU_URL also tryed this , same error
    ,null
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null //not needed as we are retaining menu context
    ,null // no parameters are needed,true //retain AM,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
    ,true
    ,null
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    if(pageContext.getParameter("XYZUpdate") !=null)//The fields and their values are loaded as soon as the update button is clicked. We do this before calling the oadialog page so that the values are not lost
    OAViewObject EmpDetailsVO3 = (OAViewObject)OAAppl.findViewObject("XYZPersInfoVO");
    OARow EmpDetailsRow3 = (OARow)EmpDetailsVO3.first(); //Bringing the control over to the first row which is nothing but the displayed row.
    if(EmpDetailsRow3 !=null)
    s_workphone = EmpDetailsRow3.getAttribute("WorkPhone").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workphone is: "+s_workphone,OAFwkConstants.STATEMENT);
    s_fax = EmpDetailsRow3.getAttribute("WorkFax").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Fax is: "+s_fax,OAFwkConstants.STATEMENT);
    s_building = EmpDetailsRow3.getAttribute("Building").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Building is: "+s_building,OAFwkConstants.STATEMENT);
    s_room = EmpDetailsRow3.getAttribute("Room").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Room is: "+s_room,OAFwkConstants.STATEMENT);
    s_box = EmpDetailsRow3.getAttribute("Box").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Box is: "+s_box,OAFwkConstants.STATEMENT);
    s_preferedname = EmpDetailsRow3.getAttribute("KnownAs").toString();
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"Preferred name is: "+s_preferedname,OAFwkConstants.STATEMENT);
    OAException OAExcep1 = new OAException("PER","XYZ_UPDATE_DETAILS");
    OAException OAExcep2 = new OAException("PER","XYZ_UPDATE_MESSAGE");
    OADialogPage OADialogPG1 = new OADialogPage(OAException.WARNING,OAExcep1,OAExcep2,
    OADialogPG1.setOkButtonToPost(true);
    OADialogPG1.setNoButtonToPost(true);
    OADialogPG1.setOkButtonLabel("Yes");
    OADialogPG1.setNoButtonLabel("No");
    OADialogPG1.setOkButtonItemName("DoOk");
    OADialogPG1.setNoButtonItemName("DoNo");
    OADialogPG1.setPostToCallingPage(true);
    pageContext.releaseRootApplicationModule();
    pageContext.redirectToDialogPage(OADialogPG1);
    else if(pageContext.getParameter("DoOk") != null)
    OAApplicationModule EmpDetailsAM = pageContext.getApplicationModule(webBean);
    Class[] paramtypes = {String.class, String.class, String.class, String.class,String.class,String.class,String.class};
    Serializable[] params = {s_personid,s_workphone,s_fax,s_building,s_room,s_box,s_preferedname};
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"personid is :"+s_personid,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workphone is :"+s_workphone,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"workfax is :"+s_fax,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"building is :"+s_building,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"room is :"+s_room,OAFwkConstants.STATEMENT);
    if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    pageContext.writeDiagnostics(this,"preferredname is :"+s_preferedname,OAFwkConstants.STATEMENT);
    pageContext.releaseRootApplicationModule();
    OAAppl.invokeMethod("TransactionCommit",params,paramtypes);
    OAAppl.invokeMethod("initDetails");
    throw new OAException("The Building and Phone Information have been saved successfully"
    ,OAException.INFORMATION);
    thank you

  • How to filter the records in the process of loading data into ODS

    Hi All,
    I am doing some data extraction from R/3 system. But I need to ignore(don't need to load) the records with a date field (Purchase Order date) that is blank.
    So how can I filter out the records with the blank date field?
    Some one suggested me to write some select statement (looping the data packages) in the start routine but I am not that experianced with the ABAP routines. So can anyone provide some sample format of the routine or can you suggest me some other way to  filter out this data.

    Ram Kumar,
    I used this in the start routine but it gives me an error saying ...
    No component exists with the name "TRAN_STRUCTURE-BEDAT"
    <b>delete datapak where TRAN_STRUCTURE-BEDAT = '' OR
                         TRAN_STRUCTURE-BADAT = '' OR
                         TRAN_STRUCTURE-ERDAT = '' OR
                         TRAN_STRUCTURE-FRGDT = '' OR
                         TRAN_STRUCTURE-UDATE = ''.</b>
    I have taken out the TRAN_STRUCTURE part and just typed
    delete datapak where BEDAT = '' OR
                         BADAT = '' OR
                         ERDAT = '' OR
                         FRGDT = '' OR
                         UDATE = ''.
    This above statement has no syntax errors. but this statement doesn't filter out the records with a the date fields that are blank.
    Please help me out here.
    This is kind of urgent.
    Thanks,

  • Trying to retrieve all the records from the file on desktop

    HI All
    I have one particular problem. I was given a text file which as 7000 records with length 512 each in a continues string. I Changed begining of each record with comma  in that text and saved it in .csv , when I try to upload the file into my program's internal table.
    It is still giving one record. I used
    itab_EXTRACT1 declared as
    DATA: begin of itab_extract OCCURS 0,
            extract1(512) type c,
          end of itab_extract.
    call method cl_gui_frontend_services => gui_upload
        exporting
          filename                = Xfile
        filetype                    = 'ASC'
         has_field_separator     = 'X'
        changing
          data_tab                = itab_EXTRACT1
      exceptions
        others                  = 17.
      Is there a way how to retrieve all the records into the internal table.
    Thanks
    Ravi

    Hi Ravi,
    I don't know if this is the correct solution, but I think it will work.
    Declare your internal table (itab_extract) with the maximum length which your file will occupy.
    Create another internal table (itab) with field (text) length 512.
    Populate the internal table itab_extract using GUI_UPLOAD.
    Then write this code
    l_index = 1.
    itab-text = itab_extract-extract1+0(512).
    append itab.
    do.
    n = ( l_index * 512 ) + 1.
    itab-text = itab_extract-extract1+n(512).
    append itab.
    if ( itab-text is initial ).
    exit.
    endif.
    enddo.
    Let me know if I miss anything.

  • Reports / intranet/ In some detail,  the user will input a date range from and 2 and will out put the records in the int

    Hello there,
    I am totally green in web development.
    my goal is to, for the user will input a date range from and
    to and will out put the records in the intranet when they press a
    button.
    However, the good news is: I have experience in programming.
    I have written applications for desktop in VB>NET and I
    understand RDBMS /sql concepts .
    But CF and WEB development is new to me.
    My current projects involves in connecting to DB and testing
    it. (it works fine)
    And outputting reports by to a intranet page. (records)
    i need help on how to start this asap. I will even do some
    practice at home.
    Tools I have at work
    • Development server(test)
    • Home site.
    • Toad for db connection.
    • Html reference guide
    • Cf dummies book.
    How can start my projects.
    (ex. Create cf, outputpage?)
    seriously, I am new to this.
    Thanks.

    Well, I had a really nice response with some concepts and
    ideas for you to practise on etc, but these dumb forums timed out
    and I lost it all
    If you want to pop me an email we could probably do a few
    exercises together that way - or even by MSN Messenger if you want.

  • Why is the recording on the cd not playable in itunes?

    I inserted a cd with a recording. the recording with the ending .WAV is not playable.
    can anyone help?
    I appreciate your response

    I get the same problem. I moved the backup files (B1) to another drive and then itunes generated new backup files (B2) for my iPhone. They seem to be of similar size. Due to my running out of space on my system drive, I've linked the backup folder to another drive. This is where I moved my original backups (B1). After I did that, the iPhone seems to sync but once again, the date of the backup did not change. I have no idea what the issue is. I'll save both B1 and B2.
    To be sure you've got an up to date backup, I recommend changing the name of the original backup folder to backup2 and then forcing itunes to make a new backup from scratch.
    On a windows machine, the backup folder is found at:
    C:\Users\(Username)\AppData\Roaming\Apple Computer\MobileSync\Backup

  • How can I numbered the records in the report

    Hi, can anyone please show me how do I number the records in the reports in the Report Builder?
    Thank you.

    Hi,
    Follow the following steps:
    1. Create a summary column in the data model of the report.
    2. Select the function as Count.
    3. Select the source for which you want to generate the serial no.
    4.Reset the column at Report level.
    5. Now create a field in the paper layout of the report and select this summary column as the source. The field should be in the same repeating frame as its source.
    This will generate the nos. as reqd.
    Swati

Maybe you are looking for

  • Flash template

    hello i really need help i downloaded a free template and have started to edit it however i have ran into a problem. The problem centers around the fact that i am able to edit the contact page however i do not know how to access the rest of the pages

  • Send/Receive question

    Hi Guru: I have a question about the send/receive when upload the data. Technically, what should happen when click the send button? We plan to use a 3rd party service for DSE purpose, is the send button supposed to send the file to the 3rd party? How

  • Internet windows won't close

    My phone software updated last night.  Now I'm having problems with my web browser.  When I used to close it, it would give me a fresh webpage the next time I opened it. Now, it brings me right back to the one I was viewing before, even if I was done

  • Integrated SD/mmc card reader

    I have a strange problem with the integrated sd/mmc card reader on my laptop. I know I have everything correctly configured and the needed modules loaded because I can use a 16MB and a 128MB SD cards without any problem. When I insert any of them ude

  • IPod Touch shortage

    I have been to every retailer in my town and every single one has told me that Apple is experiencing a shortage of Touch's and therefore cannot at this time get them in the stores, only they swear on the phone there is no shortage. I've been to 15 pl