Centralized user tables
Hi,
I'm sure that this question has been asked over and over by different people. If I have a common user table (PERS) and a couple of tables (PERS_APP_ROLE, ...) to store user roles in a schema in one standalone database - Oracle, of course. I have a separate APEX application that handles self-service things like user changing their password or personal information. Then, I have multiple APEX applications, residing in different databases, that authenticate against the user tables in the above remote database schema - via database link. In addition, I log the numeric ID of the user who creates and updates the records in many of these applications. Therefore, in many pages of these applications, I need to query the remote database in order to get the user name of these ID's.
In the PERS table in the remote database, I store both the LDAP Active Directory usernames (for LDAP authentication in APEX) and the "hashed" passwords (for table authentication in APEX) because my applications are used by both internal and external users.
Is this the correct approach to handle these mixed authentication needs - LDAP and table authentication? Can anyone help?
Thanks.
Andy
thanks for your replies.
i did check to see what happend when describing v$session as both a regular user (and as internal), and for each i received:
ERROR:
ORA-04043: object USER1.V_$SESSION does not exist
and laurent - thanks - i had it in my head that it was a synonym problem, but i couldn't remember the keyword 'synonym' - i kept thinking it was something along the lines of 'alias', which of course it isnt.
it appears, however, after looking at dba_synonyms a little more closely, that somehow the owner of a bunch of the USER_% synonyms were USER1? no idea how that happened, and like the previous poster stated not sure why an export or import would have an effect on the dictionary or synonyms.
anyway, reran catalog.sql, and all seems fine now.
thanks again for your help!
sandeep
Similar Messages
-
Regd : How to find Validity date for a user in central user system
Hi Experts;
I want to get the list of users with profile SAP_ALL with following details like validity ,user type ,user name ,user id..
I can get through SUIM for each individual systems.Its very difficult to login to each system ,generate the report.So I prefered to go for Central system
But if I use central user system I have no option to find validity and user type for the system ( SUIM - > Cross system application )
I have also tried to the table USRO2 ( which gives only the list of users in the central system )
So is there any possible ways to find the Users with profile SAP _ALL with validity date in the central user system. So that I can easily generate it as one report instead of logging to each and every system
Regards
Sanjeev.SHi Ruchit
Thanks for your reply. I want to find the validity date of all users having SAP_ALL
profile of all child system connected through central user system .So it is possible
to do that in Centrals System by executing the report?
If I execute that report in Central user system will it give the details of all child
system connected to central system
I think it will give only the result of Central system and not the child system connected to Central system.Please clarify me.
I can execute the report by logging to each child system ,but it takes very long hours for me since there are many system in my landscape.
Awaiting for your reply.'
Thanks
Sanjeev.S -
User tables belonging to the dbo schema were found in the database...
Hi
I´m running SAP on windows server 2003 R2 x64 sql 2005.
I have installed a sandbox system based on NW 7.01 SR1 ECC 6.0. It´s only abap.
After that I wanted to make a system copy of our production system to the the sandbox. So my sql colleague took a full backup of the production database and restored it into the sandbox.
Now I´m trying to run the system copy installation sapinst - SAP ERP 6.0 EHP4 Ready (Support Release 1) - Sotware life Cycle Options - System Copy - MS SQL Server - Target System Installation - Central System - Based on AS ABAP - Central System...
I choose custom and say it´s a Homogeneus System Copy (MS SQL Servver-specific)
After that I choose "Use existing database" but the it say:
*User tables belonging to the dbo schema were found in the database ES0. SOLUTION: You can only install an SAP system in a database with no user objects belonging to the system schema dbo. If there already is an SAP system in the database (MCOD), or you install a Java Add-In, you might have to convert the existing system to its own schema, or contact your SAP support.*
I have searched the forums and can´t find anything I can use. I found someone wrote that I should change the control.xml file under sapinst directory:
Proceed as follows:
1. Stop SAPinst.
2. Open the file control.xml in the sapinst log directory and look for the following lines:
AllowNew: mig ? ?false? : ?true?,
AllowDboObjects: mig ? ?true? : ?false?,
3. Change these lines to
AllowNew: ins ? ?true? : ?false?,
AllowDboObjects: ins ? ?false? : ?true?,
4. Save the control.xml, restart SAPinst and choose ?Continue old installation?.
but it is not helping.
Please advise me.
If this is the wrong forum please tell which one is correct.
Best regards
Thomas
Edited by: Thomas Aastrøm on Feb 23, 2012 3:49 PMHi again
Phase 11 is ok now. We changed the database owner to sap SIDadm.
But now it fails at phase 12 (Move MS SQL Server objects from one schema to another)
An error occurred while processing option SAP ERP 6.0 EHP4 Ready - Support Release 1 > Software Life-Cycle Options > System Copy > MS SQL Server > Target System Installation > Central System > Based on AS ABAP > Central System. You can now:
Choose Retry to repeat the current step.
Choose View Log to get more information about the error.
Stop the option and continue with it later.
Log files are written to C:\Program Files/sapinst_instdir/ERPEhP4/LM/COPY/MSS/SYSTEM/CENTRAL/AS-ABAP/.
sapinst.log:
INFO 2012-02-24 13:18:55.427
Execute step MoveSchema of component |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSysCopy|ind|ind|ind|ind|10|0|MssSchemaMove|ind|ind|ind|ind|2|0
ERROR 2012-02-24 13:18:56.349
FCO-00011 The step MoveSchema with step key |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSysCopy|ind|ind|ind|ind|10|0|MssSchemaMove|ind|ind|ind|ind|2|0|MoveSchema was executed with status ERROR .
ERROR 2012-02-24 13:18:56.146
MDB-05053 Errors when executing sql command: [Microsoft][ODBC SQL Server Driver][SQL Server]Object 'ep0.AFKO' does not exist or is not a valid object for this operation.
<p> SOLUTION: If this message is displayed as a warning, you can ignore it. If this is an error, contact SAP support.</p>
INFO 2012-02-24 13:19:02.583
An error occured and the user decided to retry the current step: "|NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSysCopy|ind|ind|ind|ind|10|0|MssSchemaMove|ind|ind|ind|ind|2|0|MoveSchema".
ERROR 2012-02-24 13:19:02.770
FCO-00011 The step MoveSchema with step key |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSysCopy|ind|ind|ind|ind|10|0|MssSchemaMove|ind|ind|ind|ind|2|0|MoveSchema was executed with status ERROR .
What to do?
Best Regards
Thomas -
How do I create new user table in program and then access it?
I am writing an application where I check for the existence of user objects when the add on starts and run the setup if the objects do not exist. I can create the user tables and fields but after the setup completes these objects still are not visible.
If the user objects exist when the add on is first run everything is detected correctly.
When a user object is added in SAP the user is eventually prompted to restart so I suspect something needs to happen prior to the add on being able to use the new fields.
Does the add on need to wait for the DI Server to perform some action? Do I need to just quit the add on's class and rerun it, disconnect and reconnect to the company, or get a new Application and/or company object?
What I want to do is figure out a way for the add on to automatically run the configuration if the user tables and fields do not exist yet and then kick off the regular add on code. I haven't seen anyone else's code so I don't know what is recommended or required here.
Thanks for any assistance!I found that the add on can validate the existance of the user fields if I disconnect from the company object, set the SAPbouiCOM.Application and SAPbobsCOM.Company objects to null, set the new application, context, and company objects, and reconnect once more.
HOWEVER...
I still have to wait for the client to be restarted manually before I can run any of the form I added to the menu.
So, I'd still like to know what the best practice is here. Should I just exit after setting up the tables and tell the user to restart SAP? -
Crystal Report error trying to retrieve data from a user table
Hi,
I'm making crystal report application with VS 2005 and I need to retrieve data form a user table. I'm using Pull method, I configure the connection and parameters by code.
I think that the problem could be the @ that is used to identify these tables. Please, if some body had this problem before and have a solution, please let me know asap.
ThanksHi Andrea,
I had the same problem today. I upgraded from Crystal Version 8 to 11 and the problem was solved. Maybe it is too late for you, but I wanted to post the solution if anybody else has the same problem.
Regards
Guillermo -
HOW CAN I ADD/UPDATE/INSERT IN A USER TABLE WITH MATRIX
Hi All,
I have one User table (Defined as No Object) and what i need to do is a form with a matrix to Add/Update/Delete data in my user table.
I already create the form and the matrix that already give me the user table data. But now i have several problems to solve.
First I try to add a new row but this new row get the data of the last row in the matrix. What i needed is a blank row to add new data in the user table.
Second, when i change data in matrix and do update in the form, sap show me the message that the operation is successfully done but the data in the user table in not updated.
I am trying to do one forma like whe can find in Setup-> General -> Freight.
Can anyone help me?
Best Regards,
Luis DuarteHi,
If ur dealing with a simple form like that U can as well use the direct table form, and just provide a FMS to auto matically fill the code and name. U can directly use the form by.. Tools-->UserDefined Windows
Or
Comming to ur problem.... when ur adding a new row clear the data sources so that u'll get a blank row.
And for update the best thing to do is delete all the records in the table and again insert all the records directly from the matrix.
Hope it helps,
Vasu Natari. -
How to save matrix do user table?
Hi,
I have created on system form matrix as:
oNewItem = oOrderForm.Items.Add("a", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oNewItem.Top = 150
omatrix1 = oNewItem.Specific
oColumns = omatrix1.Columns
oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "#"
oColumn.Width = 20
oColumn.Editable = False
oColumn = oColumns.Add("code", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn = oColumns.Add("name", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn = oColumns.Add("cesta", SAPbouiCOM.BoFormItemTypes.it_EDIT)
This matrix i have bounded to datasource as:
oDBDataSource = oOrderForm.DataSources.DBDataSources.Add("@SKIL_ATTACH")
oConditions = New SAPbouiCOM.Conditions
oCondition = oConditions.Add
oCondition.BracketOpenNum = 2
oCondition.Alias = "U_PATH"
oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCondition.CondVal = "xxx"
oCondition.BracketCloseNum = 1
oDBDataSource.Query(oConditions)
oItem = oOrderForm.Items.Item("a")
omatrix1 = oItem.Specific
oColumns = omatrix1.Columns
oColumn = oColumns.Item("cesta")
oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "U_XCESTA1")
oColumn = oColumns.Item("code")
oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "CODE")
oColumn = oColumns.Item("name")
oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "NAME")
omatrix1.LoadFromDataSource()
The user table has 3 my fields (U_Path, U_xcesta and U_xcesta1) abd 2 fileds (code and name) - this two fields i didnt create, i think that are some system fields?
On the system form everything seems to be ok, I can add rows, modify data, set new data, ... After changing any data in this matrix, the system button will change from OK to Update or Add and after click on this button in status bar is OK, the data was added or updated...
The problem is, that in user table aren`t data modified and there are still old data.
I tried to make update manually as:
oItem = oOrderForm.Items.Item("a")
omatrix1 = oItem.Specific
omatrix1.AddRow(1, 0)
Dim cell As SAPbouiCOM.Cell
Dim col As SAPbouiCOM.Column
Dim ed As SAPbouiCOM.EditText
col = omatrix1.Columns.Item("code")
cell = col.Cells.Item(1)
ed = cell.Specific
ed.String = CStr("some data")
omatrix1.Columns.Item("cesta").Editable = True
omatrix1.Columns.Item("cesta").Cells.Item(1).Click(SAPbouiCOM.BoCellClickType.ct_Double)
omatrix1.FlushToDataSource()
omatrix1.AddRow(1, 1)
but nothing happens and data in table are still old. What I`m doing bad? Could anyone help me please?
Please be patient, because Im working with SBO for short time. Thanks!I solved is through manual updating and inserting to database as"
oUserTable = oCompany.UserTables.Item("SKIL_ATTACH")
oOrderForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT coalesce(max(convert(integer, code)),0) as max from dbo.[@SKIL_ATTACH] with(nolock)")
oUserTable.UserFields.Fields.Item("U_Popis").Value = "xxxxx"
oUserTable.UserFields.Fields.Item("U_PATH").Value = "xxxxx"
oUserTable.UserFields.Fields.Item("U_OP").Value = "xxxxx"
lRetCode = oUserTable.Add
It works, but I think that it is not the easiest way. -
How to bind the data from user table into user report
Hi All,
Please assist me to bind the data from user table into user report. I did create an user table with data and create a user report template (using Query Print Layout). How can I display my data into report format which I created before? Any sample program or document I can refer?
Platform: SAPB1 2005A
Add On Language: VB.Net 2003
Thanks.
rgds
ERICHi Ibai,
Thanks for your feed back. I give you an example.
Let say now i wanna print employee list, so i will go
1. Main Menu -> Reports -> HR -> Employee List
2. Choose the Selection Criteria -> OK
3. Matrix will display (Employee List)
4. I can print the report click on print button
5. Printing report
My target
1. Main Menu -> Eric_SubMenu -> Employee List
2. Matrix will display (Employee List)
3. Print button
4. Print report
My problem
Now I would like to use my own report format. My own report format means I wanna add on my logo or do some customization within the employee report. So how I am going to do? I only able to display the employee list in matrix. How do I create a new report format and display it.
Thanks.
rgds
ERIC -
Error while adding user fields to user table using vb6.0
Hi,
I am adding a user tables using vb6.0 using DIAPI.
I am able to add the user table successfully.
I am getting the following error when i am adding the fields to the table.
"The metadata object for this object cannot be updated, since it's ref count is bigger than 0."
My code is as follows:
oUserFieldsMD.TableName = TABLE_NAME_ITEM_LOCN
oUserFieldsMD.Name = vTableFields(0, lCount)
oUserFieldsMD.Description = vTableFields(1, lCount)
oUserFieldsMD.Type = vTableFields(2, lCount)
oUserFieldsMD.EditSize = CLng(vTableFields(3,lCount))
lRetCode = oUserFieldsMD.Add
This error does not come up when i try to add the field to my table using the vb sample provided by SAP.
Your help will me much appreciated.
Thanks.Hi Satish,
The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
e.g
Dim pUTables As SAPbobsCOM.UserTablesMD
'Do your stuff
Set pUTables = Nothing
Dim pUFields As SAPbobsCOM.UserFieldsMD
'Do your stuff
Set pUFields = Nothing -
Creating a User Table via DI API
Hi all,
I'm using
SAP Business One 2004A (6.70.185) SP: 00 PL: 07
and corresponding SAP Business One DI API 2004
I want to create a user table.
I try to create it this way:
I have two functions
First function to create the table
Private Function AP_AddOn_CreateTable() As Boolean
AP_AddOn_CreateTable = True
Dim oUDT As SAPbobsCOM.UserTablesMD
Dim sErrMsg As String
Dim iErrCode As Integer
Dim iReturn As Integer
oUDT = oDIComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
oUDT.TableName = "AP_tbItemCalc"
oUDT.TableDescription = "ItemCalculation"
iReturn = oUDT.Add
If iReturn <> 0 Then
oDIComp.GetLastError(iErrCode, sErrMsg)
Message
AP_AddOn_CreateTable = False
End If
oUDT = Nothing
End Function
This works fine
Then I call a second function to create the user fields
Private Function AP_AddOn_CreateFields() As Boolean
AP_AddOn_CreateFields = False
Dim oUDF As SAPbobsCOM.UserFieldsMD
Dim sErrMsg As String
Dim iErrCode As Integer
Dim iReturn As Integer
oUDF = oDIComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUDF.TableName = "@AP_tbItemCalc"
'Field1
oUDF.Name = "ItemCode"
oUDF.Description = "ItemCode"
oUDF.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUDF.Size = 20
iReturn = oUDF.Add()
If iReturn <> 0 Then
oDIComp.GetLastError(iErrCode, sErrMsg)
Message
Exit Function
End If
'Field2
oUDF.Name = "ItemName"
oUDF.Description = "ItemName"
oUDF.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUDF.Size = 100
iReturn = oUDF.Add()
If iReturn <> 0 Then
oDIComp.GetLastError(iErrCode, sErrMsg)
Message
Exit Function
End If
next fields
AP_AddOn_CreateFields = True
End Function
The second function returns on adding the first field, an error, errCode -1120, errMsg Ref count for this object is higher than 0
If i close the application after creating the table and then restart the application only executing the second function it works.
I also tried the example as provided in MetaDataOperations and it shows the same behaviour.
Besides, Im the only user on the system and no other application is running.
Kind regards,
EduardHi,
See Add userfield to usertable 1120 Error SOLUTION
HTH
Ribeiro Santos -
Error while linking udf to user table.
Hi All,
If i am gong to joined my UDF to user table by using option then alphanumeric size of that udf changes to 8 from 15. In such condition when i m going to update ths udf thn it is giving error as "Alphanumeric column size cannot be decreased".
Reply ASAPHi swapy
put the udf size as 8 before the computer does the work.then try to attach the udf. -
How to get number of records in all user tables in one select
Please advise how to retrieve the number of records in all user tables in one select. I would likt to extract the data to excel file.
Many thanks,
AndrewYou could always analyze the tables:
declare
begin
for X in (select owner, table_name from all_tables
minus
select owner, table_name from all_external_tables) LOOP
dbms_stats.Gather_Table_Stats(X.Owner, X.Table_Name) ;
end loop;
end;
/Then: Select Owner, Table_Name, Num_Rows from All_Tables ; -
User Table Key set up in User defined field management
Dear Expert,
what is use of User Table Key set up in User defined field management in SAP B1.
Thanks.
Sridharan.R
Edited by: Sridharan.R on Oct 4, 2011 8:26 AMHi,
Once a UDF is created and a value is entered in it, the same cannot be retrieved in any of the layouts and reports unless a Key is generated for that UDF. By assigning a Key to that UDF, the same UDF can be used in Crystal Reports or any other Reporting tool to extract its values from SAP. These reporting tools searches the Uniqueness of the UDF Values with this Keys only.
For eg.: When you develop a report and select a table from which you need the fields to be shown in the layout. In that, the only fields whose keys are generated are only available to use in the report.
Hope its clear to you.
Regards,
Papil -
Hello,
I want to use the user tables default forms (after adding the user table in Uer Tables menu, it's generated a form to view that table: add, delete, update info).
I'd like to lauch this form from my add-on menu. I know how to do that, but I wonder if that MenuID of the menu depends on the SBO installation (on what other tables were added before in SBO). Also, I'd like to put Choose from list capabilities in that form. I know also how to do this (just like a system form), but I also don't now if the FormID is the same on each installation.
Thank you for your answer.
I hope I made myself clear.
Irina StancaYou may try this to find the MenuUID of your UDT:
Start Saved Query through menuitem
Have you checked Application.ResourceData? I'm not sure whether UDT forms are considered system forms, though. Anyway, you should be able to get the FormID of your UDT form on the fly by iterating the Application.Forms collection and checking the Title property, which equals the UDT Description.
HTH
Juha -
How to load data into user tables using DIAPIs?
Hi,
I have created an user table using UserTablesMD object.
But I don't have know how to load data into this user table. I guess I have to use UserTable object for that. But I still don't know how to put some data in particular column.
Can somebody please help me with this?
I would appreciate if somebody can share their code in this regard.
Thank you,
SudhaYou can try this code:
Dim lRetCode As Long
Dim userTable As SAPbobsCOM.UserTable
userTable = pCompany.UserTables.Item("My_Table")
'First row in the @My_Table table
userTable.Code = "A1"
userTable.Name = "A.1"
userTable.UserFields.Fields.Item("U_1stF").Value = "First row value"
userTable.Add()
'Second row in the @My_Table table
userTable.Code = "A2"
userTable.Name = "A.2"
userTable.UserFields.Fields.Item("U_1stF").Value = "Second row value"
userTable.Add()
This way I have added 2 lines in my table.
Hope it helps
Trinidad.
Maybe you are looking for
-
How do I move an action from one computer to another?
I have created a rather complex action on my laptop computer, and I'd like to copy it and move it to my desktop machine. How can I do that?
-
Using Adobe Acrobat Professional 7
Hello everyone, I am trying to make a pdf document from different scanning of my work. Some are text and some are art work, in either case, the material in each page is not centered it, and not all pages are the same size for some reason, even th
-
How to import multiple eBooks in a zip to iBooks?
A friend gave me about 500 ebooks to install on my iPad using iBooks. I've downloaded them and opened in both iZip and Zip Browser. I can't figure out how to select multiple files and import them all at once without manually importing each one indivi
-
BAPI for FV60 tcode parking (Vendor Invoic)
Hi All, I want to park Vendor invoice through FV60 tcode using BAPI I got one BAPI (BAPI_INCOMINGINVOICE_PARK), which is doing for incoming invoice i.e. MIR7 only. but it is not suitable for FV60. Please help me in finding BAPI for Vendor Invoic (FV6
-
Cannot display a named part of a HTML page
Hallo, I want to display a named part of a HTML page in a JEditorFrame. I have index.html and a part of it is named with <a name="label1"> My Java code looks as follows url = this.getClass().getResource("/Res/index.html#label1");However, I get n