Delete Dataset File not working

Hi All,
  I am trying to delete file from application server (AL11) directory after processing using DELETE DATASET FILE is not working , after processing also file still exists.
My code is like this,
*&      Form  backup_file
      The file has been processed.  Go ahead and copy it to the
      backup directory and delete it from the processing directory.
FORM backup_file .
  DATA: lv_oldfile TYPE string,
        lv_backup TYPE string,
        l_rc TYPE i.
  IF p_appl = 'X'.  "Unix file
    lv_oldfile = wa_files-filename.
  Replace the directory name with the backup directory.
    REPLACE p_dir IN wa_files-filename WITH p_back.
  Tack date/time onto the end of the file name to avoid duplicate
  files
    CONCATENATE wa_files-filename
                sy-datum
                sy-uzeit
              INTO wa_files-filename.
    OPEN DATASET wa_files-filename FOR OUTPUT
                                   IN TEXT MODE
                                   ENCODING DEFAULT.
    IF sy-subrc NE 0.
      f_backup_error = 'X'.
      EXIT.
    ELSE.
    Write the file contents to the new backup file.
      LOOP AT itab_input INTO wa_input.
        TRANSFER wa_input TO wa_files-filename.
      ENDLOOP.
    ENDIF.
  Close the backup file.
    CLOSE DATASET wa_files-filename.
  Delete the original file from the processing directory.
if sy-subrc = 0.
    DELETE DATASET lv_oldfile.
endif.
endform.
Thanks Everyone!

HI,
You have to check the value of Sy-subrc after the delete statement,
and the value present in the variable lv_oldfile that if there is correct
value in the variable populated or not.
Moreover after assigning the value to variable lv_oldfile in the step 
lv_oldfile = wa_files-filename.
then you should use this variable lv_oldfile only for open dataset and close dataset also.
Hope ir helps
Regards
Mansi

Similar Messages

  • Delete operation is not working to delete selected row from ADF table

    Hi All,
    We are working on jdev 11.1.1.5.3. We have one ADF table as shown below. My requirement is to delete a selected row from table, but it is deleting the first row only.
    <af:table value="#{bindings.EventCalendarVO.collectionModel}" var="row"
    rows="#{bindings.EventCalendarVO.rangeSize}"
    emptyText="#{bindings.EventCalendarVO.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
    fetchSize="#{bindings.EventCalendarVO.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.EventCalendarVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EventCalendarVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" partialTriggers="::ctb1 ::ctb3"
    >
    To perform delete operation i have one delete button.
    <af:commandToolbarButton
    text="Delete"
    disabled="#{!bindings.Delete.enabled}"
    id="ctb3" accessKey="d"
    actionListener="#{AddNewEventBean. *deleteCurrentRow* }"/>
    As normal delete operation is not working i am using programatic approach from bean method. This approach works with jdev 11.1.1.5.0 but fails on ver 11.1.1.5.3
    public void deleteCurrentRow (ActionEvent actionEvent) *{*               DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    // Get an object representing the table and what may be selected within it
    ViewObject eventCalVO = dcItteratorBindings.getViewObject();
    // Remove selected row
    eventCalVO.removeCurrentRow();
    it is removing first row from table still. Main problem is not giving the selected row as current row. Any one point out where is the mistake?
    We have tried the below code as well in deleteCurrentRow() method
    RowKeySet rowKeySet = (RowKeySet)this.getT1().getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.getT1().ggetValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    rowData.getRow().remove();
    The same behavior still.
    Thanks in advance.
    Rechin
    Edited by: 900997 on Mar 7, 2012 3:56 AM
    Edited by: 900997 on Mar 7, 2012 4:01 AM
    Edited by: 900997 on Mar 7, 2012 4:03 AM

    JDev 11.1.1.5.3 sounds like you are using oracle apps as this not a normal jdev version.
    as it works in 11.1.1.5.0 you probably hit a bug which you should file with support.oracle.com...
    Somehow you get the first row instead of the current row (i guess). You should debug your code and make sure you get the current selected row in your bean code and not the first row.
    This might be a problem with the bean scope too. Do you have the button (or table) inside a region? Wich scope does the bean have?
    Anyway you can try to remove the iterator row you get
    public void deleteCurrentRow (ActionEvent actionEvent) { DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    dcItteratorBindings.removeCurrentRow();Timo

  • Open dataset is not working in background in PRD

    Dear All,
    Open dataset is not working in background in PRD .
    OPEN DATASET filepath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    Whike running in foregroundits working dev as well as prd.
    but when i am running in background  its giving error like file not found .
    but al11 is working (i mean my file path is working ).
    Thanks N Regards,
    Srinivasa Reddy

    your authority team shall check the batch user of that abap!
    Could you please tell us the detailed error message?
    grx
    Andreas

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Delete statement is not working.

    Hi,
    find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,
    xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.
    please help me ...
    loop at dekek_x.
    loop at dint_edidd where segnam = 'E1EDP10'.
    if dekek_x-stpin = 1 .
    CLEAR xe1edp10.
      MOVE dint_edidd-sdata TO xe1edp10.
    delete dint_edidd where sdata = xe1edp10-idnkd.
    endif.
    endloop.

    1st thing..
    i tried this :
    tables: edidd, e1edp10.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    move edidd-sdata to e1edp10.
    IF edidd-sdata = e1edp10-idnkd.
    WRITE: e1edp10-idnkd.
    else.
      WRITE: 'nothing'.
    ENDIF.
    output
    >315934 EA 017
    >315934 EA 017
    2nd thing,.
    your loop inside loop doesnt make any sense as they are not related any where.
    3rd thing:
    the fields are not type compatible.. this might be the reason for wrong delete statement..
    and 1 more clarification:
    TABLES: edidd, e1edp10.
    DATA :it TYPE TABLE OF edidd WITH HEADER LINE.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    APPEND edidd TO it.
    edidd-sdata = '315934 EA 018'.
    APPEND edidd TO it.
    LOOP AT it." where segnam = 'E1EDP10'.
      CLEAR e1edp10.
      MOVE it-sdata TO e1edp10.
      DELETE it WHERE sdata = e1edp10-idnkd.
    ENDLOOP.
    in this also delete is working perfectly fine... you run and check..

  • Why are my deleted emails saving in my 'pictures' as a PDF adobe when they should have been in my deleted email file not saved in my pictures??????

    Why are my deleted emails saving in 'my pictures' as a PDF adobe when they should have been in my deleted email file not saved
    in my pictures??????

    I deleted emails from my windows emails and when I went into my pictures there was all my recently deleted items as pdf adobe files and I cannot right click and delete. But why would my deleted emails be going to my pictures in the first place. So i think it must be in how the adobe program is set up and need to know how to change the settings so my deleted emails are not sent to my pictures.I do not know what other details you would require?

  • Delete command does not work

    delete command does not work.. it just freezes neither roll back happens.. please advice

    Always: If possible, give the exact command & output from your terminal, pefrerrable with copy & paste. We cannot see your screen and magically spot the problem.
    In general, you should also include your database version and OS, although I doubt that this is relevant in this particular case.
    Kind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • Brand new macbook --- DELETE KEY DOES NOT WORK --- how to fix?

    I have a brand new MacBook and the delete key does not work. Is there a way to fix this?

    You have 14 days to exchange it no questions asked.

  • HT3226 Delete key is not working on the keyboard. What should I do?

    The delete key is not working on the wireless keyboard. What should I do?

    If it ever worked before then do 2-3 SMC resets back to back. You can find instructions at https://discussions.apple.com/docs/DOC-3603

  • Open/Transfer/Close Dataset file not downloading

    Hello people apologies if this running rampant for me. I did post this from an attatched topic of mine but im guessing, due to its number or replies, that many people felt that it was pretty much covered. It was but another problem has riseng during my initial question.
    My plan is to download a report in a file, (hopefully in background), as it is. Obviously WS_Download would not work because (1) it doesnt seem to function in background proccessing and (2) the layout is not aligned properly. After checking this out, in this forums as well as other sits, I realized Open Dataset ought to be the best approach. Im not touching the more complex ones yet you because I plan to take this step by step. 
    So far I have searched the net and stuff and decided that I will use WWW_LIST_TO_HTML since I want to download it the way it is. I am also going to use open/close dataset as many of you have mentioned.
    SO far Im just trying it out with a simple report program to see its funcitonalities. My code goes like this.
    <b>REPORT Z**** NO STANDARD PAGE HEADING LINE-COUNT 100 .
    DATA: IFIELDS TYPE TABLE OF W3FIELDS WITH HEADER LINE.
    *DATA: ihtml TYPE TABLE OF w3html WITH HEADER LINE.
    DATA: IHTML TYPE TABLE OF W3_HTML WITH HEADER LINE.
    DATA: BEGIN OF I_TAB OCCURS 0,
    MATNR LIKE MAKT-MATNR,
    MAKTX LIKE MAKT-MAKTX,
    END OF I_TAB.
    SELECT-OPTIONS: SO_MATNR FOR I_TAB-MATNR.
    SELECT MATNR MAKTX
    FROM MAKT
    INTO TABLE I_TAB
    WHERE MATNR IN SO_MATNR..
    LOOP AT I_TAB.
    WRITE: / I_TAB-MATNR,
    I_TAB-MAKTX.
    ENDLOOP.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
    EXPORTING
    list_index = sy-lsind
    TABLES
    HTML = IHTML.
    DATA: FILE TYPE LOCALFILE.
    FILE = '/usr/test.html'.
    OPEN DATASET FILE FOR OUTPUT IN BINARY MODE.
    LOOP AT IHTML.
    TRANSFER IHTML TO FILE.
    ENDLOOP.
    CLOSE DATASET FILE.</b>
    NOw the problem now though is that the file isnt downloading or saving at all. I cant seem to get what is wrong since the path does exist and the this seems the universal way to implement the program. Im guessing the problem lies in the file name, because everything seems to work fine. Hope to hear again soon. Sorry if people have see this twice. Again my sinceriest apologies.

    for example,  open IE,  in the address bar, I enter
    \SXXXXXX
    ,   SXXXXXX is my host name.  I hit enter.  now i see folders, one of which is USR,  then I click on the usr folder and there is my file that I created with your program. 
    Maybe ask your basis person what the host name is.
    Regards,
    Rich Heilman

  • Delete functionality is not working

    Hi
    I have two EOs on two base tables  PO_REQUISITIONS_INTERFACE_ALL  and PO_INTERFACE_ERRORS and i have one VO having both EOs attached and have the sql query in the VO as below. I attached this VO in the AM. I have a page having regions style as 'query' and construction mode as 'autoCustomizationCriteria' and in that page i have two regions one is search region and another is results region. In the results region i have a button called 'Delete' and my functionality is when ever i click on Delete i am expecting the records should be deleted in both tables. But when i click on delete record is getting deleted only from PO_INTERFACE_ERRORS table not from PO_REQUISITION_INTERFACE_ALL table. Please let me know what needs to be done to fix this issue. I am also placing the CO and AM code below
    VO Query
    SELECT xxpowlPOIntfErrorsEO.INTERFACE_TYPE,
           xxpowlPOIntfErrorsEO.INTERFACE_TRANSACTION_ID,
           xxpowlPOIntfErrorsEO.COLUMN_NAME,
           xxpowlPOIntfErrorsEO.ERROR_MESSAGE,
           xxpowlPOIntfErrorsEO.PROCESSING_DATE,
           xxpowlPOIntfErrorsEO.CREATION_DATE,
           xxpowlPOIntfErrorsEO.CREATED_BY,
           xxpowlPOIntfErrorsEO.LAST_UPDATE_DATE,
           xxpowlPOIntfErrorsEO.LAST_UPDATED_BY,
           xxpowlPOIntfErrorsEO.LAST_UPDATE_LOGIN,
           xxpowlPOIntfErrorsEO.REQUEST_ID,
           xxpowlPOIntfErrorsEO.PROGRAM_APPLICATION_ID,
           xxpowlPOIntfErrorsEO.PROGRAM_ID,
           xxpowlPOIntfErrorsEO.PROGRAM_UPDATE_DATE,
           xxpowlPOIntfErrorsEO.ERROR_MESSAGE_NAME,
           xxpowlPOIntfErrorsEO.TABLE_NAME,
           xxpowlPOIntfErrorsEO.BATCH_ID,
           xxpowlPOIntfErrorsEO.INTERFACE_HEADER_ID,
           xxpowlPOIntfErrorsEO.INTERFACE_LINE_ID,
           xxpowlPOIntfErrorsEO.INTERFACE_DISTRIBUTION_ID,
           xxpowlPOIntfErrorsEO.COLUMN_VALUE,
           xxpowlPOIntfErrorsEO.INTERFACE_LINE_LOCATION_ID,
           xxpowlPOIntfErrorsEO.INTERFACE_ATTR_VALUES_ID,
           xxpowlPOIntfErrorsEO.INTERFACE_ATTR_VALUES_TLP_ID,
           xxpowlPOIntfErrorsEO.PRICE_DIFF_INTERFACE_ID,
           xxpowlPOIntfErrorsEO.TOKEN1_NAME,
           xxpowlPOIntfErrorsEO.TOKEN1_VALUE,
           xxpowlPOIntfErrorsEO.TOKEN2_NAME,
           xxpowlPOIntfErrorsEO.TOKEN2_VALUE,
           xxpowlPOIntfErrorsEO.TOKEN3_NAME,
           xxpowlPOIntfErrorsEO.TOKEN3_VALUE,
           xxpowlPOIntfErrorsEO.TOKEN4_NAME,
           xxpowlPOIntfErrorsEO.TOKEN4_VALUE,
           xxpowlPOIntfErrorsEO.TOKEN5_NAME,
           xxpowlPOIntfErrorsEO.TOKEN5_VALUE,
           xxpowlPOIntfErrorsEO.TOKEN6_NAME,
           xxpowlPOIntfErrorsEO.TOKEN6_VALUE,
           xxpowlPOIntfErrorsEO.APP_NAME,
           xxpowlPOIntfErrorsEO.ROWID,
           xxpowlPOReqIntfAllEO.TRANSACTION_ID,
           xxpowlPOReqIntfAllEO.PROCESS_FLAG,
           xxpowlPOReqIntfAllEO.REQUEST_ID AS REQUEST_ID1,
           xxpowlPOReqIntfAllEO.PROGRAM_ID AS PROGRAM_ID1,
           xxpowlPOReqIntfAllEO.PROGRAM_APPLICATION_ID AS PROGRAM_APPLICATION_ID1,
           xxpowlPOReqIntfAllEO.PROGRAM_UPDATE_DATE AS PROGRAM_UPDATE_DATE1,
           xxpowlPOReqIntfAllEO.LAST_UPDATED_BY AS LAST_UPDATED_BY1,
           xxpowlPOReqIntfAllEO.LAST_UPDATE_DATE AS LAST_UPDATE_DATE1,
           xxpowlPOReqIntfAllEO.LAST_UPDATE_LOGIN AS LAST_UPDATE_LOGIN1,
           xxpowlPOReqIntfAllEO.CREATION_DATE AS CREATION_DATE1,
           xxpowlPOReqIntfAllEO.CREATED_BY AS CREATED_BY1,
           xxpowlPOReqIntfAllEO.INTERFACE_SOURCE_CODE,
           xxpowlPOReqIntfAllEO.INTERFACE_SOURCE_LINE_ID,
           xxpowlPOReqIntfAllEO.SOURCE_TYPE_CODE,
           xxpowlPOReqIntfAllEO.REQUISITION_HEADER_ID,
           xxpowlPOReqIntfAllEO.REQUISITION_LINE_ID,
           xxpowlPOReqIntfAllEO.REQ_DISTRIBUTION_ID,
           xxpowlPOReqIntfAllEO.ROWID AS ROW_ID1
    FROM PO.PO_INTERFACE_ERRORS xxpowlPOIntfErrorsEO, PO.PO_REQUISITIONS_INTERFACE_ALL xxpowlPOReqIntfAllEO
    WHERE xxpowlPOIntfErrorsEO.INTERFACE_TRANSACTION_ID = xxpowlPOReqIntfAllEO.TRANSACTION_ID AND xxpowlPOIntfErrorsEO.INTERFACE_TYPE = 'REQIMPORT' AND xxpowlPOIntfErrorsEO.REQUEST_ID IS NOT NULL
    Controller Page Code
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package powl.oracle.apps.xxpowl.po.requisition.webui;
    import com.sun.java.util.collections.HashMap;
    //import com.sun.java.util.collections.Hashtable;
    import java.util.Hashtable;
    //import java.util.HashMap;
    import java.io.Serializable;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    * Controller for ...
    public class xxpowlPOReqIntfAllSearchPageCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
             String userClicked = pageContext.getParameter("event");
             System.out.println("Event from processFormRequest in SearchPageCO :"+userClicked);
           System.out.println("Parametere Names are :- \t" + pageContext.getParameter("UpdateImage"));
           System.out.println("Parametere Names are :- \t" + pageContext.getParameter("event"));
         if (pageContext.getParameter("event") != null &&
             pageContext.getParameter("event").equalsIgnoreCase("Update")) { 
             String ReqTransactionId=(String)pageContext.getParameter("transacitonidParam");
             String errorcolumn=(String)pageContext.getParameter("errorcolumnParam");
             String errormsg=(String)pageContext.getParameter("errormessageParam");
             String readyonly="Y"; //(String)pageContext.getParameter("readonlyParam");
             System.out.println("Requisition Transaction Id  : "+ReqTransactionId);
             System.out.println("Error Column  : "+errorcolumn);
             System.out.println("Error Message  : "+errormsg);
             System.out.println("Read Only  : "+readyonly);
             HashMap params = new HashMap(4);
             params.put("HashmapTransacitonid",ReqTransactionId);
             params.put("HashmapErrorcolumn",errorcolumn);
             params.put("HashmapErrormessage",errormsg);
             params.put("HashmapReadonly",readyonly);
             pageContext.putSessionValue("testValue",ReqTransactionId);
             //System.out.println("Transaction Id passing through HashMap :- \t" + ReqTransactionId);
             pageContext.setForwardURL("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllUpdatePG",
                                        null,
                                        OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                        null,
                                        params,
                                        true,
                                        OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
                                        OAWebBeanConstants.IGNORE_MESSAGES) ;   
    else if (pageContext.getParameter("event") != null &&
             pageContext.getParameter("event").equalsIgnoreCase("Delete")) {   
        System.out.println("Inside Delete method in SearchCO");
        String deleteTransactionID=(String)pageContext.getParameter("deleteTransactionIDParam");
        System.out.println("Transaction Id in Delete Method :- \t" + deleteTransactionID);
        MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", "") };
        OAException mainMessage = new OAException("FND", "FND_MESSAGE_DELETE_WARNING", 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);
        Hashtable formParams = new Hashtable(1);
        formParams.put("transactionIdDeleted", deleteTransactionID);
        dialogPage.setFormParameters(formParams);
        pageContext.redirectToDialogPage(dialogPage);
    else if (pageContext.getParameter("DeleteYesButton") != null)
            System.out.println("Inside DeleteYesButton method in SearchCO");
            String deleteTransactionID = (String)pageContext.getParameter("transactionIdDeleted");
            System.out.println("Tranaction ID getting deleted: "+deleteTransactionID);        
            Serializable[] parameters = { deleteTransactionID };
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            am.invokeMethod("deleteItem", parameters);
            OAException message1 = new OAException("CN", "CN_QUOTA_PE_DELETED",null,OAException.CONFIRMATION, null);        
             pageContext.putDialogMessage(message1);
    else
    AMImpl.java code
       public void deleteItem(String trasnsactionID)
         Number rowToDelete = new Number(Integer.parseInt(trasnsactionID));      
         OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfAllVO();
         xxpowlPOReqIntfAllVORowImpl 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 = (xxpowlPOReqIntfAllVORowImpl)deleteIter.getRowAtRangeIndex(i);
             Number PK = row.getTransactionId();
             if (PK.compareTo(rowToDelete) == 0)
               row.remove();
               getTransaction().commit();
               break;
         deleteIter.closeRowSetIterator();

    Thanks..I changed and unchecked the 'Reference Flag' for Interface Lines VO while adding EOs in VO and it worked as it is deleting the record in Interface Lines Table also. But here i am getting one more issue on specific scenario.
    My design of this development is as follow...
    1. Search Page in which users give some search criteria and results will be displayed in the results region on the same page. For each results record I have two buttons like 'Update' and 'Delete' so that users can delete the record or can update the record. For update i created a one more page where users can able to edit and save the data.
    Suppose I have one record in interface lines table and two records in error tables.When users given the search criteria and hit enter they found two records for same interface line. It means i have two records in error table and one record in interface table and both tables have same transaction id. So here user first try to update one record and it is working. After update he try to delete a record then I am getting below error. Please note that I am not getting this error when if i directly delete the record with out doing any update before delete.
    Unable to perform transaction on the record.
    Cause: The record contains stale data. The record has been modified by another user.
    Action: Cancel the transaction and re-query the record to get the new data.
    My UpdatePage Controller
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package powl.oracle.apps.xxpowl.po.requisition.webui;
    import com.sun.java.util.collections.HashMap;
    import com.sun.rowset.internal.Row;
    import java.io.Serializable;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    //import oracle.apps.fnd.oam.diagnostics.report.Row;
    import oracle.apps.icx.por.common.webui.ClientUtil;
    import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateAMImpl;
    import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateEOVOImpl;
    * Controller for ...
    public class xxpowlPOReqIntfAllUpdatePageCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
         xxpowlPOReqIntfUpdateAMImpl am = (xxpowlPOReqIntfUpdateAMImpl)pageContext.getApplicationModule(webBean);
          xxpowlPOReqIntfUpdateEOVOImpl UpdateVO =(xxpowlPOReqIntfUpdateEOVOImpl)am.findViewObject("xxpowlPOReqIntfUpdateEOVOImpl");
          String newvalue = (String)pageContext.getSessionValue("testValue");     
          System.out.println("Transaction ID from processRequest UpdateCO from testValue field:"+newvalue);
          String transactionid = pageContext.getParameter("HashmapTransacitonid");
          System.out.println("Transaction ID from processRequest Hash Map in UpdateCO :"+transactionid);
          String errorcolumn = pageContext.getParameter("HashmapErrorcolumn");
          System.out.println("Error Column Name from processRequest Hash Map in UpdateCO :"+errorcolumn);
          String errormsg = pageContext.getParameter("HashmapErrormessage");
          System.out.println("Error Message from processRequest Hash Map in UpdateCO :"+errormsg);
          String readyonly = pageContext.getParameter("HashmapReadonly");
          System.out.println("Read Only value from processRequest Hash Map in UpdateCO :"+readyonly);
          if (transactionid !=null & !"".equals(transactionid)) { 
         /* Passing below four parameters to the Update Page */
          Serializable amParams[] = new Serializable[]{transactionid,readyonly,errorcolumn,errormsg} ;
          pageContext.getRootApplicationModule().invokeMethod("executexxpowlPOReqIntfUpdateEOVO", amParams);
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);      
         OAApplicationModule am = pageContext.getApplicationModule(webBean);
          if (pageContext.getParameter("ApplyButton") != null)
            System.out.println("Inside ApplyButton method in UpdatePageCO");
            OAViewObject vo = (OAViewObject)am.findViewObject("xxpowlPOReqIntfUpdateEOVO");
            String transactionid = pageContext.getParameter("HashmapTransacitonid");
            System.out.println("Transaction ID from processFormRequest Hash Map in UpdateCO-ApplyButton method :"+transactionid);
            am.invokeMethod("apply");
              pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
                                                     null,
                                                     OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                     null,
                                                     null,
                                                     true,
                                                     OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
           else if (pageContext.getParameter("CancelButton") != null)
            am.invokeMethod("rollback");
            pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
                                                   null,
                                                   OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                   null,
                                                   null,
                                                   true,
                                                   OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    UpdatePageAMImpl.java
    package powl.oracle.apps.xxpowl.po.requisition.server;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OARow;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.inv.appsphor.order.server.XxapOrderHeaderVOImpl;
    import oracle.jbo.Transaction;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxpowlPOReqIntfUpdateAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public xxpowlPOReqIntfUpdateAMImpl() {
        /**Container's getter for xxpowlPOReqIntfUpdateEOVO
        public xxpowlPOReqIntfUpdateEOVOImpl getxxpowlPOReqIntfUpdateEOVO() {
            return (xxpowlPOReqIntfUpdateEOVOImpl)findViewObject("xxpowlPOReqIntfUpdateEOVO");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("powl.oracle.apps.xxpowl.po.requisition.server", /* package name */
          "xxpowlPOReqIntfUpdateAMLocal" /* Configuration Name */);
    /*  // Added by 
        public void execute_update_query(String TransactionID) {
        xxpowlPOReqIntfUpdateEOVOImpl vo = getxxpowlPOReqIntfUpdateEOVO();
        vo.initQuery(TransactionID);
    // Added by  , this will not call bec changed the logic and so now the update button enabled on search results page
    // and this method will not called
    public void pageInEditMode (String transactionID, String readOnlyFlag, String ErrorColumn,
                                                                           String ErrorMessage)
        System.out.println("Transaction Id from pageInEditMode in UpdatePGAMImpl.java: "+transactionID);
        System.out.println("xxReadOnly from pageInEditMode in UpdatePGAMImpl.java: "+readOnlyFlag);
        // Get the VO
        xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
        //Remove the where clause that was added in the previous run
        updateVO.setWhereClause(null);
        //Remove the bind parameters that were added in the previous run.
        updateVO.setWhereClauseParams(null);
        //Add where clause
        // updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
        //Bind transactionid to the where clause.
         // updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
          updateVO.setWhereClauseParam(0, transactionID);
        //Execute the query.
        updateVO.executeQuery();
        xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
        // Assiging the transient varaibles
        currentRow.setxxErrorMessage(ErrorMessage);
        currentRow.setxxErrorColumn(ErrorColumn);
        if ("N".equals(readOnlyFlag))
              /* Make the attribute to 'False so that all fields will be displayed in Edit Mode because we used this
               xxReadOnly as SPEL  */
               currentRow.setxxReadOnly(Boolean.FALSE);
       public void executexxpowlPOReqIntfUpdateEOVO(String transactionID, String xxReadyOnly, String ErrorColumn,
                                                                                              String ErrorMessage)
           System.out.println("Transaction Id from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+transactionID);
           System.out.println("xxReadOnly from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+xxReadyOnly);
           System.out.println("Error Message from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorColumn);
           System.out.println("Error Column from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorMessage);
         // Get the VO
         xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
         //xxpowlPOReqIntfUpdateEOVORowImpl updaterowVO = xxpowlPOReqIntfUpdateEOVO();
       //not working
       //    OARow row = (OARow)updateVO.getCurrentRow();
       //    row.setAttribute("xxReadOnly", Boolean.TRUE);
    // updateVO.putTransientValue('XXXXX',x);
         //Remove the where clause that was added in the previous run
         updateVO.setWhereClause(null);
         //Remove the bind parameters that were added in the previous run.
         updateVO.setWhereClauseParams(null);
         //Add where clause
         // updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
         //Bind transactionid to the where clause.
          // updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
           updateVO.setWhereClauseParam(0, transactionID);
        // updateVO.setWhereClauseParam(1, ErorrColumn); 
         //Execute the query.
         updateVO.executeQuery();
         /* We want the page should be read only initially so after executing the VO with above command
            and if you use next() it will go to the first record among the
            fetched records. If you want to iterate for all the records then use iterator */
            /* Using Iterator
             while(updateVO.hasNext()) {  // this will check after execute Query above command if it has any rows
              xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
              /* above line next() will take the control of the first record */
          /*     currentRow.setxxErrorMessage(ErrorMessage);
                 currentRow.setxxErrorColumn(ErrorColumn);
               if ("Y".equals(xxReadyOnly))
                      currentRow.setxxReadOnly(Boolean.TRUE);                 
             } // this while loop will loop till end of all the fetched records
         xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
      // Assiging the transient varaibles
      currentRow.setxxErrorMessage(ErrorMessage);
      currentRow.setxxErrorColumn(ErrorColumn);
        /* Make the attribute to 'TRUE' so that all fields will be displayed as READ ONLY because we used this
           xxReadOnly as SPEL
           if ("Y".equals(xxReadyOnly))
                  currentRow.setxxReadOnly(Boolean.TRUE);            
      //Added by  and this methiod will get called from UpdatePG Process Form Request controller  
         public void rollback()
           Transaction txn = getTransaction();
           if (txn.isDirty())
             txn.rollback();
        public void apply()
            //OAViewObject vo1 = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
            //Number chargeAccountID = vo1.get
          getTransaction().commit();      
          OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
          if (!vo.isPreparedForExecution())
           vo.executeQuery();

  • Bridge on Mac deleting/rejecting/filtering not working!?! HELP

    Ok seems as if I am having a problem only windows users have run into in earlier versions of CS.  I was using CS5 on my PC and for many reasons I had to dump the dead weight of the PC world and move to a Mac... FINALLY! But that also ment purchasing a new CS5 for Mac.  I thought this would be flawless... CS5 to CS5. WRONG. I store my photos on a 2TB external, same one i used on my PC. Now, I can not do any sort of "editing" of image info like "delete, "reject", "star" or anyother rating within bridge. It does not work with key commandes or from the menu.  After researching this issue for two days it seems as if this issuse has been reserved for PC users and earlier versions being upgraded to newer ones.  This is not the case for me.  They said to "use as Administrator" I am the adminsitrator, and have made sure the permisissions have been set to read and write. That has not made a difference.  Others have said that there seems to be no solution. Things they have tried include:
    ~Uninstall/reinstall of CS
    ~administrator settings
    ~setting it to open automatically at start up
    ~deleting pictures and reloading them through the new software version (this also seems to be an issue reserved for photos that have already been uploaded, I do not know if this will change with new images loaded through the new version as I have not had a chance to try it, since I'm trying to resolve this first)
    I need to have access to my previously loaded files and this is a huge hiccup!
    PS I can open the files to Photoshop, and edit, and the changes seem to stick, its just any organization, deleting, staring etc actually in bridge DONT stick. another issue that the PC users seem to have is error messages and pop-up windows when tring to exicute these tasks. I have no error messages.
    PLEASE HELP! thx

    I am read only on both of my externals! when i tried to find a way to set permissions, it says that I should be able to find a "lock" once I have gone to "get info" there is no "lock" so that I may enter my password and change permissions.
    First thing that comes to my mind is that you have used the same external disks as you did for Windows. And that you did not reformatted them for a Mac using MacOS Extended (Journaled) formatting.
    Without knowing your situation I assume you have a back up disk with the same content as your problem disk. If not it might be wise to buy a new back Up disk. There is one thing sure about disks, they all have an end date, some sooner most later but they all die and often at a moment you did not expect it nor could use it...
    Make sure you have a proper back up and the reformat the disk (or the new disk) using Mac Disk Utillity
    Personally I always use the safety option to overwrite the disk once with Zeros but that takes a bit longer.
    Give it a proper name and use the default format as mentioned above. Copy the content back to the new formatted disk and try again
    If in doubt try another older disk or buy a cheap one for testing if this method is working for you.

  • Deleting photo's not working

    I recently upgraded to iphoto '11, everything seems to work fine apart from one thing the abillity to delete photo's. The delete key, dragging to the trash and arrow down trash option are all not working. Anyone any ideas? any help would be appreciated.

    Are you running a Managed or a Referenced Library?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management.

  • Trying to disable a Udev rule. Deleting it is not working.

    I am trying to configure my sound. I have a usb sound card I want it to be default.
    I followed the procedure as described here .
    So, my default soundcard was my usb soundcard!
    But, did this,
    Hot-plugging a USB sound card
    The following udev rule can be used to automatically make a USB sound card the primary output device when the card is plugged in. To do so, create the following file with the specified contents and.
    /etc/udev/rules.d/00-local.rules
    KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/usr/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"
    KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/usr/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"
    For information regarding loading udev rules see the following: Udev#Loading_new_rules
    But it was a mistake.. So, I wanted to correct this. I deleted this file.
    rm -rf /etc/udev/rules.d/00-local.rules
    after that, as mentioned here
    udevadm control --reload
    udevadm trigger
    After reboot, I was having again the file
    /etc/asound.conf
    which is created after the rule is triggered.
    So, what can i Do ?

    MoonSwan wrote:
    I may be mis-understanding your problem, zabrielza, so please correct me if I am off base here.
    You have 2 soundcards, yes?  One is a HDA Intel on-board and the other is your USB card.  You want the USB card to be the default all the time, correct?  If that is true then I suggest using this little part of the Alsa Wiki article to set your default card: https://wiki.archlinux.org/index.php/Ad … sound_card  I have used that part of the wiki successfully to set my default card, as I also have two sound cards, and I've had few issues since then. 
    As I said when I began this post, I may be wrong here so please say so if I am.  You might also want to start over and re-state exactly what your goal is because I see some posters are confused about what it is you're trying to accomplish.
    Yes you are right. You described my situation perfectly.  Firstly I started this topic to learn/know How should i disable correctly udev rules. It turns out that my udev rule is disabled. I have this file
    /etc/modprobe.d/alsa-base.conf
    configured correctly. Before I create the rule I had sound correctly but I never followed this.
    Select the default PCM via environment variable
    In your configuration file, preferably global, add:
    pcm.!default {
        type plug
        slave.pcm {
            @func getenv
            vars [ ALSAPCM ]
            default "hw:Audigy2"
    You need to replace the default line with the name of your card (in the example is Audigy2). You can get the names with aplay -l or you can also use PCMs like surround51. But if you need to use the microphone it is a good idea to select full-duplex PCM as default.
    Now you can start programs selecting the sound card just changing the environment variable ALSAPCM. It works fine for all program that do not allow to select the card, for the others ensure you keep the default card. For example, assuming you wrote a downmix PCM called mix51to20 you can use it with mplayer using the commandline ALSAPCM=mix51to20 mplayer example_6_channel.wav
    Instead of using new variables, you could set one of those mentioned in default global configuration.
    /usr/share/alsa/alsa.conf
    Variable name # Definition
    ALSA_CARD # pcm.default pcm.hw pcm.plughw ctl.sysdefault ctl.hw rawmidi.default rawmidi.hw hwdep.hw
    ALSA_CTL_CARD # ctl.sysdefault ctl.hw
    ALSA_HWDEP_CARD # hwdep.default hwdep.hw
    ALSA_HWDEP_DEVICE # hwdep.default hwdep.hw
    ALSA_PCM_CARD # pcm.default pcm.hw pcm.plughw
    ALSA_PCM_DEVICE # pcm.hw pcm.plughw
    ALSA_RAWMIDI_CARD # rawmidi.default rawmidi.hw
    ALSA_RAWMIDI_DEVICE # rawmidi.default rawmidi.hw
    Note: Pay attention to default addressing type.
    So, Should I try it now? Do I have to reset alsa-installation first ( I do not know how to do this ) or not?

  • .MTS files not working

    Hi Everyone-
    I just shot a short doc on the Panasonic GH2. I have all the .mts files imported into Premiere CS6 on a MacBook Pro. I have 16GB of RAM and the files are on a Thunderbolt drive. These files will not play back in real time, even when putting them on 1/4 resolution. I am not sure what I'm doing wrong. Also some of the files loaded, then went offline and now when I try to re-import them, I am getting a Premiere import general error. Any thoughts? I also tried to wrap the files using one of the many wrapper programs out there before importing, but I lost sound when I did that and I need sound for sync purposes. Any help would be great. I edited a video with Nikon MTS files a year ago that worked perfectly on this system. I am really at a loss and on a deadline. Thanks!

    astanuga wrote:
    .... Photorec, (http://www.cgsecurity.org/wiki/PhotoRec) despite the user interface,.... has anyone out there gone through anything similar, and did you have any luck recovering your files????
    Photorec's interface is a Mac User's nightmare, indeed, because it is a Terminal.app only ... but free.
    I did use it once, I deleted a file in camera - after pushing 'yes - erase it', I realized I deleted a very nice smile on that track.
    so, in my case, the original SDcard existed, I immediately got it out the cam and let Photorec directly from card did its job.
    only advice from here: use the original SDcard, no copies, no trashbins, no ... whatever. then you have a high chance.
    and Welcome astanuga to the  boards ...

Maybe you are looking for

  • Provisioning mailboxes to different databases based on office location

    We have a script to create all new users based on what is being created in our HR system. This script creates a mailbox for the user in the database "NewMailboxes". Then everyday a script is being called on the exchangeserver to move the newly create

  • Trying to us an old VGA power Mac monitor on my 2006 imac

    I Thought I had a fix for my quickly dying imac.  It's guts are fine but the LCD monitor has developed a form of computer tourets.   I've just lost 1/3 of the screen.  Tested it out to determine that my graphics card is fine but the monitor is not, I

  • Web services Problem in SOA suite 10.1.3

    HI every body , I have particular web service which opens fine with 10.1.3 jdeveloper using the partener but when I try to deploy the application with that particular webservice I get this error BUILD FAILED D:\downloads\jdevstudio10131\jdev\mywork\K

  • [F8] Problem with scrip when targeting player 8

    When I target the flash 8 player my scripts wont work and I cant figure out why. Here is what I have (forgive me if my explanations arent up to snuff) On my tracker button Code: on (rollOver) { startDrag("/tracker", true); On my first frame Code: mov

  • Special characters are not being displayed normally after recent update.

    FF messed up with that recent update. Special characters are now not being displayed properly - they somehow stretch the whole line where they are posted. It was fine before I.E.: http://www.discogs.com/artist/%E2%84%91%E2%8A%87%E2%89%A5%E2%97%8A%E2%