Update multiple infotype records
Hi experts,
Is there any FM which can be used to update/insert/delete multiple records at a time in PD infotypes? IF so, could you please provide me the name of the FM.
Thanks,
Rahul.
try to use: RH_PNNNN_MAINTAIN
Similar Messages
-
Creating / Updating Custom Infotype Records
Hello everbody,
We implement alot of custom HR infotypes in our system, both PA & HRP.
For the past several we have been using BDC (Batch-Input) recorded functions in order to update / create the records in our infotypes.
We're currently facing an upcoming ECC upgrade , and I would like to lead a change that will eventually lead to us using generic SAP supplied functions.
I've researched a few functions that might do the trick:
RH_INSERT_INFTY:
This one is giving me an SY-SUBRC 2 error code - Insert error, I tried to select a current record and insert it as different objid but this doesnt work.
HR_INFOTYPE_OPERATION:
I've read of several people that recommended using this function, but it is not released by SAP and I couldnt get it to work as well.
BAPI_HRMASTER_SAVE_REPL_MULT:
This one seems to work for sap infotypes but I dont think it suits custom infotypes.
What is the "official" way of doing such operations?
thanks in advance,
Eli.Hello Dilak,
Im currently trying to insert a new infotype record of infotype HRP9226.
First I call function RH_GET_NEXT_NUMBER to get an objid.
then I fill an HRP9226 line.
after this i call the function:
call function 'RH_INSERT_INFTY'
exporting
FCODE = 'INSE'
vtask = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = ' '
PPPAR_IMP =
OLD_TABNR = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
tables
innnn = hrp9226_line
ILFCODE =
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
I'm getting an "Error_During_Insert" and Im out of options regarding what I can possibly do. -
Update Multiple DB records in one table with one form
I am developing an onine proofing system that will display a
number of images, and then allow the customer to approve each
image, as well as provide comments.
I currently have a table setup with the various elements (an
image that dynamically gets its name, details about the image, and
the neccessary form fields).
See This
Image for the layout
I would then apply a repeat region (the number of signs would
vary), and like to update all the records with the customer's
comments and approval with one form. How is this done? I have
downloaded a trial of the developers toolkit, but the documentation
is horrible. I would be willing to buy an extension that will allow
this, if one exists.I found an extension that did this in about two minutes:
http://www.webassist.com/professional/products/productdetails.asp?PID=117
Excellent software, highly recommended. Easy to figure out,
and got this "problem" resolved fast. -
Hi,
We have a custom infotype which updates many other infotypes the code was written for PA30. We now for various reasons (ESS etc.) have to migrate the code and make the code decoupled.
I have read SAPHELP -> [Developing an Infotype in Personnel Administration -> ...Modify Existing Records|http://help.sap.com/erp2005_ehp_03/helpdata/EN/43/a503b963161bbfe10000000a1553f7/frameset.htm]
and fully understand how to do this through containers - even have a good example with itype 0045 (CL_HRPA_INFTY_0045) which updates itype 0078.
To achieve the above the attribue a_masterdata_buffer has to be instantiated. The condition for this is if Legacy_Mode = false.(CL_HRPA_MASTERDATA_FACTORY=>Delayed_constructer( ) instantiates a_masterdata_buffer)
The only way i can see this happening is if Concurrent Empoyment is activated.
CALL METHOD cl_hrce_masterswitches=>check_released is true (note 520965)
and the following entries are activate in table T77S0
CCURE MAINS the master switch
CCURE GLOPY payroll of global employees
CCURE GLEMP management of global employees
Is there another way? Can containers be used another way?
if not
What is the implication of turning on concurrent employment - given we dont want to use any of the features?
cheers
JSPHi Ian,
Sorry to ask using your thread..But, were you able to answer your question? I'm having the same issues. I plan on updating infotype 2003 (SAP_PT) and 0007 (SAP_PA). I need to update either one of them but not both and I'm getting error in HCM Process and forms.
Thanks! -
Creating/Updating multiple customer records via DEBMAS06
Hi all,
I have used DEBMAS06 for inbound processing of customer master records in SAP. My problem is legacy is providing multiple rows of data (multiple customer) in one single file.
Segment type E1KNA1M shows minimum & maximum number of segments in sequence as 1. Does that mean we cannot create multiple customers through one single call of the IDOC from XI?
We are using XI as middleware.
Please respond. I will reward aptly.
Thanks,
Bhaskar Pal.Damian,
you can update mutiple records in one statement just make the occurance to unbounded in your data type declartion for JDBC reciver . -
Update multiple infotypes for an employee
I have a requirement to update some fields in various PA infotypes like 0002, 0006, 0008, 0015, 0021 and a few custom PA infotypes (9xxx) for a given set of employees.
Is there any method by which I would be able to update the required fields of all the above listed infotypes for an employee in one go? Is it possible to update all the infotypes of all the given set of employees in one go?
Please let me know the FM that could be used to meet the requirement. An example would also be helpful.
Thanks,
JitenPlease check if there is already personnel actions defined with all the infotypes you are trying to update. If you have them, then you can use HR_INFOTYPE_OPERATION or HR_MANTAIN_MASTERDATA very easily with one single call. For that please refer the logic of PA48 transaction, simple one.
If the personnel action is not defined, then you need to call the FM HR_INFOTYPE_OPERATION separately for each infotype. Or HR_MAINTAIN_MASTERDATA at once for all of them.
From the list of standard infotypes mentioned, only IT0008 is having repetitive structure, handle it as a special case else others looks very similar.
Note : I don't see IT0000 mentioned in the list, hence i presume that there are no personnel actions defined for this set. But you can get it confirmed from your functional folks.
Regards
Ranganath -
'HR_INFOTYPE_OPERATION' MOD is not updating my infotype
Hi all,
I have a custom field called ZXXXX in both 2010 and 0015, I'm trying to clear it up if it's populated and update certain infotype record for the particular employee.
but I was able to clear ZXXXX in infotype 0015 but not 2010, I'm using the same code but not understand why it works for infotype 0015 but not 2010. any thought?
Below is the code, thanks all!
DATA l_return1 TYPE bapiret1.
DATA l_return2 TYPE bapiret1.
START-OF-SELECTION.
GET PERNR.
RP-PROVIDE-FROM-LAST P0015 SPACE PNPBEGDA PNPENDDA.
RP-PROVIDE-FROM-LAST P2010 SPACE PNPBEGDA PNPENDDA.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = PERNR-PERNR.
LOOP AT P2010 WHERE ZXXXX IS NOT INITIAL AND pernr = pernr-pernr.
CLEAR P2010-ZXXXX.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '2010'
NUMBER = P2010-PERNR
SUBTYPE = P2010-SUBTY
OBJECTID = P2010-OBJPS
RECORDNUMBER = P2010-SEQNR
LOCKINDICATOR = P2010-SPRPS
VALIDITYEND = P2010-ENDDA
VALIDITYBEGIN = P2010-BEGDA
* RECORDNUMBER =
RECORD = P2010
OPERATION = 'MOD'
* TCLAS = 'A'
* DIALOG_MODE = '0'
* NOCOMMIT =
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
RETURN = L_RETURN1
* KEY =
ENDLOOP.
LOOP AT P0015 WHERE ZXXXX IS NOT INITIAL AND pernr = pernr-pernr.
CLEAR P0015-ZXXXX.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0015'
NUMBER = P0015-PERNR
SUBTYPE = P0015-SUBTY
OBJECTID = P0015-OBJPS
RECORDNUMBER = P0015-SEQNR
LOCKINDICATOR = P0015-SPRPS
VALIDITYEND = P0015-ENDDA
VALIDITYBEGIN = P0015-BEGDA
* RECORDNUMBER =
RECORD = P0015
OPERATION = 'MOD'
* TCLAS = 'A'
* DIALOG_MODE = '0'
* NOCOMMIT =
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
RETURN = L_RETURN2
* KEY =
ENDLOOP.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = PERNR-PERNR.
END-OF-SELECTION.Hi Ben,
Let's forget about using FM 'HR_INFOTYPE_OPERATION' for the moment for IT2010 and try to implement this another way - please use the code below for the IT2010 change only.
DATA:
lif_msg_handler TYPE REF TO if_hrpa_message_handler,
lo_msg_handler TYPE REF TO cl_hrpa_message_list,
lv_ok TYPE boole_d,
ls_old_2010 TYPE pskey,
ls_new_2010 TYPE P2010.
* instantiate the message handler object
CREATE OBJECT lo_msg_handler.
* assign a reference to a rereference variable using the CAST operation
lif_msg_handler ?= lo_msg_handler.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = PERNR-PERNR.
LOOP AT P2010 WHERE ZXXXX IS NOT INITIAL.
"AND pernr = pernr-pernr. "<=== you don't need this AND condition as you are using LDB already
ls_old_2010 = p2010-pskey.
ls_new_2010 = P2010.
ls_new_2010-aedtm = sy-datum. "<===== so that record history is correctly maintained
ls_new_2010-uname = sy-uname. "<===== so that record history is correctly maintained
CLEAR ls_new_2010-ZXXXX.
* transfer the infotype record to the infotype buffer first
CALL FUNCTION 'HR_ECM_MODIFY_INFOTYPE'
EXPORTING
PNNNN = ls_new_2010 "<======= New/Modfied record
* text_tab =
* modify_text =
OLD_PSKEY = ls_old_2010 "<======== Old/Existing record
* no_auth_check =
message_handler = lif_msg_handler
IMPORTING
is_ok = lv_ok.
* process forward only if the transfer to buffer was successful
* - if unsuccessful...
IF lv_ok IS INITIAL.
* "<==== Handle your exceptions here.....and CONTINUE processing the next row in the current loop
ELSE.
* - if successful...
* now flush to transfer from infotype buffer to SAP database
CALL FUNCTION 'HR_ECM_FLUSH_INFOTYPE'
EXPORTING
* NOCOMMIT = 'X'
message_handler = lif_msg_handler
IMPORTING
is_ok = lv_ok.
ENDIF.
ENDLOOP.
* unlock the employee - processing now complete
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = PERNR-PERNR.
I'm confident that this will solve your problem - please let me know if it did not.
Cheers,
Sougata. -
I want to update multiple record in database which is based on condition
hi all,
I am using Jdev 11.1.2.1.0
I have one table named(Pay_apply_det) in this table i want to update one column named(Hierarchy) every time and according to change i want to update or i want to maintain my log table named(pay_apply_appr).It based on level wise approval when the lowest person approve the record show on next level but if the second
level person back it will be show only previous level hierarchy.And when the final approval happen the Posting_tag column of pay_apply_det will be updated too with hierarchy column.
i have drag pay_apply_det's data control as a table in my .jsf page and add one column approve status in UI .in the approve status i used radio group which return A for approve B for back R for reject through value binding i make it get or set method in it baking bean.
in backing bean class i have written code
public void approveMethod(ActionEvent actionEvent) {
ViewObject v9=new UtilClass().getView("PayApplyDetView1Iterator");
int h5=0;
Row rw9= v9.getCurrentRow();
String x=(String) rw9.getAttribute("RemarkNew1");
System.out.println(x);
String z=getR2();
System.out.println(z);
if(( z.equals("R") || z.equals("B") )&& x==null)
FacesMessage fm1 = new FacesMessage("Plz Insert Remark Feild");
fm1.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext context1 = FacesContext.getCurrentInstance();
context1.addMessage(null, fm1);
else{
ADFContext.getCurrent().getSessionScope().put("Radio",getR2().toString());
String LogValue=(String)ADFContext.getCurrent().getSessionScope().get("logid");
ViewObject voH=new UtilClass().getView("PayEmpTaskDeptView1Iterator");
voH.setWhereClause("task_cd='449' and subtask_cd='01' and empcd='"+LogValue+"'");
voH.executeQuery();
Row row1= voH.first();
int h1=(Integer)row1.getAttribute("Hierarchy");
System.out.println("Login Person Hierarchy on save button press.."+h1);
ViewObject vo9=new UtilClass().getView("PayApplyDetView1Iterator");
Row row9= vo9.getCurrentRow();
if(getR2().equals("A")&& h1!=1)
row9.setAttribute ("ApprHier",h1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if(getR2().equals("B") ) {
ViewObject voO=new UtilClass().getView("LoHierViewObj1Iterator");
voO.setNamedWhereClauseParam("QHVO", LogValue);
Row rowO = voO.first();
h5=(Integer)rowO.getAttribute("LPrehier");
System.out.println("Back lower hier..."+h5);
row9.setAttribute ("ApprHier",h5);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if((h1==1) &&(getR2().equals("A")) )
row9.setAttribute ("PostingTag","Y");
row9. setAttribute ("ApprHier", h1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
else if(getR2().equals("R"))
row9.setAttribute ("ApprHier",-1);
row9.setAttribute("IsClaimed","N");
row9.setAttribute("ClaimedBy",null);
row9.setAttribute("ClaimedOn", null);
BindingContext BC=BindingContext.getCurrent();
BindingContainer ac=BC.getCurrentBindingsEntry();
OperationBinding ob=ac.getOperationBinding("Commit");
ob.execute();
vo9.executeQuery();
FacesMessage fm = new FacesMessage("Your Data Successfully Commited..");
fm.setSeverity(FacesMessage.SEVERITY_INFO);
FacesContext context = FacesContext.getCurrentInstance();
context.addMessage(null, fm);
}here i put my approve status radio value in session variable because i also want to update my pay_apply_appr table which code i written in pay_apply_det IMPL class.
Every thing is running well when i update single record but when i want to update multiple record then my current row only updated in pay_apply_det but log table( pay_apply_appr) created for all record.
so is there any solution plz help me.
thanks
RAFATHi Rafat,
If you are able to insert into, all you need to do is iterate through the rows. For this , before the first IF condition
if(getR2().equals("A")&& h1!=1)Get the row count using int numRows =vo9.getRowCount(); , and then write it before the IF condition
if (int i=0;i<numRows;i++} After
row9.setAttribute("ClaimedOn", null);
}write vo9.next(); to iterate to next row,
Hope this will work.
Nigel. -
How to update multiple records in Oracle ?
Hi Guys,
<b>I have to update multiple records from a file into Oracle Table...</b>
I can successfully insert the multiple records into the table but can't update the multiple records into the table.
when i am using UPDATE_INSERT only my first record of the file is getting updated in th e table..
Please share your views with me.
Regards,I solved it by making changes in the occurrence parameter of data type ...:-)
-
Performance issue while updating the custom infotype records
Hi All
i have the info type with 80,000 records my requirement is to change the infotype wage type value to the certain hard coded values .
after populating the final internal table , in loop i am passing the records and updating the info type by using the hr_infotype_operation function module
i have done the coding like bellow .
loop at lt_infotype assigning < x>
at new pernr.
bapi_employee_enquee
endat.
hr_infotype_operation
at end of pernr .
bapi_employee_dequee.
endat.
end loop.
but it is taking nearly 15 hours to update all the records .please suggest me better solution for reducing the execution time .
Thanks & Regards ,
pramodh.mThe delay problem can be solved with HR_INFOTYPE_OPERATION by using it with another FM i.e. HR_PSBUFFER_INITIALIZE the delay happens because of buffer problem. Use HR_PSBUFFER_INITIALIZE inside the loop just before you call HR_INFOTYPE_OPERATION and you wont see that much delay.
-
Update Multiple records using NW CE WebDyn Pro 7.2 interface ITEMDETAILS
We are trying to use SAP Netweaver CE 7.2 and NetWeaver Design Studio 7.2 with the Web Dynpro application interfaces configured to connect to our MDM 7.1 SP06 repositories to develop web screens that allow our end users the ability to maintain MDM repository data without the use of DataManager.
Our first application was to be a simple one to show the business the benefit of SAP Netweaver. Itu2019s very easy to use the interfaces for SEARCH, RESULTSET, ITEMDETAILS, MATCH and MERGE if you plan to maintain one record at a time. We would like to update many records at the same time.
Using the configuration described previously, I find that I am able to select multiple records at one time using the RESULTSET interface and the Context folder of u201CSelectedRecordsu201D but I am not able to pass multiple records at one time to the context u201CIODatau201D used by the ITEMDETAILS interface and allow my end users to see and update multiple records at one time.
If I can pass multiple records from RESULTSET to ITEMDETAILS for display and update would you please provide me with an example of how I would do this in NetWeaver Design Studio for NW CE 7.2..
If I can NOT pass multiple records from RESULTSET to ITEMDETAILS for display and update, Would I then have to write my own wrapper application to read multiple records selected using the RESULTSET interface and the develop my own UPDATE view to display and update more than one record at a time. This would be time consuming since I would also have to write my own back out procedures and validation of update procedures that already happen within ITEMDETAILS. Do you happen to have any CE application examples that show how this is done for a NW CE MDM repository that I can see? The current documentation u201CHow to Build Web Applications Using MDM Web Dynpro Components. pdfu201D falls short in the area of updating multiple records.
Thank you in AdvanceBugs aside, if it's VERY noisy, that might just be the out-of-sync problem (something I'm very familiar with now).
Search the forum for "aggregate sync" and you should get some clues, if this is indeed the problem.
Short of it is, you need to sync the two devices together. Easiest way seems to be to connect the two devices via S/PDIF and set Clock Source to S/PDIF for the "slave" device (set in Audio Midi).
You can also just set the Clock Source as the "master" device in the drop down, bypassing the need for the S/PDIF cable altogether, but I haven't tried this myself.
Macbook Pro CD / iMac C2D Mac OS X (10.4.8) -
Updating multiple records from single form (ASP)
I have a nested repeat region.
I have created in the parent, a form with 3 fields and an update button.
the child records all have multiple columns, 3 of which correspond to the parent.
Athe parent is bound to the child records by the shipmentID
I need to be able to update all child records from the form in the parent.
The case is this.
The child records are orders with shipdates and frequencies
The parent contains a form with fields for shipdate and frequency
The administrator needs to change the shipdate and/or frequency for all child records.
(The child records are forms as well--but that's another issue that works fine)
Shipment ID
Date Field
Freq Field
UPDATE Button
ShipmentID
Record 1
Data case1
Date
ShipmentID
Record 2
Data case 2
Date
I am doing this in classic asp with an SQL database.
So how do I get the form to update all record
[Subject title edited by moderator to make clear ASP involved]Hi,
This is one of those questions that would require far more explanation that is reasonable to expect in a forum. You should do a little poking around in the nearest Barnes & Nobles. About a half hour in a chare with a good ASP book and vanilla latte should have you on the right track.
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF -
Hi,
Im having issues with updating multiple records.
This query selects users in a specific unit that are inactive (ui.nf_statusid = 2) and compare it newsmail_recipient table
select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0
and ui.ip_userid in (select user_id
from newsmail_recipient
where user_id = ui.ip_userid
and nf_listid = liste
and nf_statusid = 1;the second script will set the users to inactive in newsmail_recipient that are inactive in the userinfo table.
update newsmail_recipient
set nf_statusid = 2
, d_modified = sysdate
where user_id = ui.ip_userid;I would like to know if its possible to merge this query. I know its possible for insert but havent tried update before.
This is how i do it, but its not working.
case when (select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0
and ui.ip_userid in (select user_id
from newsmail_recipient
where user_id = ui.ip_userid
and nf_listid = liste
and nf_statusid = 1)
then update newsmail_recipient
set nf_statusid = 2
, d_modified = sysdate
where user_id = ui.ip_userid;
end;thanks guys...
regards,
jTable structure:
newsmail_recipient:
IP_RECIPIENTID NUMBER(8,0)
NF_LISTID NUMBER(8,0)
NF_STATUSID NUMBER(8,0)
D_CREATED DATE
D_MODIFIED DATE
C_NAME VARCHAR2(100 CHAR)
C_EMAIL VARCHAR2(256 CHAR)
USER_ID NUMBER(10,0)
NEWSMAIL_ID NUMBER(10,0)userinfo:
IP_USERID NUMBER(10,0)
NF_STATUSID NUMBER(10,0)
N_INTERNAL NUMBER(1,0)@jeenesh:
I tried your query but i get this error:
Error(510,30): PL/SQL: ORA-00904: "UI"."IP_USERID": invalid identifierJust wondering why, but ui.ip_userid is declared.
Actually, this is a package script.
procedure edit_recipient_to_newsmaillist(unit_id IN NUMBER)
as
liste number;
--Finner alle toppfoldere til de lukkede brukergruppene som uniten har tilgang til
cursor closed_user_group is
select element_id
from admin_unit_content_access
where group_id = 97
and accesstype_classification_id in( select classification_id
from dynamic_field_value
where key = 'closed_user_group'
and dynamic_field_grouping_id = (select dynamic_field_grouping_id
from unit
where ip_unitid = unit_id))
and element_type = 'f';
begin
--Finner hvilken liste folderen tilh�rer
for u in closed_user_group loop
if (u.element_id = 39464) then
liste := 2017; --AMG
elsif (u.element_id = 36664) then
liste := 2018; --Das wird meiner
elsif (u.element_id = 34011) then
liste := 2019; --Junge sterne
elsif (u.element_id = 68359) then
liste := 2020; --Service vorteilskarte
elsif (u.element_id = 1030675) then
liste := 2021; --TGC
elsif (u.element_id = 41741) then
liste := 2022; --Truckworks
elsif (u.element_id = 118659) then
liste := 2481; --CRM
elsif (u.element_id = 122982) then
liste := 2479; --Vitoecell
else
liste := 2037; --Sneak Drive
end if;
--oppdater til brukerene i den uniten i listen
merge into newsmail_recipient nm
using
(select *
from roleuser ru, unit u, userinfo ui
where u.ip_unitid = ru.nf_unitid
and u.ip_unitid = unit_id
and ui.ip_userid = ru.nf_userid
and ui.nf_statusid = 2
and n_internal = 0)
on (nm.user_id = ui.ip_userid)
when matched then
update set nm.nf_statusid = 2,
nm.d_modified = sysdate;
liste := 0;
end loop;
end edit_recipient_to_newsmaillist;
-
Updating multiple records without having to use a cursor
I am trying to update multiple records in a table.
Eg
Table A -20 records
Table B -10 records.
Would like to update Table B with the updated records in Table A for those records which the primary key matches
and I dont want to use cursors. Is this possible??
Thanx in Advance.Please refer to the test below, it should give you the general idea,SQL> desc tableA;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> desc tableB;
Name Null? Type
SEQ NUMBER
INV VARCHAR2(20)
AMT NUMBER(12,2)
AMT2 NUMBER(12,2)
SQL> select count(*) from tableA;
COUNT(*)
6
SQL> select count(*) from tableB;
COUNT(*)
12
SQL> UPDATE tableB b
2 SET b.inv = NVL((SELECT a.inv from tableA a WHERE a.seq = b.seq), b.inv),
3 b.amt = NVL((SELECT a.amt from tableA a WHERE a.seq = b.seq), b.amt),
4 b.amt2 = NVL((SELECT a.amt2 from tableA a WHERE a.seq = b.seq), b.amt2)
5 /
12 rows updated.
*** Please note that this is DIFFERENT from what you asked, here tableB is having more rows, which is fine. We **may not be** able update tableA in this example by reversing the table names, because the join may bring more rows than UPDATE statement needs. ***Thx,
Sri -
Programmatic updating multiple records of a table in ADF
Hi,
I am using Jdeveloper : 10g 10.1.3.3
Problem : I need to update multiple records in DB using ADF feature.
The senario is like user is shown records of item consisting of item name, item code, category code, price etc. then user clicks "change category code" link availabe against each record. In next page user is shown current code and provided a text box to enter new code. Once i get this in my bean i need to update all records as:
update item_info set category_code = :new_code where category_code = :current_code. Means to udate category code in all the records where category_code is :current_code.
I have Entity and View Object for this table.
How do i update multiple records using created view which is entity based?
Have A Nice Time!
Regards,
KevinIn ADF you don't use update statement directly. This is done by the framework.
You have to search for the records which match your condition category_code = :current_code using your VO based on the entity.
Then iterate over the result set and change each row to your need setCategoryCode(newCode);
When you commit the changes they are persist them in the DB.
To see the changes in the UI you have to update the display using PPR or execute the query again.
Timo
Maybe you are looking for
-
Logical System already use in BPM
Hi We have created two BPMs and one of them the Logical system is configured to 0071ME36. For the second BPM we tried to use the same logical system but we get an error in the XI "Logical System 0071ME36 is already use in the BPM_6547_. That`s means
-
dear experts, I have tried to find discussions on this already but after wadding through a few pages, I thought I could be helped faster if I threaded this topic. I have been able to successfully log into an oracle db and was looking to export about
-
Include project name in search results? RH9 or 10
Hi all, Our projects are organized with a master project for the various clients, that includes a number of application projects such as Word 2010, Adobe Acrobat, etc. When a user runs a search in the published project, they sometimes have difficulty
-
Hi Im new to Xcode and app development. I believe If statements is kind of what i need, but happy to stand corrected if there is a better way. What i want is if a user inputs a figure between 1-10 in a text box a letter A appears in a Label but if th
-
Do I need to have data before performing Drag and Drop????
I have gotten drag and drop working with Swing in JDK 1.4b2 using "URL-based" files instead of operating system native files. The way this was accomplished by creating a wrapper class that sub-classed File and would download the contents of the URL t