How to update the tables either in its entirety or not at all
We want update more than two tables at one time,for example we code following:
update A set ***
update B set ***
we first update A, but sometimes B can not be updated sucessful,
How to update A&B tables in its entirety? Or, if any one of these tables can not be updated sucessful,two talbes don't update at all.
Thank you very much?
hi,
You want to update or not update at all that means either Update or rollback.
So Put A COMMIT WORK statement after the update starement.
It will either fully update or Automatically Rollback the whole
Processing.
Regards
Sumit Agarwal
Similar Messages
-
How to update the table value in the valuechange event?
I have an input field in the datatable with the valueChangeListener
<rich:dataTable id="cart" value="#{cart.cartList}" var="item">
<h:inputText value="#{item.cost}" id="qty" valueChangeListener="#{items.updateCost}" onchange="submit()">
<h:outputText value="#{item.errorMsg}"> </h:outputText>
in the backing bean
Item item = (Item) model.getRowData();
// do some update, if the cost too larger, change to max_cost
item.setCost(max_cost);
item.setErrorMsg("Error Msg");
After calling the valuechange method, the screen output doesn't update the cost.
How to update the table value in the valuechange event?As you're misusing the valueChangeListener to set another input field, you need to skip the update model values phase. Otherwise the value set in the valueChangeListener will be overridden by the submitted value. You can do this by calling the FacesContext#renderResponse() inside the valueChangeListener method. This will shift the current phase immediately to the render response phase, hereby skipping the update model values and invoke application phases.
-
How to update the table available in BADI method
Hi Friends,
I have to implement one badi ME_REQ_POSTED for purchase requistion, in this badi I have to read first line item and do
some check...if that check is true i need to update subsequent line item (line 20, 30, 40 or so) with purchase group and MRP controller.
In this BADI i have method POSTED, in this method parameter IM_EBAN is a table which i need to modify with my different
values for purchase group and MRP controller.
Kindly let me know how to update this table, so the changes can be reflected in purchase requistion.
Since when I tried to directly modify the table in a loop, system throw one error stating IM_EBAN can not be modified.
kindly help.
pradeephi
I have implemented this exit but it does not stop at it while saving Purchase requistion. But my previous BADI stops at it when saving.
Kindly guide. -
How to update the table when change list item in classic report
hi ,
i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
my question
1- how to do this by javascript and get the value from list item and update the table with new value
2- is i must use API to create list item so i can get the value of item in report or what.
Thanks
AhmedI coded the following to give you direction:
1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
<script language="JavaScript" type="text/javascript">
function updateTable(pThis)
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
</script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value. -
ADF Master Form / Detail editable table : how to update the table ?
Hello,
I'm using ADF faces with entity objects.
Here is a simple explanation of the model :
Table DOCUMENT --> Table LINEA DOCUMENT can have 0 or several row in the LINE table. Model is quite simple.
I'd like to create JSF pages to create and update DOCUMENT/LINE items.
I began with the Edit one :
In my DataControls I have something like :
AllDocuments
|
+- Id
|
+- Name
|
+-> AllDocumentLines
|
+- IdLine
|
+- ValueI created a form with the "AllDocuments" items having navigation and submit button.
I created an editable table with "AllDocumentLines" items.
The values are correctly filled.
My questions are :
- Which kind of "button" I have to add at the end of each row of the table to :
* validate the update if "Value" changes ? I tried to drag/drop the related Create button but it stays disabled.
* delete the row
- Which button can I put to "Add" a new row ?
I searched the forum but can't find answers of my problem.
Edit: I'm using JDeveloper 11.1.1.3.0
Edited by: Christophe on Jul 2, 2010 5:12 PMFor creating a record drag the createInsert operation and for delete drag the delete operation - just make sure to drag the operation from the right VO in the data control palette.
The you can drag the commit and rollback operations from the AM level - and you can change the "Disabled" properties of the buttons to false. -
How to find the table name on which integrity constraint not found
Hi All
How to acheive this
I have a lot of tables with lot of primary key - foreign key
relationship.
In plsql
when any inserts happen in the child table & the corresponding row is not present in the parent table, we get an exception
ORA-02291: integrity constraint (user1.ppk) violated - parent key not found
On this exception , in the exception block i want to trap teh name of the parent table on which the primary key for the particular child table was not there
Is it possible to retrieve the parent table in this way. I am looking for a generic plsql code block which can help to acheive this
Regardsscott@ORA92> SET SERVEROUTPUT ON
scott@ORA92> DECLARE
2 e_no_parent_key EXCEPTION;
3 PRAGMA EXCEPTION_INIT (e_no_parent_key, -2291);
4 v_fk_cons VARCHAR2 (61);
5 v_owner VARCHAR2 (30);
6 v_parent_table VARCHAR2 (61);
7 v_pk_cons VARCHAR2 (30);
8 v_parent_column VARCHAR2 (30);
9 BEGIN
10 INSERT INTO emp (empno, deptno) VALUES (99, 60);
11 EXCEPTION
12 WHEN e_no_parent_key THEN
13 -- extract schema.constraint_name from sqlerrm:
14 v_fk_cons:= SUBSTR (SQLERRM,
15 INSTR (SQLERRM, '(') + 1,
16 INSTR (SQLERRM, ')') - (INSTR (SQLERRM, '(') + 1));
17 DBMS_OUTPUT.PUT_LINE ('Foreign key constraint violated: ' || v_fk_cons);
18 -- extract parent schema.table and parent key:
19 SELECT owner, table_name, constraint_name
20 INTO v_owner, v_parent_table, v_pk_cons
21 FROM user_constraints
22 WHERE (owner, constraint_name) =
23 (SELECT r_owner, r_constraint_name
24 FROM user_constraints
25 WHERE owner || '.' || constraint_name = v_fk_cons);
26 DBMS_OUTPUT.PUT_LINE ('Parent table: ' || v_owner || '.' || v_parent_table);
27 DBMS_OUTPUT.PUT_LINE ('Parent key: ' || v_owner || '.' || v_pk_cons);
28 -- extract parent table columns:
29 FOR rec IN
30 (SELECT column_name
31 FROM user_cons_columns
32 WHERE owner = v_owner
33 AND table_name = v_parent_table
34 AND constraint_name = v_pk_cons)
35 LOOP
36 DBMS_OUTPUT.PUT_LINE
37 ('Parent table column: ' || rec.column_name);
38 END LOOP;
39 END;
40 /
Foreign key constraint violated: SCOTT.FK_DEPTNO
Parent table: SCOTT.DEPT
Parent key: SCOTT.PK_DEPT
Parent table column: DEPTNO
PL/SQL procedure successfully completed. -
How to update Spry-table and present the updated table in a div element?
Hello!
I am using a very interesting AJAX-framework called Spry when designing a web page. Here the web page is: Link.
I need some help.
Every time a new project or shift is added, the changes are written to an xml-file. When the page is reloaded, Spry reads data from xml-files.
This is caused by this code:
dsProjects = new Spry.Data.XMLDataSet("timetable/projects.xml", "projects/project");
dsShifts = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project/shift"); //look inside projects.xml and //extrac xml-file. url
dsName = new Spry.Data.XMLDataSet("timetable/{dsProjects::url}", "project");
I call this function that I have written: loadProjectsIntoDivElement ().
This function does the following: [See attached code.]
It iterates through the Spry-datastructure and puts the data in a table inside of the div-element called 'projectsList'.
Now, when I add a new project, I want it to be inserted into the Spry-datastructure and then cause the new data to be written into the div element called 'Specials_DIV'.
I have found out how to update a Spry-datastructure (e.g. dsProjects above), but I don't know how to update the table containing the data without refreshing the page. This should be done using Spry.
Some code:
1:
2:
3:
function loadProjectsIntoDivElement () {
$('#projectsList').html('');
$('#projectsList').append('<table id="Specials_Table"><tr><th spry:sort="id">ID</th><th spry:sort="NAME">Name </th><th spry:sort="hoursestimated">Nr. of hours estimated</th><th spry:sort="hoursworked">Nr. of hours worked</th><th spry:sort="costperhour">Cost per hour.</th></tr>{function::init_hours}<tr spry:repeat="dsProjects" onclick="chooseProject({ds_RowID})"><td>{id}</td><td>{NAME}</td><td>{hoursestimated}</td><td>{hoursworked}</td><td>{costperhour}</td></tr></table><br/>{function::get_hours}<br/>');
I have tried to accomplish this in various ways but I don't succeed.
I want to do it without refreshing the page.
Update: I found some code here that I will try: Link
Thanks in advance!
Anders Branderud
My blogHello!
Thanks!
I don't succeed with the implementation in any browser.
I have found a way to it, but I would like a way that updates the data quicker and without reloading all of the page. After all, I am only adding one row on the end of the data structure, so there should be no need to read in all data again.
Now I do it like this:
When a project is added, do this:
1. Store a new row in the project file through a php script.
2. When the post-call to the php-file returns, do refresh of the whole page.
Then the newest version of the xml file will be read in.
However, I don't want to read the data from a xml file each time that a new project is created.
I know how to add the new data to a Spry-datastructure [in my code 'dsProjects'], but I don't know how to display the updated data without reloading the whole page.
I have tried some various ways to do it, but haven't succeded.
Thanks!
Anders Branderud -
How to update report when i update the table.......
Hi, iam very new to this group, presently iam using XML Publisher, in that i have some doubts, that is, i created one report, immediatly i update the oracle table then how to update the report in XML Publisher,how to do that one pls tell me its use full for me please,
another one how do we publish this Reports.
please tell me any body,
Thank you.
Ramana.XML-Publisher can be called using an URL. This is described in the userguide.
What you could to is to create a db trigger on your table which will make a url call like you would do calling the Oracle reports server from the database using the event driven API.
Note that in order to have this work you will need to place the report you want to run in the guests folder of XML-Publisher -
How to update the data in sqlserver table using procedure in biztalkserver
Hi,
Please can any one answer this below question
how to update the data in sqlserver table using procedure in biztalkserver
while am using executescalar,typedprocedure getting some warning
Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
Please send me asap....
Thanks...Hi Messip,
A detailed error would have helped us to answer you more appropriately but
You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
2013: Inserting RawXML (Whole Incoming XML Message) in SQL database -
I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) From another server ex: Transaction server?
Set up steps so inset, update or delete operation takes place across the servers.
It would be great if someone please enlighten me in details about this process in MS SQL Server 2008 R2.
Also please describe would it be different for SQL Server 2012?
If so, then what are the steps?I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) from another server ex: Transaction server?
Set up steps so that inset, update or delete operation gets done correctly across servers.
I was not sure about the answer, it would be great if someone please put some light on this and explain in details about this process in MS SQL Server 2008 R2.
Also it would be very helpful if you please describe would it be different for SQL Server 2012? If so, then what are the steps? -
How to capture the table update
How to capture the table update.Suppose I delete a enrtry from the table or mofying any entry in a table is there way to capture that update in SAP?
hi ,
follow these steps:
1. After you selecte the search help for New Responislbe person, domodify gets triggered.
2. In the wddomodify, get the value of New Responsible person by reading the attribute binded to it.
3. Now if Value entered is not initial, write a selecte query to fetch the name based on pernr no.
4. Finally bind the name fetched with the attribute binded to New Responsible person name.
Wdomodify :
************* *Read the New REsponsible person Pernr* ***********
DATA lo_nd_cn_sflight TYPE REF TO if_wd_context_node.
DATA lo_el_cn_sflight TYPE REF TO if_wd_context_element.
DATA ls_cn_sflight TYPE wd_this->element_cn_sflight.
DATA lv_carrid LIKE ls_cn_sflight-carrid.
* navigate from <CONTEXT> to <CN_SFLIGHT> via lead selection
lo_nd_cn_sflight = wd_context->get_child_node( name = wd_this->wdctx_cn_sflight ).
* get element via lead selection
lo_el_cn_sflight = lo_nd_cn_sflight->get_element( ).
* get single attribute
lo_el_cn_sflight->get_attribute(
EXPORTING
name = `PERNR`
IMPORTING
value = lv_carrid ).
****** *Check whethre a value has been entered in PERNR* *************
if lv_carrid is not initial.
*************Select Name based on pernr entered* ***********
select ename from pa001 into lv_ename where pernr = lv_carrid.
*******Set the Name atttribute with the ename value fetched* *****
lo_el_cn_sflight->set_attribute(
name = `NAME`
value = lv_cename ).
endif. -
How to write a procedure for update the table
Hi all
can any body please tell me how to write a procedure to update the table......
I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
registration Code Creidits
13213 BBA
1232 MCS
I had add the creidit now i want to update the table.........the new value want to get by SQL like
Creidit = select creidit from othere_table...........
Hope u can understand my problem
Thanks in advance
Regards
Shayan
[email protected]Please try the following --
update Program_reg a
set TotalCreidit = ( select tot_cr <Accroding to your logic>
from Program_reg b
where a.Registration = b.Registration
and a.Enrollment = b.Enrollment
and a.code = b.code
where a.Registration in ( select distinct Registration
from Program_reg );
N.B.: Not Tested....
Regards.
Satyaki De. -
How to update the field ZLSPR of table BSEG
HI Friends,
Can anyone tell me how to update the field ZLSPR of table BSEG? I've a 700 line abap program and I should include some logic in this program to make an entry into BSEG-ZLSPR. Is there any FM/BAPI available? Is BDC a healthy approach?. My team lead do not want me to use UPDATE statement....please help.
Thanks in advans,
Varsha.Hi,
Hi ,
You will need to group that radiobuttons so that SAP knows they are linked together. To do this using the grahical layout editor simply select all the radiobuttons and then right click on them, Now choose define group. Once you have done this you should not need any of the "clear" or "='X'" statements SAP should control it all for you.
hope this helps
Reward if found helpfull...
Venkoji Babu. -
How to update the ztable by using table handling function
how to update the ztable by using table handling function
It is very urgent ...............................
thanks in advancesee the below code for the direct ztable update
Report ZUPDATE_PRPS.
tables: zprps.
parameter: p_wbs like zprps-pspnr,
p_value like zprps-fakkz default 'X'.
data: wa_fakkz type zprps-fakkz.
*START-OF_SELECTION
start-of-selection.
call function 'CONVERSION_EXIT_ABPSP_INPUT'
exporting
input = p_wbs
importing
output = p_wbs
exceptions
not_found = 1
others = 2.
select single fakkz
into wa_fakkz
from zprps
where pspnr eq p_wbs.
if sy-subrc eq 0.
update zprps set fakkz = p_value where PSPNR eq p_wbs.
if p_value is initial.
message i999(za) with 'Billing element field has been unchecked'.
else.
message i999(za) with 'Billing element field has been checked'.
endif.
else.
message i999(za) with 'WBS element not found'.
endif.
reward points if it is usefull .....
Girish -
How to update the merged customer information in custom tables?
The "Setup merge Dictionary" is provided only to register APIs that would be called to update the merged information for parties.
Is there a similar feature for the account merge?
If anyone has any ideas of how to update the columns like customer_id, cust_acct_site_id etc. in custom tables at the end of customer merge, please let me know. Any sample code would be of great help.
Please let me know ASAP.
Thanks in advance,There is one method which I have used. The crm side uses a file called jtf_hooks_data. There is no guarantee that it will work in the future and you will have to test it. The merge program uses this sql
'SELECT hook_package, hook_api,product_code ' ||
'FROM jtf_hooks_data '||
'WHERE package_name = ''ARP_CMERGE_MASTER'' ' ||
'AND api_name = ''MERGE_PRODUCTS'' ' ||
'AND execute_flag = ''Y'' ' ||
'ORDER BY execution_order ';
Your procedures have to have the same signature as the one being called. Issues the select statement on your system and see what is returned.
Maybe you are looking for
-
I'm getting this error any hands
Status Failed Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach) Status Failed Details ORA-12528: TNS:listener: all appropriate instances are blocking new connections (DBD ERROR: OC
-
ITunes has stopped working: (Aproblem caused the program to stop...
After I installed the the 64 bit I-Tune for widows 8, iTunes is crashing and I am getting the following message: iTunes has stopped working: (Aproblem caused the program to stop working correctly. Windows will close the program and notify you if a so
-
Serial Communicat​ion problem in LabVIEW 7.0
I recently upgraded my test computer from a 450 Mhz machine to a Del 2.8 Ghz Pentium 4processor with 512meg's of ram using Windows 2000 for the operating system running LabVIEW 7.0. I use the serial port to communicate with a piece of hardware, Rs232
-
HT201269 I am getting error 2 while starting and I cannot start my I tunes on windows 7
Please can some one advise me. I need to transfer all my contact from n97mini Nokida to I phone 5c
-
How to pass the variable in the script logic from text prompt
hai, in my logic i am using Textprompt and the prompt is PROMPT(TEXT,%period%,"Enter a period Category",,"") i have to append this period in middle of the one category how can i do this thanks, Rajesh