ENQUEUE DEQUEUE FM's for updating VBAP table record
HI all,
I am updating records of vbap table. so i want to lock those records while am updatin them .
which FM's should i use to update them ?
Thanks for ur replies Himanshu and Sayed,
I have already used these FM's. But i didnt feel like it is working. I went in debugging mode and executed ENQUEUE FM and the i went in VA02 transaction and for the same sales order i tried updaing the quantity and it is updated in the table.
How come this has happened even though i have locked the table with the help of FM. ?
I have used the FM something like this :
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
MODE_RSTABLE = 'E'
TABNAME = 'VBAP'
VARKEY = 'VBELN'
X_TABNAME = ' '
X_VARKEY = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF sy-subrc EQ 0.
UPDATE vbap FROM TABLE li_vbap.
CALL DEQUEUE.
ENDIF.
Similar Messages
-
API for updating pay_people_groups table..
Hi,
Is there any API for updating pay_people_groups table. I know we can do it using hr_assignment_api.update_emp_asg_criteria but this API updates the assignement with the new pay_group_id. I want to know is there is any API which can only update the pay_people_groups and not the assignment.
Regards,
Shabana.Hi,
Technically you want update values for people group. If you remember At the time of definition of people group you created value set and attached people group flex field.
People group are created on the basis of combination of segments. So you have to update only values not people group.
I doubt oracle provides API to update key flex field.
You may get API to update values try out that option.
Hope this helps.
Sathish -
XD02 transaction to change the customer data for updating KNA1 table?
Hi all,
How can we use XD02 transaction to change the customer data for updating KNA1 table?
Give the steps.
Thanks in advance
rkHi KR,
Why don't u use BDC to run XD02.
With Regards,
Zafar Ali -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
Performance manager sql action rule for updating metric table
Hi, I need to update metric stop_date using a sql action rule (Performance Manager execute sql action rule). My problem is I can't update stop_date into the PM Repository Database. Sql action database connection is properly set, but when I set sql for executing update in table ci_probe and I schedule the rule the system doesn't seem to connect to Database (the rule run successfully, but the table ci_probe is not updated). I don't understand if the problem is database connection or wrong sql code.
Can Anyone help me with suggestions or sql action rule samples?
Thanks
Luigi
Edited by: Luigi Oliva on Jun 13, 2008 1:32 PMHi It's working, Problem was in repeat_interval it's working now,
Thanks,
I changed
repeat_interval => 'FREQ=DAILY;BYSECOND=10',to
repeat_interval => 'FREQ=SECONDLY;BYSECOND=10',Thanks,
Edited by: NSK2KSN on Jul 26, 2010 11:14 AM -
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. -
FOR UPDATE OF table.field
Why does the following not work
create table division (code varchar2(2) primary key, div_desc varchar2(20));
insert into division values ('01', 'Ninja assassins');
insert into division values ('02', 'Working for the man');
create table employees (tk number, first_name varchar2(10), last_name varchar2(10), code varchar2(2) references division(code));
insert into employees values (1, 'Chuck', 'Smith', '01');
insert into employees values (2, 'John', 'Smith', '02');
DECLARE
CURSOR my_csr IS
Select e.tk, e.first_name, e.last_name
From employees e, division d
Where e.code = d.code
and e.code = '01'
and e.last_name = 'Smith'
For update;
cnt_updated NUMBER;
BEGIN
cnt_updated := 0;
FOR my_row IN my_csr
LOOP
Update employees
Set last_name = 'Forbes'
Where current of my_csr;
cnt_updated := cnt_updated + SQL%ROWCOUNT;
dbms_output.put_line('You updated '||cnt_updated||' records');
END LOOP;
END;but just adding to the "for update" clause allows for an update?
DECLARE
CURSOR my_csr IS
Select e.tk, e.first_name, e.last_name
From employees e, division d
Where e.code = d.code
and e.code = '01'
and e.last_name = 'Smith'
For update *of e.tk*;We found this out recently, and fellow Developers are asking "Why?". Is there a documented reason, or is that just how it is?
Thanks,
--=ChuckIt is not about locking it is how oracle translate the "where current". it is a simple rowid.
did a little trace, and look what I got from 10046 trace file:
For the update without the "update of", look at the 0 at the cr in the plan,
Oracle already knows that this update will not do anything:
PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88904356722 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
END OF STMT
PARSE #6:c=0,e=258,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904356717
BINDS #6:
Bind#0
oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
kxsbbbfp=0c2ef090 bln=3950 avl=00 flg=05
EXEC #6:c=0,e=1108,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=88904357955
STAT #6 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us)'
STAT #6 id=2 cnt=0 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=0 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'for the update with the "update of", look at the 1 at the cr in the plan:
PARSING IN CURSOR #6 len=62 dep=1 uid=82 oct=6 lid=82 tim=88913977309 hv=1877266405 ad='1a9b0404' sqlid='5a5zpz5ry9mz5'
UPDATE EMPLOYEES_T SET LAST_NAME = 'Forbes' WHERE ROWID = :B1
END OF STMT
PARSE #6:c=0,e=87,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=88913977304
BINDS #6:
Bind#0
oacdty=208 mxl=3950(3950) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=206001 frm=00 csi=00 siz=3952 off=0
kxsbbbfp=09f3abfc bln=3950 avl=13 flg=05
value=
Dump of memory from 0x09F3ABFC to 0x09F3AC09
9F3ABF0 22010001 [..."]
9F3AC00 000400B6 00780401 00000000 [......x.....]
EXEC #6:c=0,e=379,p=0,cr=1,cu=1,mis=0,r=1,dep=1,og=1,tim=88913977802
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='UPDATE EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us)'
STAT #6 id=2 cnt=1 pid=1 pos=1 obj=74422 op='TABLE ACCESS BY USER ROWID EMPLOYEES_T (cr=1 pr=0 pw=0 time=0 us cost=1 size=29 card=1)'Also notice that in the update version with the "update of" we can see dump of memory.
There are some binds type that oracle won't show directly in the dump (e.g. timestamp, rowid, etc)
For future, more hex oriented readers here is the rowid from table:
SQL> select rowid from employees_t;
ROWID
AAASK2AAEAAAQR4AAAIf, somebody out there, can show me a way to read the memory dump back into the real rowid,
I will be very happy.
Amiel -
Add a Select List to a Report, for Updating a table.
I am working on Apex 3.0. I had to allow the Report could update a table. I added two checkbox to the report, and now I should add a Select List. I've tried a lot of ways but I don't know how can I pass the value selected, related to the ID of the row. I've tried with a JavaScript but I couldn't. A process should update the row on the DB when the user change the value on the select list. There is a save button that perform the process. How I could pass the ID of the row and the value to a PL/SQL process?
Many Thanks for your suggestions.
SELECT PFA.FOCUS_AREA_ID
,FOCUS_AREA_NAME,
apex_item.checkbox(1, FA.FOCUS_AREA_ID, DECODE(PFA.FOCUS_AREA_ID, null, ' ','checked="checked" ') ||
'id="chk'||rownum||'"'|| ' onclick="checking(this)" ') as Focus_AREA_CHK,
APEX_ITEM.SELECT_LIST(
*5,*
PFA.FOCUS_TYPE,
*'DIS;DIS,ENG;ENG,EXP;EXP,TGT;TGT',*
*'id="sl_'||FA.FOCUS_AREA_ID||' " ',*
*'YES',*
NULL,
*'-Select-',*
*DECODE(PFA.FOCUS_AREA_ID, null, 'disabled="disabled" ','' ) || ' --onchange="selectedElement(this)" ',*
*'NO'*
*)* "Type"
FROM PROGRAM_FOCUS_AREAS PFA,
FOCUS_AREAS FA
WHERE
FA.FOCUS_AREA_ID = PFA.FOCUS_AREA_ID(+)
AND :P151_PROGRAM_ID = PFA.VS_PROGRAM_ID(+)**Deleted**
Edited by: user4498053 on Dec 27, 2011 11:24 AM -
Bapi for updation of table VBRP
Hi,
I have to Update the Field 'KONDM' in the table VBRP. Is there some BAPI available for updating VBRP or we can have to go with the direct Update to the table. I have to Update this field by a stand alone report program.
Thanks and regards,
Pankaj Bist.Might be use this Function module
CALL FUNCTION 'RV_INVOICE_ITEM_MAINTAIN'
EXPORTING
VBRP_I = VBRP
IMPORTING
VBRP_E = VBRP
TABLES
XKOMFK = XKOMFK
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBSS = XVBSS
XVBRK = XVBRK
XVBRP = XVBRP
XVBPA = XVBPA
XKOMV = XKOMV.
Matintain the value in the VBRP table & pass rest as is... u get the value using the FM RV_INVOICE_DOCUMENT_READ -
Resource configuration for updating multiple tables
Hi all,
My aim is to update multiple tables in Sun Identity Manager
I would like to know what is the resource to be configured for this
Could any one help me in solving this issue
Thanks in advance,
ShaliniI have used the Scripted JBDC resource as follows;
go to Resources > Configure Types and select Scripted JDBC > Save
at Resources, select resource Type Actions > New Resource
select Scripted JDBC from the drop down, this should start the wizard
the wizard will guide you with lots of questions.
The one problem we had is in the Action Scripts (second wizard page). we found the example scripts
at the webserver root /idm/sample/ScriptedJdbc/SimpleTable/beanshell
the above scripts had to be modified to the SQL required for the application, but it worked well with the example databases and codes that it is easily understood.
there are several examples of different table types here... there are lots of options, see the README iles for each type
hope this helps;
TG -
Import excel for update of table
Hello
I'd like to import data from an excel spreadsheet or CSV file. Is there a simple way to update the table with this data?
Can import handle one spreadsheet containing data from 2 tables of which one is to be updated.
Eg. column 2 in rows 1 to 4 contain the foreign key values. The remaining rows contain the data to be uploaded to the table (UPDATE no INSERT)
Thanks
CindyImport is a utility that imports files in Oracle's proprietary binary dump format. The tool you would be looking at for loading a CSV file is SQL*Loader.
SQL*Loader can handle logical records that span lines, but it does not allow you to update a subset of the existing data in a table. You could load the data into a staging table and UPDATE the master from the staging table, however.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Module pool - for updating Z table
Moderator message: please using a more meaningful subject. I've edited it for you this time.
Hi i have a reuire ment like this.
i want to update Z table, by using report program.report is having selection screen ti select data from Z table and to disply in a screen like SM30, i am displying in table control using screen.and i am updating Z table.
i want to display the selection screen data which ever i have given just above the table control which ever i am displaying now.
can any body help me out pls.
Regards
naiduHi palani thanks for reply.
i tried in this way already but the problem is we dont know how many values user will enter to define, suppose if user may enter 1000 entries in one selection field or beyond that also.
in this case again the problem.
and one more thing suppose i ahve selection screen like this
company code parameter mandatory
sales org. ranges
division ranges
KUNNR ranges
if suppose user entered only mandatory value, and KUNNR we need to display only those two in output, but here in module pool by using screen table if we disable the screen two blank lines will come.
ex
cmpany code 0001
KUNNR from 1000 TO 2000.
expected result for this is
cmpany code 0001
KUNNR from 1000 TO 2000.
i used scren-input for this but ididnt get,
could you please help me in this.
thanks and regards
naidu -
Adpatch 9239089 taking time for Updating Snapshot Tables
Hi,
I am upgrading Apps R12.1.1 to Apps R12.1.3 . Applying patch 9239089 as prerequisite of patch 9239090.
This patch is taking much time and Updating Snapshot Tables as below
No of records processed =205032 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:04:15
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:04:17
No of records processed =210033 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:06:37
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:06:38
No of records processed =215033 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:08:57
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:08:58
No of records processed =220034 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:11:17
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:11:18
No of records processed =225034 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:13:36
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:13:37
No of records processed =230035 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:15:56
Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:15:57
No of records processed =235035 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:18:16
Done Updating Snapshot Tables
Please see if there is any issue or how can avoid to updating snapshot tables.
Regards,
RajHi Raj,
I am using shared appl_top on NFS file system , and this patch is using the NFS file system . So this issue could be NFS file system.
when I am performing any write intensive operation on NFS file system it is taking huge time. adadmin utility is also taking muchtime to invoke.I also applied the same patch on a shared APPL_TOP but never had any performance issue.
So I need some oracle recommendation to use NFS file system or how performance can be tune of nfs file system.?Have you tried to maintain snapshot via adadmin before applying the patch and see how it behaves?
Oracle Applications Maintenance Utilities
http://www.oracle.com/technetwork/documentation/applications-167706.html
Thanks,
Hussein -
Procedure to update the table records
I have to write a procedure to update the existing records.
I have one staging table and one decode table.
staging table is obtained from a interface with cross join of two tables X1 and X2 and
lookup with DECODE table.
DECODE
ITEM_ID ITEM_CODE STORE_ID STORE_CODE
101 C 7 77
100 A
100 B
In this table there is relation between item_id and item_code AND
store_id and store_code. Items and stores have no relationship here. Simply we insert values of both side by side.
Initial STAGING table
SNO RNO SCODE RCODE DECODE_STATUS
101 8 C NP
101 6 C NP
101 7 C 77 P
100 8 A NP
100 6 A NP
100 7 A 77 P
100 8 B NP
100 6 B NP
100 7 B 77 P
Joins:
SNO=ITEM_ID
RNO=STORE_ID
Now I want to update this according to my new decode where NP record will be updated with their new RCODE values
DECODE table now is
ITEM_ID ITEM_CODE STORE_ID STORE_CODE
101 C 8 88
100 A 7 77
100 B 6 66
Now I need my staging table with RCODE values corresponing to DECODE table.
My expected STAGING table.
SNO RNO SCODE RCODE DECODE_STATUS
101 8 C 88 NP
101 6 C 66 NP
101 7 C 77 P
100 8 A 88 NP
100 6 A 66 NP
100 7 A 77 P
100 8 B 88 NP
100 6 B 66 NP
100 7 B 77 P
Please help me to do this ...I have tried with interface where I kept source and target table same staging table and used DECODE for lookup but I didnt get the expected result.Hi Chattar ,
It clearly seems that issue is with Primary keys.
As you have said about the decode table "In this table there is relation between item_id and item_code AND store_id and store_code. Items and stores have no relationship here. Simply we insert values of both side by side."
It seems your final update query should be like this :
update staging1 T
set (T.rcode, T.scode)
=
Select
(select store_code from decode where store_id = T.RNO ) ,
(SELECT ITEM_CODe from decode where ITEM_id = T.SNO)
from dual
) where T.decode_status = 'NP';
If what i have said is right , then you can implement the same using an interface too But first you should decide the Key columns on the target table.
Hope it solves the issue.
Edited by: user8427112 on Sep 22, 2012 6:48 AM -
Updation of table records having 5-6 primary key columns.
I have a table structure having 12 primary composite keys.I have created report + form on this table.My requirement is to update the table by using form items fields.I am taking help of url option on report attribute page of application to fetch data on form page when we click on edit link of report page.Now i am having two problems which are as follows:-
(i)I am unable to update data as requirement is to update 5 to 6 primary fields along with other non primary keys.I tried to create Pl/SQL process which will run update query but this process is not updating values.Is there any way that i could fetch data direct from database table in query rather then taking item values.Is there any other workaround?
(ii)One of the primary key column contains records which have ' , ' in them .For ex:- cluth,bearing.So when i get navigated to edit page i am only getting text displayed as clutch i.e. text before ',' is getting displayed in text field while comma and the text after this is not getting displayed in text field of form page.
Any solutions will be very helpful.
Thanks
AbhiHello Abhi,
>> I am unable to update data as requirement is to update 5 to 6 primary fields along with other non primary keys
APEX wizards support a composite PK with up to 2 segments only. For every other scenario, you’ll have to manually create your DML code.
If you have control over your data model, I would listen very carefully to Andre advices. Using a single segment PK is the best practice way. If you can’t add PK to your table, it seems that you’ll have to write your own DML code. The Object Browser option of creating a Package with methods on database table(s) can be a great help.
>> … I am taking help of url option … One of the primary key column contains records which have ' , ' in them …
Using the f?p notation, to pass a comma in an item value, you should enclose the characters with backslashes. For example,
\cluth,bearing\In your case, it should be the item/column notation.
http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/concept.htm#BCEDJBEH
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More
Maybe you are looking for
-
Cucm upgraded from 8.6 to 9.1 and now want to add uri dialing
Environment: Upgraded 8.6.2 to 9.1 AD Sync users and authentication Upgrade went well I thought that with the upgrade the existing AD integration would bring over the Directory URI or give me the option to choose the Directory URI choices from the ex
-
Well, I created a new Apple ID and I put money on it, I wanted to sign into ICloud and it wouldn't let me sign in due to making too many Apple IDs created. The point for logging into the ICloud was to save my photos before I reset my phone. Is there
-
New skypename or new subscription?
Hi! During the last months I used scype only for private calls. Now I want to use it regularily for my business and therefore I want: 1) either change my skype-name to my companies name. 2) or create a new account. This way is a bit more complicated,
-
Sometime my workspace environment got freezed when i try to close the opened PDF form without completing it (without pressing submit button). See the attached screenshot. Is this related to flash player? scriting inside PDF or something else? Thanks,
-
Change the descripcion of a field standard table
Hi guys, I have an standard program type SAPMVXX, I need to change the description of a dynpro field for example akkp-MANDT have the follow description 'Mandatory' , I want to change it by 'It is an example mandt'. but not for all users so I can't ch