How to avoid user locking
hi,
when a user tries to login but enters serveral time a wrong password the account get locked. is it possible to change this behaviour (I mean beside entering the right password) so that the account will not be locked?
kind regards
Michael
Hi Michael,
I dont think there a parameter which prevent locking users when wrong password is entered several times. But as the above post says you have a workaround. Set the parameter login/fails_to_user_lock to a high value. It can take a value from 1-99 , logically nobody will enter wrong password 99 times the same day
Every time the user enters a wrong password the counter is raised for that users master record. When the limit set by this parameter is surpassed, the user is locked. The lock becomes invalid at the end of the current day depending of login/failed_user_auto_unlock s value ( if value is 1 lock is released at the end of the day )
You can put the value for login/fails_to_user_lock in default profile (RZ10 --> Defaulr.pfl --> change ) . But I dont recommend doing this.This is a security violation , user id should get locked after entering wrong password few times. Then you can make sure that the system is being used by the right person and somebody cant login to the system by trial and error method.
The above procedure is for ABAP system .. I see you have posted this in JAVA forum, I am not sure about the Java procedure.
Thanks
Prince Jose
Similar Messages
-
How to avoid shared locks when validating foreign keys?
I have a table with a FK and I want to update a row in that table without being blocked by another transaction which is updating the parent row at the same time. Here is an example:
CREATE TABLE dbo.ParentTable
PARENT_ID int NOT NULL,
VALUE varchar(128) NULL,
CONSTRAINT PK_ParentTable PRIMARY KEY (PARENT_ID)
GO
CREATE TABLE dbo.ChildTable
CHILD_ID int NOT NULL,
PARENT_ID INT NULL,
VALUE varchar(128) NULL,
CONSTRAINT PK_ChildTable PRIMARY KEY (CHILD_ID),
CONSTRAINT FK_ChildTable__ParentTable FOREIGN KEY (PARENT_ID)
REFERENCES dbo.ParentTable (PARENT_ID)
GO
INSERT INTO ParentTable(PARENT_ID, VALUE)
VALUES (1, 'Some value');
INSERT INTO ChildTable(CHILD_ID, PARENT_ID, VALUE)
VALUES (1, 1, 'Some value');
GO
Now I have 2 transactions running at the same time:
The first transaction:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
UPDATE ParentTable
SET VALUE = 'Test'
WHERE PARENT_ID = 1;
The second transaction:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
UPDATE ChildTable
SET VALUE = 'Test',
PARENT_ID = 1
WHERE CHILD_ID = 1;
If 'UPDATE ParentTable' statement runs a bit earlier, then 'UPDATE ChildTable' statement is blocked untill the first transaction is committed or rollbacked. It happens because SQL Server acquires shared locks when validating foreign keys, even
if the transaction is using read uncommitted, read committed snapshot (read committed using row versioning) or snapshot isolation level. I cannot see why change in the ParentTable.VALUE should prevent me from updating ChildTable. Please note that ParentTable.PARENT_ID
is not changed by the first transaction, which means that from FK's point of view whatevere is set to the ParentTable.VALUE is never a problem for referential integrity. So, such blocking behavior seems to me not logical. Furthermore, it contradicts to the
MSDN:
Transactions running at the READ UNCOMMITTED level do not issue shared locks to prevent other transactions from modifying data read by the current transaction. READ UNCOMMITTED transactions are also not blocked by exclusive locks that would prevent the
current transaction from reading rows that have been modified but not committed by other transactions.
Does anybody know how to workaround the issue? In other words, are there any tricks to avoid shared locks when validating foreign keys? (Disabling FK is not an option.) Thank you.
AlexeyIf you change the primary key of the parent table to be nonclustered, there is no blocking.
Indeed, when I update ParentTable.VALUE, then:
in case of PK_ParentTable is clustered, a particular row in the clustered index is locked (request_mode:X, resource_type: KEY)
in case of PK_ParentTable is non-clustered, a particular physical row in the heap is locked (request_mode:X, resource_type: RID).
and when I update ChildTable.PARENT_ID, then:
in case of PK_ParentTable is clustered, this index is used to verify referential integrity:
in case of PK_ParentTable is non-clustered, again this index is used to verify referential integrity, but this time it is not locked:
It is important to note that in both cases SQL Server acquires shared locks when validating foreign keys. The principal difference is that in case of clustered PK_ParentTable the request is blocked, while for non-clustered index it is granted.
Thank you, Erland for the idea and explanations.
The only thing that upsets me is that this solution cannot be applied, because I don't want to convert PK_ParentTable from clustered to non-clustered just to avoid blocking issues. It is a pity that SQL Server is not smart enough to realize that:
ParentTable.PARENT_ID is not changed and, as a result, should not be locked
ChildTable.PARENT_ID is not actually changed either (old value in my example is 1 and the new value is also 1) and, as a result, there is no need at all for validating the foreign key.
In fact, the problem I described is just a tip of the iceberg. The real challenge is that I have deadlocks because of the FK validation. In reality, the first transaction has an additional statement which updates ChildTable:
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
BEGIN TRAN
UPDATE ParentTable
SET VALUE = 'Test'
WHERE PARENT_ID = 1;
UPDATE ChildTable
SET VALUE = 'Test'
WHERE PARENT_ID = 1;
The result is famous message:
Msg 1205, Level 13, State 51, Line xx
Transaction (Process ID xx) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
I know that if I change the order of the two statements, it will solve the deadlock issue. But let's imagine I cannot do it. What are the other options?
Alexey -
Hi All,
When I am trying to execute my procedure, sometimes it's successful but sometimes it's terminated because of Deadlock. I know this happened due to multiple sessions are waiting for data locked by each other, resulting in all the sessions being blocked. But how can this be avoided? Please suggest something.
Regards,
BSDid you check the Trace files for the Deadlocking statements?
The trace file shall show the deadlocking Statements and Sessions:
*** 2012-08-09 11:13:31.767
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
The following deadlock is not an ORACLE error. It is a
deadlock due to user error in the design of an application
or from issuing incorrect ad-hoc SQL. The following
information may aid in determining the deadlock:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-00090017-00000b9b 36 22 X 31 137 X
TX-00060008-00000b59 31 137 X 36 22 X
session 22: DID 0001-0024-0000082C session 137: DID 0001-001F-00002362
session 137: DID 0001-001F-00002362 session 22: DID 0001-0024-0000082C
Rows waited on:
Session 22: obj - rowid = 00012BF8 - AAASv4AABAAAY6pAAC
(dictionary objn - 76792, file - 1, block - 102057, slot - 2)
Session 137: obj - rowid = 00012BF8 - AAASv4AABAAAY6pAAD
(dictionary objn - 76792, file - 1, block - 102057, slot - 3)
----- Information for the OTHER waiting sessions -----
Session 137:
sid: 137 ser: 26538 audsid: 198923 user: 91/PURVESH flags: 0x45
pid: 31 O/S info: user: SYSTEM, term: **********, ospid: 1264
image: ORACLE.EXE (SHAD)
client details:
O/S info: user: Purvesh.Kulkarni, term: UNKNOWN, ospid: 5696
machine: *********** program: SQL Developer
application name: SQL Developer, hash value=1012150930
current SQL:
update test_table set col = '2D' where pk_col = 4
----- End of information for the OTHER waiting sessions -----
Information for THIS session:
----- Current SQL Statement for this session (sql_id=d3j1vvv24hbv9) -----
update test_table set col = 'CC' where pk_col = 3
===================================================You might be able to track the records based on ROWIDs listed in the Trace files.
Trace file information can be found in Alert Log :- {\diag\rdbms\orcl\orcl\alert} text like 'ORA-00060: Deadlock detected. More info in file d:************\diag\rdbms\orcl\orcl\trace\orcl_ora_3888.trc.'
I guess this might provide some help along with the pointers posted by others. -
How to avoid user from entering new price condition in return order
Dear Expert
We are facing a scenario where we make return order; the Price is copied from the invoice. And it is working perfectly. The system does not allow us to change the price.
The issue we are facing here is that user can input new condition like discount /premium and change the net value for the return order pricing, and this will reflect in the credit note for returns.
Is there a way to restrict the user from entering any pricing condition in the header or item conditions tab.
although we cannot change the original price coming from invoice referenced for return order, but the user can input new price conditions as below. This must not be allowed.
The price must come according to the Qty being referenced.
While making the credit for returns, the user has a chance of further making changes to the net value by adding new conditions. Hence this must also be restricted for any changes.
Thanks
Edited by: Lakshmipathi on Jan 31, 2012 6:55 PM
Thread Locked - Reason Cross Postokie .... i will tell briefly what is the problem ....
Take a scenario wherein a user has logged into my application and he is performing a task which will put his user id and his employee id into the session. Then he opens another window by using either ctrl+n or through files->new window.
So now a new browser will open but the session will be same ..... in this newly opened browser, user performs some operation which will remove the user id and employee id from the session .... Now if he again comes back to the first window and tries to do some operation, then a null pointer exception will be thrown saying that the employee id is null .... because he has deleted that in the newly created browser ..... to avoid this situation what can we do ???? can you please help me in this regard ??? you got my problem right !!! -
Hi all:
We are running ESS/MSS.
When user use tasks like maintenance personal data, family data. the infotype data is locked, then user exit the ESS abnormally. Then the infotype data is locked.
My question is how long this infotype data will be released and can we change the time of this lock data ?Hi
You can run the date command
/usr/bin/date mmddHHMMyy
example
date 0906154506 (sep 06 15:45 year 06)
Rgds
HGN -
How to avoid user creation popup window in Employee Master Data Creation in SAP B1 9.0
Hi Experts,
I have to create employee master data.When I am creating Employee Master Data it is asking crete new user,If I was not provied user code.
Is there any standerd setting to avoid this?
Please suggest
Thnaks and Regards
DEVHi Dev,
The Pop up you are getting is Standard Behavior in 9.0
System is asking whether you want to assign any User Code to this Employee or not.
If you want to add any User Code to this New Employee Master then Press "OK" else Press "NO" to Add New Employee Master Data.
Hope this helps
Regards::::
Atul CHakraborty -
How to avoid users forward automatically emails to external domains
Hello
In the user preferences for the email, the user can create new server side rules for his account. One of this rules can be "forward every received email to another account". We would like to restrict this possibility to only our local domain. That is, if one user goes on holidays, he would be able to forward his emails to my_colleague@our_domain.com. But we don’t want to allow a user to resend permanently and automatically all his emails to my_personal_account@external_server.com
I don’t know if it is possible to restrict this option, and how can we do it. Thanks in advance for any hint.
Regards,
MiguelOk, thanks for the answer. Is there any “Enhance Request Number” or any way of tracking this issue? Just to know if it will be implemented and when it will be done.
Regards,
Miguel -
How to avoid table lock in java
hey all
is there any way/possibility that we can lock a table in our program? for instance, after create a statament which updates a table and forget about close the statement or connection, will this be able to lock a table?Alot of this depends on the DB you're using. Have a look at this if you are using Oracle DB.
http://www.akadia.com/services/ora_locks_survival_guide.html
For example, in Oracle, if you code like this:
EXEC SQL
LOCK TABLE xxxxxx
IN SHARE UPDATE MODE;
POSTORA;... or this:
SELECT 'X' FROM xxxxxxx
WHERE ROWID = ?
FOR UPDATE OF xxxxxxx_column;... You could be locking the DB. And I could be wrong, but it is my understanding that the 'LOCK' command specifically locks the entire table, while just coding 'for update of ... ' locks the selected rows.
That said, and as far as the Java part goes, you should close 'stuff' that you open as soon as you're done with it. Read the API for more info. -
JavaServer Faces: How-to avoid users entering application URLs directly
Hi Frank,
I have read your article and implement it but have problem in redirecting the user to the login page... the code snippet is:
if (((HttpServletRequest)request).getMethod().equalsIgnoreCase("GET") &&
!isAllowedPage(request)){
HttpServletResponse oResponse =null;
oResponse.sendRedirect("Login.jsp"); [But it not worked]
chain.doFilter(request, response);
Please help me... (what code to write for redirection)I have used basic authentication but when the login/pwd window appears. I pass the user/pwd and following message appears
You are not authorized to view this page
You might not have permission to view this directory or page using the credentials you supplied.
My Web.xml file look like this.
<security-constraint>
<web-resource-collection>
<web-resource-name>adfAuthentication</web-resource-name>
<url-pattern>/adfAuthentication</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>oc4j-administrators</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>empprofile</web-resource-name>
<url-pattern>faces/empprofile/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>jazn.com</realm-name>
</login-config>
<security-role>
<role-name>oc4j-administrators</role-name>
</security-role>
<security-role>
<role-name>admin</role-name>
</security-role>
<resource-ref>
<res-ref-name>jdbc/OracleDBConnectionDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
My jazn-data.xml file look like this
<?xml version = '1.0' encoding = 'windows-1252' standalone = 'yes'?>
<jazn-data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-data-10_0.xsd"
filepath="" OC4J_INSTANCE_ID="">
<jazn-realm>
<realm>
<name>jazn.com</name>
<users>
<user>
<name>amir</name>
<credentials>{903}hy9JMGVS8lau4hu2OhJWv8YgglfpgRR2</credentials>
</user>
</users>
<roles>
<role>
<name>admin</name>
<members>
<member>
<type>user</type>
<name>amir</name>
</member>
</members>
</role>
</roles>
</realm>
</jazn-realm>
</jazn-data>
My orion-Application file look like this
<?xml version = '1.0' encoding = 'windows-1252'?>
<orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd">
<jazn provider="XML" default-realm="jazn.com"/>
</orion-application> -
How to avoid user to save data on Desktop or My Documents
Hi Everyone.....
I want to apply a policy in which user cannot able to save his data on their desktop or in my documents. I tried Folder Redirection policy through GPO. In this policy save data of desktop Or of My Documents redirect to on specified path but the original
data didn't get deleted from its location. I just want that user should not able to save his data on their desktop or in My documents or if they save data then it should be moved to another specified location & gets deleted from their original location.
Kindly provide suggestion to my problem.Hi,
You erroneously posted your question in the Project Server forum which is dedicated to the Microsoft enterprise scheduling and planning application.
Please post it to the right forum in order to have appropriate help, starting from here:
https://social.technet.microsoft.com/Forums/en-US/home?forum=whatforum
In addition, here are a few links about GPO:
https://technet.microsoft.com/en-us/library/dn265973.aspx
https://technet.microsoft.com/en-us/library/cc753298.aspx
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
How to avoid User Authentication Multiple times after run the Bo report
Dear Experts,
I am facing issue in BOBJ portal. we are trying to run report in portal and its working fine and running ME23N transaction from that report.
Once we click on ME23N transacation from that report its opening new pop up window and data showing perfectly .
But after close that pop up window and go back BO or BI TAB in portal its asking uid and password.
But first time it's not asking. If I log out and login again then it will work but after run and close the pop up window and come back to BI or BO tab again is asking user ID and Password.
I checked all Log on tickets and validity period and system connections every thing fine.
Could you please Help me ...
Regards
KalyanHi Kalyan
Is this any internet proxy server setting are there in browser? just bypass the proxy setting and then try the same
BR
SS -
Avoid users to upload especific document via data transfer DTW
Dear Experts,
Anyone know how to avoid users uploading especific documents via DTW (Data Transfer WorkBench), for example giving them authorization to upload User Defined tables via DTW, but avoiding them to upload Purchase Invoices, due to an Approval template for Purchase Invoices.
Hope you'll be able to help me.
Best Regards,That would be too hard to do even if it is possible.
My suggest is: if you give your user the power for DTW, train them fully. Let them know what they can or can not do.
Thanks,
Gordon -
How to avoid Flickaring When Adding data in Addon User Matrix
Experts,
I am Adding Query Result in User Matrix one by one. but there is lots of Flicker.
how to Avoid this Flickering.
Bomiitems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
If Bomtyp = "U" And BomNo = "0" Then
BOMItem = "SELECT Distinct T0.[Code], T1.[ItemName] , ( 1 / Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0),('" & Quanti & "'/ Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0) as "
BOMItem = BOMItem + " 'Quanti',T1.[Excisable],'N' as U_Rec , T1.[InvntryUom],T0.[Warehouse] 'Warehouse',T0.[IssueMthd]'IssMthd' FROM ITT1 T0 INNER JOIN OITM T1 "
BOMItem = BOMItem + " ON T0.Code = T1.ItemCode INNER JOIN OITT T2 ON T0.Father = T2.Code "
BOMItem = BOMItem + " WHERE T0.[Father] ='" & Icode & "'"
Bomiitems.DoQuery(BOMItem)
ElseIf Bomtyp = "U" And BomNo <> "0" Then
'BOMItem = "SELECT T0.[Code], T1.[ItemName] , ((T0.[Quantity]/ T2.[Qauntity])*'" & Quanti & "') as 'Quanti',T1.[Excisable],'N' as U_Rec FROM ITT1 T0 INNER JOIN OITM T1 ON T0.Code = T1.ItemCode INNER JOIN OITT T2 ON T0.Father = T2.Code WHERE T0.[Father] ='" & Icode & "'"
BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) ,('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) as 'Quanti',T2.[Excisable], T0.[U_Rec],T2.[InvntryUom] ,T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
BOMItem = BOMItem + "FROM [dbo].[@OITTA] T0 inner join [dbo].[@ITTA1] "
BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON T1.[U_Icode] = T2.[ItemCode]"
BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'U' "
Bomiitems.DoQuery(BOMItem)
ElseIf Bomtyp = "P" Then
BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0),('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) as 'Quanti',T2.[Excisable], T0.[U_Rec] ,T2.[InvntryUom],T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
BOMItem = BOMItem + "FROM [dbo].[@OITTA] T0 inner join [dbo].[@ITTA1] "
BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON T1.[U_Icode] = T2.[ItemCode]"
BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'P' "
Bomiitems.DoQuery(BOMItem)
End If
Bomiitems.DoQuery(BOMItem)
If Bomiitems.RecordCount > 0 Then
'RecCount1 = RecSet1.RecordCount
Bomiitems.MoveFirst()
i = 0
'osubForm .Freeze(True)
oMatrix = oForm.Items.Item("1000001").Specific
oMatrix.FlushToDataSource()
While Not (Bomiitems.EoF)
If i = 0 Then
oMatrix.AddRow()
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", 0, i + 1)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", 0, Bomiitems.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", 0, Bomiitems.Fields.Item(1).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", 0, Bomiitems.Fields.Item(2).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", 0, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", 0, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", 0, Bomiitems.Fields.Item("Warehouse").Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", 0, Bomiitems.Fields.Item("IssMthd").Value)
Dim orsWhsDetails As SAPbobsCOM.Recordset
Dim strWhsDetails As String
orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
orsWhsDetails.DoQuery(strWhsDetails)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", 0, orsWhsDetails.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", 0, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", 0, orsWhsDetails.Fields.Item(3).Value)
oMatrix.LoadFromDataSource()
Else
oMatrix.FlushToDataSource()
oForm.DataSources.DBDataSources.Item("@TPROD1").InsertRecord(i)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", i, i + 1)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", i, Bomiitems.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", i, Bomiitems.Fields.Item(1).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", i, Bomiitems.Fields.Item(2).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", i, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", i, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", i, Bomiitems.Fields.Item("Warehouse").Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", i, Bomiitems.Fields.Item("IssMthd").Value)
Dim orsWhsDetails As SAPbobsCOM.Recordset
Dim strWhsDetails As String
orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
orsWhsDetails.DoQuery(strWhsDetails)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", i, orsWhsDetails.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", i, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", i, orsWhsDetails.Fields.Item(3).Value)
oMatrix.LoadFromDataSource()
End If
i = i + 1
Bomiitems.MoveNext()
oMatrix.LoadFromDataSource()
End While
oMatrix.LoadFromDataSource()
End If
Regards,
Pravin Bajifollow steps
1) Execute query so we can get data set
2) Clear matrix and data source (omatrix.clear(), oDBS.Clear())
3) Open loop
4) Insert record to oDBS using oDBS.InsertRecords(oDBS.Offset)
5) Then set value using oDBS.Setvalue(u2026u2026
6) Move next record
7) Finally close the loop
8) Matrix load from record set using oMatrix.LoadfromData()
it will be work -
How to avoid long user interface response time in long measurements ?
Hi
I tried to find more information regarding techniques how to avoid long user interface response times in case of extremely long measurement times with an external instrument communicating over GPIB, so I post this hoping to get some hint or a link to a guideline. I guess this is quite normal problem.
Problem is that when I want to measure long time in order to get an average result from the instrument, I have to wait until the result is returned from the instrument. Obviously that makes the user interface response very slow in traditional technique.
My restriction is the old GPIB 488 instrument driver that I would not want to modify, but I have source code to it.
What would be the best way to improve the response time for user interface ? I have looked into the few things:
* multithreading
* callback in main program for GPIB events
* modifying instrument driver e.g. to support VISA and creating a VISA callback
regards,
PetriSeveral ways to do this:
If you're getting several measurements, you could have the instrument generate an asynchronous interrupt (an "SRQ" in GPIB terms), then collect the data in response to the SRQ callback. While you're waiting for the SRQ's, you can have your main thread running the interface so responsive GUI. You don't have to spinlock on the GPIB read waiting for instrument data.
Or, as you mentioned, you could spawn a thread to manage the measurements, and use a timer in the main thread to periodically allow you to check the status of the measurement thread. Again, the main thread mostly just runs the user interface.
Either way, the idea is to keep the main thread freed up most of the time to run the GUI, and have it periodically check for completion of your measurement sequence. While you're waiting in the main thread, you may want to make sure the user can't inadvertently re-trigger another measurement sequence until the active one is complete.
If you do find yourself doing a dead wait, you'd want to break this up into a series of shorter waits, and in between each wait, do a ProcessSystemEvents from the main thread to keep the GUI active.
Menchar -
How to unlock users in a SAP system if all of them are locked
How to unlock users in a SAP system if all of them are locked
Posted: Mar 21, 2007 10:07 AM Reply E-mail this post
Hello Experts,
In any SAP System,if a user having authorizations has mistakingly locked all the users of the SAP system,then how wll we unlock those users bcoz we wont be able to logon into the SAP System. Requested to revert your valuable replies at earliest.This happened with us,how to resolve it.My Email Id is [email protected] .
Regards,
SaumyaHello Siva And Manas,
Thanx for ur replies .
Manas: These SQL statements we hv to run at the Command Prompt level only na.......
Siva : U r telling to delete the SAP* user ,u dont mean with the System created default user SAP* rite but u mean to delete our self created SAP*/any super user rite? Secondly how to delete tat user at the database level?
Regards,
Saumya
If all the users are locked , they can only be unlocked via sql.
Actually waht happens is if the uflag field of an user in table usr02 is 0 then the user is unlocked. Different values of the uflag field in table USR02 mean:
0 User not locked
32 Locked by CUA central administrator
64 Locked by administrator
128 Locked after failed logon
Incase all the users are locked execute the following sql to unlock them
update sap<sid>.usr02 (means update sapd01.usr02 or sapq01.usr02 etc)
set uflag='0' ;
commit.;
This unlocks all the users.
update sap<sid>.usr02
set uflag='0' where bname='xxx';
commit.;
This unlocksonly the user xxx.
Maybe you are looking for
-
Adobe Acrobat XI Pro SIGNATURES
My subject: Employee Onboarding My short-term goal: To allow user to save his or her signature securely, when they access the form with Adobe Reader, so that they can access it for future use. My long-term goal: To set up an employee onboarding acces
-
Why the White Lines around imported Photoshop Images
Working in CS6, importing native Photoshop images into an Illustrator gradient. Certain imported Photoshop images, with transparent background, produce white lines bordering the images. The white lines stand out against the AI gradient. The white
-
Problem compiling...
I have this piece of source code: Hashtable<String, Integer> monthtable = new Hashtable<String, Integer>(); monthtable.put("Jan", new Integer(1)); monthtable.put("Feb", new Integer(2)); monthtable.put("Mar", new Integer(3)); month
-
ITunes 7.3: What's new?
Hi all, I'm sure that no one will be surprised there is a new iTunes 7.3 out. Besides iPhone support, what is new with 7.3.0.54? Thanks, Steven
-
Hi, I have imported my own image using Shared components. After in a header page region I wrote <img src="#IMAGE_PREFIX#logo.gif"> And it doesn't work But when I use <img src="#IMAGE_PREFIX#go.gif">, which "go.gif" is an oracle image. Could you help