How to Update Particular row in a table from OAF page
Hi Can anyone please help me on the following requirement:
In my oaf page i am displaying table values(supplier site details from base tables) with update and delete icons . When i click on update button a new page opens in which we used to update the values and click on apply button which again comes back to the original page.
So when i click on apply button on update page i have to first search for the site in the site table whether it exists or not, if not exists i have to create a new row and save the data, if site exists in the table i have to update the row of a table for that particular site. I have written code for this but unable to achive the requirement, it is not updating the existing row of the table. And i am doing all this on the Temp tables.
So now when i save, previous transaction is also updating along with the current transaction. That means when i m trying to save 2nd transaction values , 1st transactions values are getting updated with the 2nd transaction values(2 rows are getting updated)
Can anyone help me with the code used for updating the current row of the table. Please correct me if i m doing anyting wrong in code.
following is the current code i m using and which is failing :
Controller Code
if(pcontactaction.equals("createECdetailsEvent")) {
String currentSiteName=pageContext.getParameter("SiteName");
System.out.println("Selected Site Name is : " + currentSiteName);
Serializable x[]={reqNum,suppId,currentSiteName,pnotifMethod,pfaxNum};
System.out.println("Invoking AM Method.........");
am.invokeMethod("initCreateECDetails",x);
System.out.println("initCreateECDetails Method Executed. ");
//am.invokeMethod("save");
localOAApplicationModule.getTransaction().commit();
pageContext.setForwardURL(
"OA.jsp?page=/oracle/apps/floaf/flpos/supregister/webui/ECDetailsPG"
, null //not needed as we are retaining menu context
,OAWebBeanConstants.KEEP_MENU_CONTEXT
, null //not needed as we are retaining menu context
,null // no parameters are needed
,true //retain AM
,OAWebBeanConstants.ADD_BREAD_CRUMB_NO
,OAWebBeanConstants.IGNORE_MESSAGES);
AM Code
public void initUpdateECDetails(String request_number,String supplier_id,String site_name,String site_id,String notification_method,String fax_number)
OADBTransaction localOADBTransaction = getOADBTransaction();
String siteToUpdate;
siteToUpdate=site_name;
String siteidToUpdate;
siteidToUpdate=site_id;
System.out.println("Site Name to Update or Create is : " + siteToUpdate);
System.out.println("Site Id to Update or Create is : " + siteidToUpdate);
System.out.println("Inside Update EC Details MEthod.");
OAViewObject suppSiteDetVO = getFLPOSSuppSiteDetailsVO1();
FLPOSSuppSiteDetailsVORowImpl sro=null;
String existingWhereClause = suppSiteDetVO.getWhereClause();
suppSiteDetVO.setWhereClause(null);
suppSiteDetVO.setWhereClauseParams(null);
suppSiteDetVO.setWhereClause("SUPPLIER_ID = :1 AND REQUEST_NUMBER = :2 AND SITE_ID = :3 ");
suppSiteDetVO.setWhereClauseParam(0, supplier_id);
suppSiteDetVO.setWhereClauseParam(1, request_number);
suppSiteDetVO.setWhereClauseParam(2, site_id);
suppSiteDetVO.executeQuery();
suppSiteDetVO.setWhereClauseParams(null);
suppSiteDetVO.setWhereClause(existingWhereClause);
int rowcount = suppSiteDetVO.getRowCount();
System.out.println("Fetched Rows : " + rowcount);
if (rowcount == 0) {
Row row = suppSiteDetVO.createRow();
System.out.println("Row is : " +row);
suppSiteDetVO.insertRow(row);
String siteId = getOADBTransaction().getSequenceValue("FLPOS_SITE_ID_SEQ").toString();
System.out.println("New Site ID : " + siteId);
row.setNewRowState(Row.STATUS_INITIALIZED);
row.setAttribute("RequestNumber", request_number);
row.setAttribute("SupplierId", supplier_id);
row.setAttribute("SiteName", site_name);
row.setAttribute("SiteId", siteId);
row.setAttribute("FaxNo",fax_number);
row.setAttribute("NotificationMethod",notification_method);
System.out.println("New Row Created for Supplier Site.");
System.out.println("Data Saved to table.");
else{
System.out.println("Inside Else Block ");
try {
System.out.println("Inside Try Block ");
Row[] row = suppSiteDetVO.getAllRowsInRange();
for (int i = 0; i < rowcount; i++) {
sro = (FLPOSSuppSiteDetailsVORowImpl)row;
String psiteName=sro.getSiteName();
Number psiteid=sro.getSiteId();
System.out.println(" p Site Name is : " +psiteName);
System.out.println(" p site id is " +psiteid);
if(psiteid.equals(siteidToUpdate) ) {
sro.setAttribute("FaxNo",fax_number);
sro.setAttribute("NotificationMethod",notification_method);
//getOADBTransaction().commit();
break;
catch (Exception e) {
System.out.println("Exception in update : " + e);
}
Please answer following:
1. Are you using EO based VOs or ReadOnly VO?
2. What is your VO Query for the search and update?
3. Why have you based your logic on site_name; you should have used site_id?
4.Are you getting correct site name in handling createECdetailsEvent event in CO?
5. In case of update are you getting correct values on the Update Site Details?
6. On coming back from Update page to Supplier Site Search page, do you see old values of the site or the new values in the results table?
Please share the screenshot if possible.
-Prince
[email protected]
http://princekapoor82.blogspot.com
Similar Messages
-
How to display particular ROW of a table control in display/change mode
Hi,
Can we make particular ROW in a table control display mode or editable mode depending upon the conditions?.
Any inputs..
Rgds,
LakshmirajHi,
Yes it is possible. check the follwoing code for help.
*& Include Z101954_ASSIGNMENT1I01
*& Module VALIDATE_SALES_ORG INPUT
text
MODULE validate_sales_org INPUT.
SELECT SINGLE zvkorg FROM vbak INTO zvbak-zvkorg
*WHERE zvbeln = zbookhdr-zvbeln.
IF sy-subrc <> 0.
MESSAGE 'INVALID AIRLINE ID INPUT' TYPE 'I'.
CALL SCREEN 1000.
ENDIF.
ENDMODULE. " VALIDATE_SALES_ORG INPUT
*& Module USER_COMMAND_1001 INPUT
text
MODULE user_command_1001 INPUT.
var3 = 1.
IF sy-ucomm <> 'SAVE'.
PERFORM material_check.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT MATERIAL NUMBER' TYPE 'I'.
ELSE.
SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara
INTO CORRESPONDING FIELDS OF it_salesitems
WHERE zmatnr = it_salesitems-zmatnr.
SELECT SINGLE zwerks zlgort FROM zorg
INTO CORRESPONDING FIELDS OF it_salesitems
WHERE zvkorg = wa_salesorder-zvkorg
AND zvtweg = wa_salesorder-zvtweg
AND zspart = wa_salesorder-zspart.
it_salesitems-znetwr = it_salesitems-zstprs * it_salesitems-zbrgew.
MODIFY it_salesitems FROM it_salesitems INDEX sy-tabix.
MOVE-CORRESPONDING it_salesitems TO temp_salesitems.
APPEND temp_salesitems.
REFRESH it_salesitems.
ENDIF.
ENDIF.
LOOP AT temp_salesitems.
if it_salesitems-pick = 'X'.
LOOP AT SCREEN.
IF screen-name EQ 'DETAIL'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
endloop.
CASE sy-ucomm.
WHEN 'SAVE'.
PERFORM check_ship_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
ELSE.
PERFORM check_payer.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
ELSE.
PERFORM check_bill_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
ELSE.
wa_salesorder-zernam = sy-uname.
MOVE-CORRESPONDING wa_salesorder TO zvbak.
MODIFY zvbak.
LOOP AT it_salesitems.
it_salesitems-zvbeln = wa_salesorder-zvbeln.
MOVE-CORRESPONDING it_salesitems TO zvbap.
MODIFY zvbap.
ENDLOOP.
IF sy-subrc = 0.
MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
IF sy-tcode = 'ZVA01'.
CALL SCREEN '1000'.
ELSE.
CALL SCREEN '1003'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
WHEN 'DETAIL'.
CALL SCREEN '1002'.
WHEN 'BACK'.
IF sy-tcode = 'ZVA03'.
CLEAR wa_salesorder.
CALL SCREEN '1003'.
ELSE.
PERFORM pop_up.
ENDIF.
WHEN 'EXIT'.
IF sy-tcode = 'ZVA03'.
LEAVE PROGRAM.
ELSE.
PERFORM pop_up.
ENDIF.
WHEN 'CANCEL'.
IF sy-tcode = 'ZVA03'.
CLEAR wa_salesorder.
CALL SCREEN '1003'.
ELSE.
PERFORM pop_up.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
*& Module input_help_sold_to_party INPUT
text
MODULE input_help_sold_to_party INPUT.
SELECT zkunag FROM zvbak INTO CORRESPONDING FIELDS OF TABLE
itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ZKUNAG'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = '1000'
dynprofield = 'ZKUNAG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = itab
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " input_help_sold_to_party INPUT
*& Form pop_up
text
--> p1 text
<-- p2 text
FORM pop_up .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = 'DO YOU WANT TO SAVE THE ORDER?'
text_button_1 = 'YES'(001)
icon_button_1 = ' '
text_button_2 = 'No'(002)
icon_button_2 = ' '
default_button = '1'
display_cancel_button = 'X'
userdefined_f1_help = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = ans
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CASE ans.
WHEN '001'.
PERFORM check_ship_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
ELSE.
PERFORM check_payer.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
ELSE.
PERFORM check_bill_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
ELSE.
wa_salesorder-zernam = sy-uname.
MOVE-CORRESPONDING wa_salesorder TO zvbak.
MODIFY zvbak_101954.
temp_salesitems-zvbeln = wa_salesorder-zvbeln.
MOVE-CORRESPONDING temp_salesitems TO zvbap.
MODIFY zvbap.
IF sy-subrc = 0.
MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
IF sy-ucomm = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
IF sy-tcode = 'ZVA01'.
CALL SCREEN '1000'.
ELSE.
CALL SCREEN '1003'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
WHEN '002'.
IF sy-tcode = 'ZVA01'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
CALL SCREEN '1000'.
ELSE.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
CALL SCREEN '1003'.
CLEAR ans.
ENDIF.
ENDCASE.
ENDFORM. " pop_up
*& Module USER_COMMAND_1002 INPUT
text
MODULE user_command_1002 INPUT.
IF sy-datar = 'X'.
PERFORM material_check.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT MATERIAL' TYPE 'I'.
ELSE.
SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara_101954
INTO CORRESPONDING FIELDS OF wa_salesitems
WHERE zmatnr = wa_salesitems-zmatnr.
wa_salesitems-znetwr = wa_salesitems-zstprs * wa_salesitems-zbrgew.
ENDIF.
var = 1.
ENDIF.
IF sy-ucomm = 'BACK'.
LOOP AT temp_salesitems.
MODIFY temp_salesitems FROM wa_salesitems .
ENDLOOP.
it_salesitems-pick = ' '.
CALL SCREEN '1001'.
ENDIF.
ENDMODULE. " USER_COMMAND_1002 INPUT
*& Module USER_COMMAND_1000 INPUT
text
MODULE user_command_1000 INPUT.
CASE sy-ucomm.
WHEN 'NEXT'.
SELECT * FROM zt001k_101954 INTO CORRESPONDING FIELDS OF
temp_salesorder WHERE
zvkorg = wa_salesorder-zvkorg AND
zvtweg = wa_salesorder-zvtweg AND
zspart = wa_salesorder-zspart.
ENDSELECT.
IF sy-subrc = 0.
CALL SCREEN '1001'.
ELSE.
MESSAGE 'Invalid Data Entered' TYPE 'I'.
CALL SCREEN '1000'.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
*& Module USER_COMMAND_1003 INPUT
text
MODULE user_command_1003 INPUT.
IF sy-ucomm = 'NEXT'.
IF sy-datar = ' '.
MESSAGE 'ENTER PURCHASE ORDER NUMBER' TYPE 'I'.
CALL SCREEN 1000.
IF NOT wa_salesorder-zvbeln CO '0123456789'.
MESSAGE 'PURCHASE ORDER NUMBER IS NOT IN THE EXPECTED FORMAT' TYPE 'I'.
CALL SCREEN '1003'.
ENDIF.
var3 = 0.
CALL SCREEN '1001'.
ENDIF.
ENDMODULE. " USER_COMMAND_1003 INPUT
*& Module input_help_sales_order INPUT
text
MODULE input_help_sales_order INPUT.
SELECT zvbeln FROM zvbak_101954 INTO CORRESPONDING FIELDS OF TABLE
itab1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ZVBELN'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = '1003'
dynprofield = 'ZVBELN'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = itab1
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " input_help_sales_order INPUT
*& Module back_command INPUT
text
module back_command input.
*if sy-ucomm = 'SAVE' OR 'BACK' OR 'DETAIL' OR 'EXIT' OR 'CANCEL'.
*endif.
endmodule. " back_command INPUT
Regards
Rajesh Kumar -
Help needed in Loading excel data to staging table from OAF Page
Hi All,
We have a requirement from the client on loading of a excel sheet data into staging table using OAF page.
We were able to load a CSV file into staging table via OAF. The approach we used is we created a item of style 'messageFileUpload', which would pick the CSV file from desktop and we wrote the logic on the controller to place the file into server and then sumit a concurrent program to load the data into the staging table.
But client wants data from the excel file to be loaded into staging table. Is there any way(approach) by which we can convert the excel file data into .CSV file using OAF?
Any help or pointers on this will be highly apperciated.
Thanks,
ChethanaHi,
Read through this :
Need to upload a CSV/Excel to a table in OAF page
Thanks,
Gaurav -
How can I delete rows in a table from the bottom?
I have table that I add rows to and I want to remove rows starting with the last row. For example if I have a table with 20 rows how do I remove rows 16-20. I can't figure out how to do this.
The following script would/should/might delete the last 4 rows of a subform named 'itemsSub' : (or actually deletes the last row 4 times hopefully!)
for (var f = 0; f<4; f++)
_itemsSub.removeInstance(itemsSub.all.length - 1); -
How to set where clause for a Valueset from OAF Page
Hi all
I am customizing a standard page Employee Self Service. I have added some additional fields to existing KFF. There was field say "CHILD NAME" which is a free text field. The client now wants it to be a Drop down(or as LOV) which should display only the name of the child of the employee who is logged in.
I want to know if i can achieve it by attaching a value set to the CHILD NAME field. But how to set the employee id to that valueset in order to show only the children of the particular employee
Regards,
PradeepHi Pradeep,
If you could share some more details of the region you are trying to customize we can help
1. Do you need this selected value through lov or drop to be saved to the database
2. Right now, the "CHILD NAME" is this part of any table or in a panel. If would be best if you paste the PG.XMl and point the field you are trying to change.
This would help us to give you the best solution
Thanks
Sandeep -
How to edit a particular row in the table ctrl when a push button is clickd
Hi Experts,
How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
push button is clicked in the table control.
For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
editable mode after clicking "Modify" Push button.
Please help me out.
Thanks in advance.Hey Ram,
Thanks a ton.
Its working fine...sorry for the late reply.
The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
For E.g If i want to edit a particular row, first i select the row and then click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
To update the database, we need to select the row once again after modifying it and click on the "Save" button.
Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
Thanks,
Ananth. -
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
How to update duplicate row from table
Hi,
how to update duplicate row from table?
First to find duplicate row then update duplicate row with no to that duplicate row in oracle.
can you give me suggestion on it?
Thanks in advance.
your early response is appreciated...In order to find a duplicate row, see:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1224636375004
(or search this forum, your question has been asked before)
In order to update it, just create and use an Oracle sequence, have it start and increment at a value that doesn't exist in your table.
If that doesn't get you going, post some CREATE TABLE + INSERT INTO statements, and the results you want from them, in other words: a complete testcase. -
How to set fire action event for particular rows in a table
HI All,
I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
The table has columns like fullname,employee id etc.
So i want to set fire action event for particulars rows only which will saisfy some condition.Atanu,
Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
In either case loop through the rows and when your condition is met write the action to be performed in controller.
Regards,
Anand -
How to update multiple rows in one query using php
i am new to this can any one help me how to update multiple rows at a time i am doing an school attendance page
Often the situation is such that you have multiple courses across a range of dates.So students may take more than one course, and you need to track attendance for each course date. The following graphic demonstrates this:
In such a situation, you need four database tables as follows:
students (student_id, student_name, etc.)
courses (course_id, course_name, etc.)
students_courses (student_id, course_id)
attendance (student_id, course_id, dater)
A fifth table may also be needed to define the dates of courses, but you may also be able to build this array programmatically by using PHP's robust date functions, which can give you, for instance, all the Tuesdays and Thursdays between a start date and end date.
The students_courses table simply keeps track of which students are taking which courses, so it has just two columns for the primary keys of both of the main tables. The attendance table is similar, but it also includes a date field. The following view of the attendance table demonstrates this:
So if David's solution does cover your needs, consider yourself lucky, because this could quickly grow from a beginner-appropriate project to a moderately advanced one. -
Hi every one
Can any one help me out, How to Update a Row using ADF.
Thanks in advanceIn addition to Clear to my question
By Using ADF BC How can I update a record in a database.
I have VO and EO associated with a table.
How can I update a record using ADF BC
Message was edited by:
user616296 -
Update all rows in a table which has 8-10 million rows take for ever
Hi All,
Greetings!
I have to update 8million rows on a table. Basically have to reset the batch_id with the current batch number. it contains 8-10 million rows and i have tried with bulk update and then also it takes long time. below is the table structure
sales_stg (it has composite key of product,upc and market)
=======
product_id
upc
market_id
batch_id
process_status
I have to update batch_id,process_status to current batch_id (a number) and process_status as zero. I have to update all the rows with these values for batch_id = 0.
I tried bulk update an it takes more than 2hrs to do. (I limit the update to 1000).
Any help in this regard.
Naveen.The fastest way will probably be to not use a select loop but a direct update like in William's example. The main downside is if you do too many rows you risk filling up your rollback/undo; to keep things as simple as possible I wouldn't do batching except for this. Also, we did some insert timings a few years ago on 9iR1 and found that the performance curve on frequent commits started to level off after 4K rows (fewer commits were still better) so you could see how performance improves by performing fewer commits if that's an issue.
The other thing you could consider if you have the license is using the parallel query option. -
Updating a row of a table using rowid
Hi folks,
I am trying to update some rows in a table using rowid of the corresponding rows.Sometimes this updates wrong rows. This is because ORACLE by itself makes some statistics on the particular table using "Analyze table..." statement and it changes the order of the rowids. But if I delete the statistics,the updation works fine. Is there any way to update the correct rows and also to keep the statistics created by ORACLE? P.s: I am using ORACLE thin Driver to connect to Oracle 8.1.6
Thanks,
Karthi.First make it clear: analyze table command never changes ROWIDs. Actually, the ROWID of a row never changes untill it's deleted from its table. So make sure if you are using the correct ROWID.
Thnx -
Updating multiple rows in a table in ADF
Hi
How do we update multiple rows in a table.
Onclicking a update button the changed rows must be updated.Hi Prince,
currently I am selecting one row from the table and rendering a region at the top of the table and capturing the user entered data with the following code:
ViewObjectVOImpl vo = getViewObjectVO1();
Row CurrentRow = vo.getCurrentRow();
//After this I perform the checks like user entered value is not null or check input as per business logic.
if(CurrentRow.getAttribute("attributeName") ==null){
//Add what message you want to display
//Add other business logic.
After making all the checks, i commit it.
getOADBTransaction().commit();
Now in my new page I am capturing the user input in the table itself like an excel sheet. Suppose there are ten rows in my advanced table on my page, and each row has one editable field. I have one save button at the bottom of the table.
Now on clicking the save button I have to capture the user input, check whether there is any null value and if all the entered data is correct then only I should commit it.
Can you please let me know how we can accomplish that.
Regards
Hawker -
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
Maybe you are looking for
-
It seems I am facing a problem with feature can not be recognized for leaving action (PA40) Leaving is supposed to have MSN 20 with program generated 1PAPA/FEAT000MSN20 but my client has different program generated which is $P00003U. How do I change
-
JAEHYLEE (R11i AP) Payables Open Interface Import REJECT CODE:NO TERMS
Purpose Payables Open Interface Import REJECT CODE:NO TERMS Symptoms 'EDI' Source로 invoice를 import할때 Payables Open Interface Import program 이 error로 종료된다 정상적인 에러 No Terms로 출력이 되나 , 데이타 상에는 아무 이상이 없으며 debug log file 의 reject code는 NO TERMS INFO라고 출력된다
-
Can I use an Android phone without a data plan?
Please read all of this before responding. You will not be helping when you show a clear misunderstanding of my question. I do not need a data plan. Everywhere I go has Wi-Fi, and I am perfectly content to not have internet connectivity in the event
-
help me plzz
-
IPad 1: Failed sync then it turned itself off/can't switch back on
I tried to sync my iPad 1 in iTunes but got a message saying it wasn't possible (I've synced on this computer many times before and my iPad was working fine before). Then my iPad turned itself off. I've tried charging etc but can't turn it back on.