ADF delete a record
Hi,
Iam using Jdeveloper 10g. I have made a jsp page. In this page, Iam using <html:select> for selecting database information. After selecting of one item, I will delete record inside the database.
How can I do that.
Iam using ADF and struts.
Regards
Johan
Have a look at the ADF workshop (linked from the JDeveloper home page and from the tutorials page), it takes you through building a complete application including deleting a record.
Similar Messages
-
ADF,how to delete parent record and related child record without manual cod
Hi All,
I'm using 11g adf.
I have one parent table PAR and two child table CHD1 , CHD2 respectively.
I'm inserting values in three tables , making a form having add , delete and edit buttons.
Issue when i want to delete a record from PAR table , it gives child table record exists . i have did manual coding to delete the child records with related to the selected parent table PAR.
Is there any process in ADF to delete the child records with respective selected parent record with out manual coding.
thanks in advance.http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcentities.htm#BABHFJFJ
John -
Stale data error while deleting a record
Hi
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. I have two AM one for Search Page and one for Update Page.
Please find more details below.
intfEO based on PO_REQUISITIONS_INTERFACE_ALL
errorEO based on PO_INTERFACE_ERRORS
updateEO based on PO_REQUISITIONS_INTERFACE_ALL
VOs
intfVO based on intfEO and errorEO
updateVO based on updateEO
AM
intfAM based on intfVO
updateAM based on updateVO
Pages
searchPG based on intfAM
updatePG based on updateAM
Suppose I have one record in interface table with corresponding error record in error table.When users given the search criteria and hit enter they found a record. It means i have one record in the interface having one error record in the error table and both tables have same transaction id (primary key). So here user first try to update the 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. When ever users click on update icon then update PG will open and when users click on Apply button then data is getting updated in the database and page will forward to the search page.
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();
SearchPG AM
package powl.oracle.apps.xxpowl.po.requisition.server;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.RowSetIterator;
import oracle.jbo.Transaction;
import oracle.jbo.domain.Number;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlErrosLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlInterfaceSouceCodeLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlItemSegment1LovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlOrgLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlReferenceNumberLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequestIdLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequisitionTypeLovVOImpl;
// --- 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 xxpowlPOReqIntfAllAMImpl extends OAApplicationModuleImpl {
/**This is the default constructor (do not remove)
public xxpowlPOReqIntfAllAMImpl() {
/**Container's getter for xxpowlPOReqIntfAllVO
public xxpowlPOReqIntfAllVOImpl getxxpowlPOReqIntfAllVO() {
return (xxpowlPOReqIntfAllVOImpl)findViewObject("xxpowlPOReqIntfAllVO");
/**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 */
"xxpowlPOReqIntfAllAMLocal" /* Configuration Name */);
/**Container's getter for xxpowlRequestIdLovVO
public xxpowlRequestIdLovVOImpl getxxpowlRequestIdLovVO() {
return (xxpowlRequestIdLovVOImpl)findViewObject("xxpowlRequestIdLovVO");
/**Container's getter for xxpowlErrosLovVO
public xxpowlErrosLovVOImpl getxxpowlErrosLovVO() {
return (xxpowlErrosLovVOImpl)findViewObject("xxpowlErrosLovVO");
/**Container's getter for xxpowlOrgLovVO
public xxpowlOrgLovVOImpl getxxpowlOrgLovVO() {
return (xxpowlOrgLovVOImpl)findViewObject("xxpowlOrgLovVO");
//Start Adding by Lokesh
//This method wil get invoked from the search results page Process Request
public void rollbackItem()
Transaction txn = getTransaction();
if (txn.isDirty())
txn.rollback();
//This method will invoked from Controller page when user click Yes on delete confirmtion page from Search Results Page
public void deleteItem(String trasnsactionID)
Number rowToDelete = new Number(Integer.parseInt(trasnsactionID));
OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfAllVO();
xxpowlPOReqIntfAllVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
// System.out.print(fetchedRowCount);
System.out.println("No of row fetched on delete method :"+fetchedRowCount);
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
System.out.println("1 :");
if (fetchedRowCount > 0)
System.out.println("2 :");
deleteIter.setRangeStart(0);
System.out.println("3 :");
deleteIter.setRangeSize(fetchedRowCount);
System.out.println("4 :");
for (int i = 0; i < fetchedRowCount; i++)
System.out.println("5 :");
row = (xxpowlPOReqIntfAllVORowImpl)deleteIter.getRowAtRangeIndex(i);
System.out.println("6 :");
Number PK = row.getTransactionId();
System.out.println("7 :");
if (PK.compareTo(rowToDelete) == 0)
System.out.println("8 :");
row.remove();
System.out.println("9 :");
getTransaction().commit();
System.out.println("10 :");
break;
//System.out.println("11 :");
System.out.println("11 :");
deleteIter.closeRowSetIterator();
System.out.println("12 :");
/**Container's getter for xxpowlInterfaceSouceCodeLovVO
public xxpowlInterfaceSouceCodeLovVOImpl getxxpowlInterfaceSouceCodeLovVO() {
return (xxpowlInterfaceSouceCodeLovVOImpl)findViewObject("xxpowlInterfaceSouceCodeLovVO");
/**Container's getter for xxpowlRequisitionTypeLovVO
public xxpowlRequisitionTypeLovVOImpl getxxpowlRequisitionTypeLovVO() {
return (xxpowlRequisitionTypeLovVOImpl)findViewObject("xxpowlRequisitionTypeLovVO");
/**Container's getter for xxpowlReferenceNumberLovVO
public xxpowlReferenceNumberLovVOImpl getxxpowlReferenceNumberLovVO() {
return (xxpowlReferenceNumberLovVOImpl)findViewObject("xxpowlReferenceNumberLovVO");
/**Container's getter for xxpowlItemSegment1LovVO
public xxpowlItemSegment1LovVOImpl getxxpowlItemSegment1LovVO() {
return (xxpowlItemSegment1LovVOImpl)findViewObject("xxpowlItemSegment1LovVO");
Search Page 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.java.util.collections.Hashtable;
import java.util.Hashtable;
//import java.util.HashMap;
import java.io.Serializable;
import javax.servlet.jsp.PageContext;
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.TransactionUnitHelper;
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);
//Added by Lokesh
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "updateRecord", false)) {
am.invokeMethod("rollbackItem");
TransactionUnitHelper.endTransactionUnit(pageContext, "updateRecord");
* 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);
// deleteTransactionID =""; //Makeing Null because dont want to show the transaction id bec users dont know about it
//MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", 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.setFormPHi friend ,
In Search page i didn't do any update. and also search page is not a problem it's working fine. create page only the problem. In this page only throwing Stale data error exception.
Please give me more suggestion.
Thanks in advance, -
Hi,
I got an ArrayIndexOutOfBOundException when I try to delete a record from table.
Caused by: oracle.jbo.domain.GenericDomainException: JBO-25028: Domain object type Number.bigDecimalValue cannot be created: java.lang.ArrayIndexOutOfBoundsException: 0.
at oracle.jbo.domain.Number.bigDecimalValue(Number.java:573)
at oracle.jbo.domain.Number.hashCode(Number.java:445)
at oracle.jbo.Key.hashCode(Key.java:433)
at oracle.jbo.common.WeakHashtableImpl.get(WeakHashtableImpl.java:192)
at oracle.jbo.common.WeakHashtable.get(WeakHashtable.java:94)
at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:721)
at oracle.jbo.server.EntityCache.add(EntityCache.java:523)
at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3024)
at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3632)
at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5596)
at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3528)
at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3387)
at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2188)
at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5016)
at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2935)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2791)
at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3032)
at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2726)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1221)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1035)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2774)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2751)
at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1906)
at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:3441)
at oracle.jbo.server.ViewObjectImpl.updateReferenceEntities(ViewObjectImpl.java:14476)
at oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:13252)
at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:13640)
at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:1488)
at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:1504)
at oracle.jbo.server.EntityCache.notifyColumnAndBlgChange(EntityCache.java:1560)
at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:7270)
at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:7251)
at oracle.jbo.server.EntityImpl.notifyAttributesAndBlgChanged(EntityImpl.java:7260)
at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:3549)
at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:3197)
at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1934)
at oracle.jbo.server.AttributeDefImpl.resolveSet(AttributeDefImpl.java:3406)
at oracle.jbo.server.EntityImpl.setAttrInvokeAccessor(EntityImpl.java:1915)
at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:1842)
at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:2222)
at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:2036)
at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1421)
at com.gm.vstar.model.report.queries.GroupSearchVORowImpl.setGroupName(GroupSearchVORowImpl.java:100)
at com.gm.vstar.model.report.queries.GroupSearchVORowImpl$AttributesEnum$1.put(GroupSearchVORowImpl.java:23)
at com.gm.vstar.model.report.queries.GroupSearchVORowImpl.setAttrInvokeAccessor(GroupSearchVORowImpl.java:130)
at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1057)
at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:997)
at com.gm.vstar.ui.manage.bean.manageGroups.removeGroup(manageGroups.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
... 51 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3315)
at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:666)
at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:2196)
at oracle.jbo.domain.Number.bigDecimalValue(Number.java:569)
I am using Studio Edition Version 11.1.1.4.0. I got JBO-25028: Domain object type Number.bigDecimalValue cannot be created while running the AM itself.
Please advise.
AbhishekHi Kumar,
I did the same thing but again got the same error:
DCBindingContainer> <reportException> [19586] oracle.jbo.domain.GenericDomainException: JBO-25028: Domain object type Number.bigDecimalValue cannot be created: java.lang.ArrayIndexOutOfBoundsException: 0.
at oracle.jbo.domain.Number.bigDecimalValue(Number.java:573)
at oracle.jbo.domain.Number.hashCode(Number.java:445)
at oracle.jbo.Key.hashCode(Key.java:433)
at oracle.jbo.common.WeakHashtableImpl.get(WeakHashtableImpl.java:192)
at oracle.jbo.common.WeakHashtable.get(WeakHashtable.java:94)
at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:721)
at oracle.jbo.server.EntityCache.add(EntityCache.java:523)
at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3024)
at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3632)
at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5596)
at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3528)
at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3387)
at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2188)
at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5016)
at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2935)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2791)
at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3032)
at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2726)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1221)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1035)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2774)
at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2751)
at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1906)
at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:3441)
at oracle.jbo.server.EntityImpl.vetoRemoveWithDetails(EntityImpl.java:8554)
at oracle.jbo.server.EntityImpl.remove(EntityImpl.java:8711)
at oracle.jbo.server.ViewRowImpl.doRemove(ViewRowImpl.java:3280)
at oracle.jbo.server.ViewRowImpl.remove(ViewRowImpl.java:3325)
at oracle.jbo.server.QueryCollection.doRemove(QueryCollection.java:2480)
at oracle.jbo.server.QueryCollection.remove(QueryCollection.java:2503)
at oracle.jbo.server.ViewRowSetImpl.removeRowAt(ViewRowSetImpl.java:2413)
at oracle.jbo.server.ViewRowSetIteratorImpl.doRemoveCurrentRow(ViewRowSetIteratorImpl.java:2469)
at oracle.jbo.server.ViewRowSetIteratorImpl.removeCurrentRow(ViewRowSetIteratorImpl.java:2494)
at oracle.jbo.server.ViewRowSetImpl.removeCurrentRow(ViewRowSetImpl.java:3301)
at oracle.jbo.server.ViewObjectImpl.removeCurrentRow(ViewObjectImpl.java:10707)
at oracle.adf.model.binding.DCIteratorBinding.removeCurrentRow(DCIteratorBinding.java:2712)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1293)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2143)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at com.gm.vstar.ui.manage.bean.manageGroups.removeGroup(manageGroups.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
at oracle.adf.view.rich.component.UIXDialog.broadcast(UIXDialog.java:97)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)
at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3315)
at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:666)
at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:2196)
at oracle.jbo.domain.Number.bigDecimalValue(Number.java:569)
There seems to be soem issue in DB mappings.
Abhishek -
Need to delete multiple records at a time
Hi,
My requirement is to delete multiple records at a time, i am using JDV11g and read only ADF table and rowSelection="multiple".
i have taken command button and invoking the below method.
RowKeySet rowKeySet = (RowKeySet)this.t1.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.t1.getValue();
System.out.println("RowKeySet is: "+ rowKeySet.getSize());
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding)cm.getRowData();
System.out.println("RowData is : "+rowData.getAttribute("ParamValue7"));
rowData.getRow().remove();
Please do need fullHi,
I don't understand what you mean by "+Please do need full+" , so I am ignoring this part. Here's a link that shows you best practices
http://blogs.oracle.com/smuenchadf/examples/
See example 134.
Frank
ps.: I suggest you bookmark the link -
Delete master record without deleting corresponding details
Hi all,
If we have a master-detail relation and we delete the master record, the “Implement cascade delete” flag can be selected to delete the detail records also.
Now, what if I don’t want to delete the detail records, but instead set the corresponding attribute (that points to the master) in this record to null.
For ex when deleting a department record, I need to set the “dpartmentId” field of all the corresponding employee records to null instead of deleting these records.
Is there a configuration that can be made to tell ADF automatically do this?
Thank you.No, adf doesn't have such a mechanism. You can program it yourself by unsetting the cascade delete flag and before removing the master iterate over the child records and set the fk value to null.
Our you do this in the db using a trigger. In this case you have to refresh the child vo too.
Timo -
How to delete the record in Table
Hi Guru's,
i have Table which contain no.of Records.
i want to deleted one record. if i go to Table maint.Generator....from table itself..
how to do that... when we deleting the record. can we create new TR for that?
can anybody tell me.
Thanks in Advance,
venkatHi,
it is answered, here for my table there is no Table Maint.Generator.
i just explained how i have done it.
i just simply gone into Debug mode. there
code = Dele.
i have given. then i came out from debug mode to Table. there i just got Delete button on application tool bar.
i selected the record then icliked on Delete button.
it is got deleted.
But it is not asking for any new Transport Request.
Regards,
Venkat -
How to delete the record in the file present in the application server?
Hi,
I have two questions.
i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
ii) How can I lock the users whiel one user is accessing the file on the application server?
Thanks in advance.
SuvanHi,
If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
Instead what u can do is Add and field del_flag to ur record structure.
If u want to delete the record from a file just mark this del_flag as 'X'.
While processing u can have a loop like
loop at it_XXX where del_flag <> 'X'.
endloop.
This will logically delete the record.
When u r to finish the application at that time only perform this copying / deleting / and renaing activity
Hope this helps.
Cheers,
Nitin -
Error while updating or deleting a record
Hi to all...
i have created atable group_master with 2 fields Group_id and Group_name
the user will specify a group_name in a text box and press save. Before commiting a seq number will be generated
inside the form procedure and it will be inserted.
The insert is working fine.
But when i select a record i.e a group_name and change it contents and commit it, it is not commiting.
when i checked the display error it showed Ora-01400 cannot insert null values into the table.
Iam not inserting a value here iam updating the group name only.
even when i delete a record it shows same error....
can any one help to solve this....
thanx in advance........I have when button pressed trigger whick helps to show the lov which contains the group_id and group_name;
a := show_lov('lov27');
if a then
go_block('group_master');
execute_query;
end if;
it is correctly fetching the delected data. but propmpts a message box asking Do u want to save the record?
if i ignore it n modify the group_name and save it,still it shows unable to insert null value.
i jus want a simple way to solve this....
i want to fetch that particular record and modify or delete it.
group_id n group_name cannot be null.
i will be using Buttons for add,delete,update and save record. i will be using lov to fetch records for modification or deletion.
how to avoid the message box which prompts when i call lov with execute_query.....
* I tried Key-listval...but i didnt get any solution. i will try again....
thanx for ur replies.... -
A better way to delete IT2001 records in batch.,
Hi Gurus,
A little problem here. Due to data source error, I need to delete IT2001 records in batch.
Currently I am using standard report RPUREOPN to do this. But RPUREOPN will not update those deduction in IT2006 quota. So I've to delete & reupload cooresponding IT2006 quota data which is inconvenient.
Is there a better way to do this job? I mean deleting IT2001 in batch and also update the deductions in IT2006.
Thanks in adv!
Br,KeeAfter running the report you mentioned above to delete absences/attn you can try running the report RPTUPD00 to revaluate the attendance and absence.
Regards,
Divya -
HOW to delete the records in CO1P?
Hi all:
When i close the PO,i find the PO have CO1P records.However ,the PO has been settled. Then how can i delete the records in CO1P for this PO.Dear,
CO1P:
Normally the Goods Movement errors are updated in Table AFFW - Goods Movements with Errors from Confirmations and in transaction COGI.
If the table is locked during background using update control for the confirmation then the errors are recorded in CO1P.
COFC:
Used for Reprocessing of errors in confirmation related to actual cost calculations.
Please run CORUPROC Program.
Please check this link also for further help
http://help.sap.com/saphelp_46c/helpdata/en/e3/7cd32396f611d1b5a60000e8359890/frameset.htm
Regards,
R.Brahmankar -
How to delete translations / records in table omlt and mlt1
The customer has added some records to the translations, using DTW.
Unfortunately, the customer has made a mistake and wants these records to be deleted.
It is not possible to delete these records in DTW.
It is concerning 297 rows, I can select those rows by using a query that joins omlt and mlt1
If i use / in DTW, I can't delete the records
Is there an other way to fix this problem?
I have posted this question to SAP Support, but it's outside their scope.
Therefor I try to post this question on the forumYou may try a tool called B1TCH: /people/community.user/blog/2007/08/19/get-your-kicks-with-di-commander
Thanks,
Gordon -
How to delete data-records with BI-planning in BEx?
Hi folks, masters and gurus,
we just upgraded some of our functions from BPS to BI-Planning.
Only one thing I could not resolve up to now:
In BPS (web based) it was easily possible to delete data-records by choosing a radio-button beside the data-entry-field and click the "delete"-button (a red "-") on the top.
When I tried to find a delete-function in RSPLAN now I only found one that deletes the data, but not the record itself.
Does anyone know how to build a function that I can use to delete data-records?
Thx in advance for your help,
ThomasOh yes ... it´s not necessary as it is easily possible to supress lines with only 0 in it with
query-properties / rows/coloumns / supressing Zero / activ ...
Edited by: Thomas Kejik on Jan 19, 2009 9:46 AM -
How to refresh after delete the records in ALV report ?
Hi Friends,
How to refresh after delete the records in ALV report.
I am deleting records in ALV report .
After successful delete the screen should refresh.
u201C Deleted records should not appear in the screen u201C.
Please guide me.
Regards,
SubashHi subhash,
FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
WHEN 'BACK'.
Refresh the internal table from the ALV grid
PERFORM update_alv_tab.
ENDFORM. "user_command
FORM update_alv_tab .
DATA : e_grid TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = e_grid.
CALL METHOD e_grid->check_changed_data.
"update_alv_tab
CALL METHOD e_grid->refresh_table_display.
ENDFORM. " UPDATE_ALV_TAB
Then see in Debug mode is it updating or not..
Please confirm .
And please paste the code if you can.
Regards. -
Regarding how to delete the record in internal table
Hi experts ,
how to delete the record in intarnal table after validating the data,
if record contains invalid fields?
i am giving my code see this and give me the answer?
loop at it_data into wa_data .
Validate Cost Center
READ TABLE it_kostl INTO wa_kostl WITH KEY kostl = wa_data-kostl BINARY SEARCH.
IF sy-subrc NE 0.
PERFORM update_error_log USING wa_data
text-004.
ENDIF.
Validate source file material ( material number )
loop at it_mara into wa_mara .
read table it_ausp into wa_ausp with key atwrt = wa_data-i_matnr .
if sy-subrc NE 0 .
PERFORM update_error_log USING wa_data
text-002.
delete it_data-objek .
else.
read table it_mara into wa_mara with key matnr = wa_ausp-objek .
if sy-subrc EQ 0 .
wa_data-objek = wa_mara-matnr.
wa_data-matkl = wa_mara-matkl.
ENDIF.
Modify it_data from wa_data .
endif.
*endloop.
Validate unit of measure (unit)
READ TABLE it_t006 INTO wa_t006 WITH KEY msehi = wa_data-unit .
IF sy-subrc NE 0.
PERFORM update_error_log USING wa_data
text-003.
endif.
Validate delivery location ( storage location )
READ TABLE it_lgort INTO wa_lgort WITH KEY del_loc = wa_data-del_loc.
IF sy-subrc NE 0.
PERFORM update_error_log USING wa_data
text-001.
if wa_data-flag ='x' .
delete it_data from wa_data .
endif.
ENDIF.
endloop.Hi Naren,
First get the index number of the IT_data table and store it in one variable whose declaration like this.
data: tabix type sy-tabix.
while reading the internal table it_data set the tabix variable.
tabix = sy-tabix.
Instead of the above use below one.
Delete it_data-objek
Use the Below statement it will delete the row from the internal table.
Delete it_data-objek index tabix
Thanks,
Chidanand
Maybe you are looking for
-
I have recently updated my laptop from Windows Vista to Windows 7. I have just added three new playlists to my Ipod Shuffle, 3rd generation. On the panel in ITunes in view on the computer, all looks fine and music plays. However, after syncing a mill
-
The new version of Firefox, 18.02, will not load any pages. Why not?
I attempted to open Firefox and was told it would load when the updates were applied, which was nothing new. It loaded fine and there were no incompatible add-ons, but it will not load any web pages. I'm on the same computer using Chrome to send this
-
Manuel Page Breaks / Excel Output
Hello, I did a report which opens an Excel Sheet "inplace" to output the data. Therefore I used the interfaces "i_oi_spreadsheet" and "i_oi_document_proxy". Unfortunately these interfaces do not provide me with a possibility to insert a manual page b
-
Dear All , I want to use the QM functionallity in the production order (Discrete manufacturing ) , I want to do Quality after production and before doing GR . I have maintained the Inspection type 0
-
JavaScript is required. Enable JavaScript to use OAM Server.
I want to open an Excel spread sheet stored in a Webdav server using OAM (Oracle Authentication). It works fine on every PC or Mac having Excel 2010, 2013, but it doesn't work in Excel 2007. In Excel 2007 always gives the error "JavaScript is requir