Lock for bsis table..
Hello,
this thread is divided into 2 queries that i have,
1 - is their any lock object for bsis table ?
2 - i want to update a field in both bseg and bsis table. is their any bapi or sum SAP function which updates the whole document or will i have to do it by updating the table manually..
thanks
shehryar
Hi,
Check this :
1.Locking table :
FM's : ENQUEUE_E_TABLE
DEQUEUE_E_TABLE
2) BAPI_ACC_DOCUMENT_POST Accounting: Posting
Regards
Appana
Similar Messages
-
How to set DDL lock for a table
OCI,how to set DDL lock for a table?
Oracle acquires a dictionary lock automatically on behalf of any DDL transaction requiring it. Users cannot explicitly request DDL locks. Only individual schema objects that are modified or referenced are locked during DDL operations. The whole data dictionary is never locked
DDL locks fall into three categories: exclusive DDL locks, share DDL locks, and breakable parse locks.
see this link
http://www.sc.ehu.es/siwebso/KZCC/Oracle_10g_Documentacion/server.101/b10743/consist.htm#i5281 -
Lock for PRPS table(CJ20N) project.
Hi
I am trying to LOCK the project(table PRPS) using OPEN FI Func module.
But its not possible.
Below is my observation.
using Below FM to lock
L_V_PSPID = PRPS-PSPHI
CALL FUNCTION 'ENQUEUE_EC_PROJS'
EXPORTING
MODE_PROJ_ENQ = L_V_ENQMODE "E
TYP = L_V_ENQTYPE "P
PSPID = L_V_PSPID " XXX-1234457 "project
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
When i execute in OPENFI, Lock record is created for XXX-1234457
But when i update using transaction CJ20N, new lock record is created
as XXX1234457(without hyphen) and lock is not done.
Which parameter should be used in PSPID?
Should i have to use PROJ-PSPID? or PRPS-PSPHI?
Regards
princeHi Prince,
CALL FUNCTION 'ENQUEUE_EC_PROJS'
EXPORTING
TYP = 'P'
PSPID = PROJ-PSPID
EXCEPTIONS
FOREIGN_LOCK = 01
SYSTEM_FAILURE = 02.
The above functional module works fine and in your code remove the mode you r passing and you need to pass PSPID values not psphi.
Regards,
S.C.K
Edited by: Chandrakumar S on Jan 12, 2012 2:49 PM
Edited by: Chandrakumar S on Jan 12, 2012 2:50 PM -
Performace Tuning for BSIS table
Hi All,
While selection of data from BSIS table , data is not comming in production server it is giving dump for time out.
So I have changed the code for peformance. I made a secondary idex ZCF and given field MANDT,BUKRS,HKONT,
GJAHR,BUDAT and MONAT.
And I wrote code like this.For HKONT I have the below criteria given by user.
SELECT bukrs hkont augdt augbl zuonr gjahr belnr
buzei budat xblnr blart monat shkzg dmbtr prctr
FROM bsis
INTO TABLE lt_bsis
WHERE bukrs IN s_bukrs
AND ( HKONT LIKE '0051%1' OR HKONT LIKE '0051%2' OR HKONT = '0022300010' )
AND gjahr = year
AND budat IN s_budat
AND monat = month
%_HINTS ORACLE 'INDEX("BSIS" "BSIS~ZCF")'.
Even then data have not fetchedd within 15 mints and give time out dum.
Can any body suggest me how can I write the code to reduce time.
Thanks,
RakeshHi,
We also received the same kiind of problem, i have used bsip table. and i did whatever i can do still iin production iit shows time out error. We tried everything. Then i made that program as Background Job using SM36. Then only we realised it tooks more than 12 hours to produce the output. After a long search we thought to make Index for that BSIP table, and we made that index using SE11. After we made the index properly , i tested again by scheduling backgroound job then we got that output in just 200 secs (3.4 Minutes). Note the difference.
It might be due to small problem only. You first check your index of BSIS table and create a one.. or else you schedule a job and see the output.. -
Select Data from BSIS table taking too long
Hi
I have to develop a report to give the details of Extended Withholding Tax (EWT) for a list of Expenses GL.
Each expense GL is linked to another Gl which is the EWT Tax GL Account. This is maintained in a Ztable.
I havae wirtten the following code. It takes a lot of time to extract a data.
This give me the GL i require
SELECT * FROM ZSECCO_GL_EWT INTO CORRESPONDING FIELDS OF TABLE IT_GL
WHERE BUKRS = P_BUKRS
AND WT_QSCOD = P_QSCOD.
Then I select only the distinct documents No, from BSIS table fro the hkonts in the above internal table
SELECT DISTINCT BUKRS GJAHR BELNR FROM BSIS INTO CORRESPONDING FIELDS OF
TABLE IT_BSIS_GL
FOR ALL ENTRIES IN IT_GL
WHERE BUKRS = P_BUKRS AND HKONT = IT_GL-HKONT AND GJAHR = P_GJAHR.
Here I once again select the document details based on the document No. from above internal table
This query takes a lot of time
SELECT * FROM BSIS INTO CORRESPONDING FIELDS OF TABLE IT_BSIS
FOR ALL ENTRIES IN IT_BSIS_GL
WHERE BUKRS = P_BUKRS AND GJAHR = P_GJAHR
AND BELNR = IT_BSIS_GL-BELNR.
Please HelpHi,
Check note 992803; it could be that there is insufficient or missing index for BSIS table.
Regards,
Eli -
Lock object for KONV table/Cluster table ??
Hi All,
Is it possible to set Lock/Enqueue cluster tables or in my case table:KONV (KNUMV field) ?.
OSS provided some programs without locks so was hoping if I could add before performing data manipulation.
Regards,
NeethHi Nameeth,
you can use generic lock object E_TABLE with function modules ENQUEUE_E_TABLE, DEQUEUE_E_TABLE for locking and unlocking with parameters table name and key field.
Regards,
Satya -
To find locks on the objects for the table-- urgent
hi all..
how to find which lock object is used for the table T001b...
i want to lock a record of the table t001b before righting the select query and then do some mofification and the unlock it again..
plz can any one tell me how to do this...
thnx
Message was edited by:
neha guptaHi Neha,
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
check this link for example.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
tables:vbak.
call function 'ENQUEUE_EZLOCK3'
exporting
mode_vbak = 'E'
mandt = sy-mandt
vbeln = vbak-vbeln
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 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.
Thanks,
Reward If helpful. -
Object lock for table T001B / view V_T001B (tcode OB52)
Hi,
The table T001B or view V_T001B is for Opening and Closing FI periods.
We have given the transaction to Business users who are located in various parts of the world.
During month end each user is trying to open the period for his company.
However when one user is using the transaction OB52 which updates the table T001B, the trasnaction gets locked for all the other users.
How can we avoid this occurence?
The idea is to enable the transaction/ table / view update by multiple users parallely.
Your inputs are highly appreciated.
Thanks,
NitishOB52 is just calling the maintenance view V_T001B. At first I thought that maybe it would be possible to call SM30 for this view and enter the conditions, but it doesn't allow to enter any... Very strange... Perhaps you could create a custom maintenance view, which would allow to maintain only selected records, not the whole table. Such view can then be "wrapped" in a small program that would require entering the selection criteria and could also have authorization check.
Additionally, it might be possible simply to run this as a monthly background job instead of having the users do it manually. -
Configuring profile parameter for a table lock object
Hi Experts-
I want to set the 'wait time' (_WAIT) parameter as a profile parameter for a table lock object.
I have created a lock object on a ZTable. I lock and unlock this object in exclusive non-cumulative mode through the enqueue and dequeue lock object function modules. These generated FMs are invoked via my custom function module.
My function module will run in the background as a scheduled task in R/3. I execute the Enqueue FM at the start of the FM and keep the table locked until the last step finishes in my FM and then I Dequeue it. I want to have the processing wait and retry the Enqueuring FM at set intervals in case the one run doesn't finish entirely and a new run of this same job kicks off.
Thank you,
- Vik.Set the wait parameter = 'X'. These means that if it encounters a lock, then it will wait a certain time for the lock to be released. This certain time is a system value set by your basis team. I don't imagine it being a very long time.
CALL FUNCTION 'ENQUEUE_EZPIPHYINVREF'
EXPORTING
MODE_ZPIPHYINVREF = 'E'
MANDT = SY-MANDT
_WAIT = 'X'.
Regards,
Rich Heilman -
To get Lock object for Standard Table
Hi all,
i want to update table FKK_GPSHAD,so i need corresponding lock object for this table.can any one sughgest me the solution for this.
Thanks in advance,...Hi,
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
check this link for example.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
tables:vbak.
call function 'ENQUEUE_EZLOCK3'
exporting
mode_vbak = 'E'
mandt = sy-mandt
vbeln = vbak-vbeln
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 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.
Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
1. enque_lockobject
1. deque_lockobject
before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
Lock objects:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Match Code Objects:
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
See this link:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
Check these links -
lock objects
Lock Objects
Lock Objects
Please reward points if useful.
Regards
Rose -
Function module to hold and release lock on MARD table entry
Hi Gurus,
Can you please tell me Function module to HOLD lock on MARD table and the Function Module to release lock on MARD table entry.
Thanks and Regards,
SudiptoLook via SE11 lock objects, use F4 for tables MAR*, the best for your request is on MARC table with object EMMARCS, so use FM ENQUEUE_EMMARCS and DEQUEUE_EMMARCS.
Regards,
Raymond -
How to find out the locks in the table
Any query anybody have to find out locks in any table.
Here is a version with SID and serial# data:
set linesize 150;
set head on;
col sid_serial form a13
col ora_user for a15;
col object_name for a35;
col object_type for a10;
col lock_mode for a15;
col last_ddl for a8;
col status for a10;
break on sid_serial;
SELECT l.session_id||','||v.serial# sid_serial,
l.ORACLE_USERNAME ora_user,
o.object_name,
o.object_type,
DECODE(l.locked_mode,
0, 'None',
1, 'Null',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share',
5, 'S/Row-X (SSX)',
6, 'Exclusive',
TO_CHAR(l.locked_mode)
) lock_mode,
o.status,
to_char(o.last_ddl_time,'dd.mm.yy') last_ddl
FROM dba_objects o, gv$locked_object l, v$session v
WHERE o.object_id = l.object_id
and l.SESSION_ID=v.sid
order by 2,3; -
Performance issue related to BSIS table:pls help
Theres a select statement which fetches data from BSIS table.
As in the where clause the only key field used is BUKRS its consuming more time.Below is the code.
Could you please tell me how to improvise this piece of code.
I tried to fecth first from BKPF table based on the selection screen paramater t001-bukrs and then for all entries in BKPF fetched from BSIS.But it didnt worked.
your help would be very much appreciated.Thanks in advance.
SELECT bukrs waers ktopl periv
FROM t001
INTO TABLE i_ccode
WHERE bukrs IN s_bukrs.
SELECT bukrs hkont gjahr belnr buzei bldat waers blart monat bschl
shkzg mwskz dmbtr wrbtr wmwst prctr kostl
FROM bsis
INTO TABLE i_bsis
FOR ALL ENTRIES IN i_ccode
WHERE bukrs EQ i_ccode-bukrs
AND budat IN i_date.
Regards
Akmal
Moved by moderator to the correct forum
Edited by: Matt on Nov 6, 2008 4:10 PMDnt go for FOR ALL ENTRIES it will not help in this case .Do like below , you can see a lot of performance improvement.
SELECT bukrs waers ktopl periv
FROM t001
INTO TABLE i_ccode
WHERE bukrs IN s_bukrs.
sort i_ccode by bukrs.
LOOP AT i_ccode.
SELECT bukrs hkont gjahr belnr buzei bldat waers blart monat bschl shkzg mwskz dmbtr wrbtr wmwst prctr kostl
FROM bsis
APPENDING TABLE i_bsis
WHERE bukrs EQ i_ccode-bukrs
AND budat IN i_date.
ENDLOOP.
I dnt know why perform is good for the above query than "bulrs in so_bukrs" .This willl help , i m sure. this approach helped me.
Edited by: Karthik Arunachalam on Nov 6, 2008 8:52 PM -
Transfering data from bsis table to file on application server
Hi Gurus,
In my program iam selecting data from bsis table and transferring to file on the application server.
Code:
Tables: BSIS.
data: file type rlgrap-filename.
Select * from BSIS into BSIS.
Open dataset output in text mode encoding default.
Transfer bsis to file.
closesdataset.
1, Issue when transferring iam getting dump due to type conflict.
2, Here I cant create a structure like bsis and define type c
varialbles as its an upgrade project.
3, I tried field-symbols using type casting but data in the
application server is showing junk data with ##### in currncy
fields.
4, In earlier program there is no internal table defined for bsis,
Directly passing to work area and transferring to file on
application server.
Please let me know any feasble solution to approach.
If need i can post the complete code.
Regards
BhaskarHi Robert,
Here is my code....in ECC. While executing program is going to dump saying character type error.
tables: bsis.
data: begin of i_tab occurs 100.
include structure bsis.
end of i_tab.
parameters: outfile(1000) lower case.
open dataset outfile for output in text mode encoding default
ignoring conversion errors..
select * from bsis into table i_tab
where bukrs = bukrs.
loop at i_tab.
transfer i_tab to outfile.
endloop.
close dataset.
Please let me know if any soluton.
regards
Bhaskar -
GL Account open items- BSIS table
Hello All,
The standard BSIS table contains the GL Account open items. However i can find the line items for GL Accounts which are not based on "Open item management" also in this table. eg.Salary account postings from yr 2002 (All year end postings have been done appropriately). Is there any other table which can give the relevant info. ?
Any pointers to this will be highly appreciated.
Regards,
AasthaNot sure if I have understood the question, but I will give it a try.
There are two different concepts - "Open Item Management" and "Line Item Display".
Line Item Display allows you to see from FS10N, further drill-down into FBL3N
Open Item Management allows you to see Open and Cleared Items.
Open Items are stored in tables BSIS, BSIK, BSID
Cleared Items are stored in tables BSAS, BSAK, BSAD
Over and above this, ALL documents are stored in BSEG and BKPF, irrespective of their Open Item or Line Item status.
Hope this helps.
Maybe you are looking for
-
Adobe Bridge CS4 Hangs and whole system goes down.
Adobe Bridge CS4 Hangs and whole system goes down. This is happening when I just finished edition RAW files in ACR and hit DONE, right after that a Bridge hangs, Cannot open Explorer, PC functions are down, cannot start anything, cannot stop Bridge p
-
In installed the camera from the CD and it worked fine. Then I was capturing some video using the MS Movie Maker and it worked fine for a few videos I made. Then it quit on me, since then I have not been able to use the camera. When I plug the USB in
-
Hi All, My DB Version: 10.2.0 OS: Solaris 5 Hi while one of my user trying to create a table he is getting below error: create table emp 2 (ename varchar2(10)); create table emp ERROR at line 1: ORA-01950: Message 1950 not found; No message file for
-
In widows 8 no app shows up for dreamweaver after install. How do i fix?
I installed Dreamweaver from the Creative Cloud, it shows in control panel, but I cannot get the app to show in the screen (not a touch screen machine), and there is no start button. O now have a serial number, I just need to get the the program to w
-
After downloading album covers into iTunes iTunes does not show most of the covers. It showas blank white boxes except for those where "cover not found" (music notes). You have any idea how this happens, perhaps with location of the files.