Max User Defined Table Size
What is the maximum supported size for a SBO UDT? I have a table that has about 2 million rows in it. Making updates to this table through the SDK fails except for when I clear all rows from the table in a test environment.
Thank you!
HI Greg,
What error is thrown? And what query do you use? (could you provide some code) I don't know if there is a maximun rowcount for a table, but 2 million is quite much...
Kind regards,
Rowdy
Similar Messages
-
Error while linking user defined table to user defined field using vb6.0
Hi,
I am creating a userdefined field on a SAPB1 table(PDN1) using vb 6.0
I am trying to link this field to a user defined table.
When i do that i get the following error:
"The field 'Related table' should consist of 8 alphanumeric chracters with no valid or default values"
When i try to do the same thing from SAPB1(not using code) there is no such problem.
My vb code is as follows:
Set oUserFieldsMD = oCmp.GetBusinessObject(oUserFields)
oUserFieldsMD.TableName = "PDN1"
oUserFieldsMD.Name = "OB_Locn"
oUserFieldsMD.Description = "WH Location"
oUserFieldsMD.Type = db_Alpha
oUserFieldsMD.EditSize = 30
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
oCmp.GetLastError lErrCode, sErrMsg
MsgBox sErrMsg
GoTo Err_
End If
If Not oUserFieldsMD.GetByKey("PDN1", 0) Then
MsgBox "Error"
GoTo Err_
End If
oUserFieldsMD.LinkedTable = "OB_TEST"
lRetCode = oUserFieldsMD.Update
Your help will be much appreciated.
Thanks.Great Sébastien!
Looks like we could not survive here one day without your contribution
Best regards,
Frank
PS: For readers of this thread who don't understand why
EditSize
must be "8":
This is the size of the
Code
field in the user-defined table to which the new field OB_Locn (in the DB it will be U_OB_Locn) is linked to...
So, it should be preferrably of the same size. -
Help needed for data updation in User Defined Tables
Hello Experts,
I am developing one add-on in SAP B1 8.8 to input data in a User Defined Table described as under
Table Name
DriverMst UDT Type is No Object
Description
Stores the Driver master data which are used to get reference in Sale Delivery Form and Driver data management activity
User defined fields
Data Name
Data source
Size
Pane Level
Description
Driver Code
Code
Alphanumeric
0
No object table fixed field
System Name
Name
Alphanumeric
30
0
No object table fixed field
Full Name
FullName
Text
50
0
Father Name
FatherName
Text
50
0
Birth Date
BirthDate
Date
0
Phone Number
PhoneNo
Alphanumeric
50
0
Mobile No
MobileNo
Alphanumeric
13
0
I have created one form using screen painter displaying text boxes and bind them to the table.
This form is working absolutely fine when there are some data in table (i.e. Browse using navigation)
My problem is, when I click add button from tool bar the "OK" button turn to "Add" that means the form is set to Add mode, but when I click "Add" button after entering some data nothing happens and input data is not stored in Table. The same "OK" Button turned to "Update" when I do changes in loaded data, but my changes are not reflected to table after I click "Update".Thanks Nagarajan,
None.
There is no such query. The table fields is directly linked to Edit Box or Combo Box in form.
From the examples I learned that I have to do something like this to get my table updated
Dim oUsrTbl As SAPbobsCOM.UserTable
Dim Res As Integer
oUsrTbl = oCompany.UserTables.Item("DRIVERMST")
oUsrTbl.Code = oBPC.Value 'Item Specific of Driver Code Edit Box
oUsrTbl.Name = Left(oBPN.Value, 30) 'Item Specific of Name Edit Box
oUsrTbl.UserFields.Fields.Item("U_FullName").Value = oMFN.Value
oUsrTbl.UserFields.Fields.Item("U_FatherName").Value = oFTHN.Value
oUsrTbl.UserFields.Fields.Item("U_BirthDate").Value = oDOB.Value
oUsrTbl.UserFields.Fields.Item("U_PhoneNo").Value = oPHN.Value
(Similar For rest ofthe fields)
Res = oUsrTbl.Add()
Just let me know that is this necessary to do like above.. To be frank there are few more fields and matrices on the form which I didn't mentioned. I am just trying to get recovered from first step to proceed further.
Regards -
Hello Experts,
I created the User Defined Table in the name of SR NO where i entered the Docment No in Code Field (System generated default field).When i add the Document Number serially when i saved the UDT table then my serial sequence has changed.Could anyone help me out from these problem.
Regards
AmolHi Suraj,
These is my Query when i tried to run @PPC Table then it will not sort the Code & Name the details contain all the information.
If u have any query please ask.
SELECT T0.[Code], T0.[Name], T0.[U_0001] as 'Purchase Order No',T0.[U_0002] as 'Sr No', T0.[U_0003] as 'Item Code', T0.[U_0004] as 'Item Description' , T0.[U_9999] as 'Plan Qty', T0.[U_0005] as 'P O Qty', T0.[U_0006] as 'GRN No', T0.[U_0007] as 'GRN Date' , convert(varchar,T0.[U_0008]) as 'Batch Num',convert(varchar,T0.[U_0009]) as ' Heat Num', T0.[U_0010] as 'GRN Qty', convert(varchar,T0.[U_0011]) as 'RM Size',convert(varchar,T0.[U_0012]) as 'Length' , convert(varchar,T0.[U_0013]) as 'Pieces' , convert(varchar,T0.[U_0014]) as 'SO Num' , T0.[U_0015] as 'SO ROWNUM' , T0.[U_0016] as 'SO ItemCode' , T0.[U_0017] as 'SO Item Description' , T0.[U_0018] as 'SO Qty' , T0.[U_0019] as 'SUPP Name' , T0.[U_0020] as 'Cust Name', T0.[U_0021] as 'Open PO Qty' ,convert(varchar,T0.[U_0022]) as 'SO Tol Size' , T0.[U_0023] as 'SO Condition' , T0.[U_0024] as 'SO Size' , T0.[U_0025] as 'SO Length' , T0.[U_0026] as 'Remarks' , T0.[U_0027] as 'Planning Date' , convert(varchar,T0.[U_0028]) as 'SO Dia MM' , T0.[U_0029] as 'Plan Pieces' , T0.[U_0030] as 'Stock Condition' FROM [dbo].[@PPC] T0 ORDER BY T0.[U_0008]
Regards
Amol -
Dear Experts,
I would appriciate your advice on the sales budget screen that I am currently woking on.
the screen contains a matrix with a cfl on the product group column and a couple of columns stand for sale figures for each month.
this screen will be called form the BP form. so i would pass the selected BP code to my form.
I am not sure whether a user defined table is the answer to this job.
if i add productGroup,productCode,cardcode,Jan,Feb, ... user defined fields to this table then the system will add Code and Name fields automatically to this table, if the userdeined table is the right way to go for this job, what values i should held for the code and name fields considering both of these fields are stand alone primary key fields.
Many thanks.
Maryam.I usually load the same value into both fields, but since the code field is only eight bytes its kind of limiting. If you don't have any information to load in the table that would be unique, like a date or year field, (or your product code if its less than 9 bytes & will be unique) then a sequential number works fine. There are threads on this forum that show different ways to do it, but one way is basically to select max(code) from the table, convert the value to numeric, add one to it and then use it as the value for both fields.
Here's a link to a thread I posted with some code on the specifics of assigning the next sequential number as code and name:
[Re: Unique Value in Code and Name]
Edited by: John Chadwick on Sep 18, 2009 2:53 PM -
Hi everybody who has some spare time to read my stuff
I had a problem that some of you might have had. I have a user defined table, lets call it ProductTypes. Now system by default creates two columns in this table, one is Code (primary key) and another is Name (Index). I have added third column called Department. Now, if I wanted to add the following data (see bellow) to the table I would have had a constraint violation message pointing me out that I have problems with indexing.
Code, Name, Department
1, Cream, Fragrances
2, Cream, Beauty Products
^^
I could thing of couple workarounds of this problem
1. Is to duplicate Code into Name and storing rest of the data using user columns
Code, Name, Product Name, Department
1, 1,Cream, Fragrances
2, 2, Cream, Beauty Products
This approach isnt very convenient as it requires UI development should we decide to attach this table to the Item master data form in a form of combo box.
2. Is to amend Index on the database level. Initially, the index KProductTypes_Name consisted of only one column Name, what I have done is added another column which is Code to indexing. I dont see how this can harm database consistency or damage the core system. Please correct me if I am wrong.
Another way of amending index in order to solve my problem could be choosing ignoring duplicate values option for column Name.
Please let me know what are your thoughts.
Best wishes> Why don't you try adding a trigger 'instead of
> insert' where code = max(code)1 and name=max(name)1
> and use only user columns for your data. This
> provided you know SQL basics.
in this scenario we would have to do UI SDK development for the output and going to have an extra column with meaningless data in it. -
Practical limitations to user defined table
Hi all,
I am thinking of setting up a user defined table which will have 5 columns and around 45,000 rows. It will be used in a simple formatted search to retrieve the value in column 5 when the values in columns 3 and 4 match an item code and an invoice header code on an invoice.
Will a table of this size slow things down significantly?
Regards, David.Hi David,
It shouldn't be that slow, but if you're worried about performance, you can also add indexes (keys in SBO) to the UDT.
For that go to User-Defined Field - Managment (I'm using SBO 2007), select the table and press the button Keys. Make sure no one else is connected for you to add the index (not even an add-on), otherwise you'll get an error.
Hope this helps,
Ian -
How to pop-up a text box for a grid item on a user defined table?
Hello,
I have a user defined table with a grid & one of the columns is for comments. What I'm trying to do is to pop up a text box when double clicking in the column field. This would be the same as the Item Details column in the Sales Order ittems grid.
Thanks,
RonPlease post your question on SDK forum. Only SDK could meet your need.
Thanks,
Gordon -
Print Layout to User Defined Table
Hello guyz..
I want a make preprinted for my user query from user defined table where the header information is from another query.
I guess, the base template User Report (system) can only show the repetitve data from one query but the header area is not,
could you help, showing the header information from another query ??
Thanks RegardsRia
The word is that you cannot use the PLD with user defined tables (i wish it was possible). So in any case to do that you have to use third party tools such as Crystal Reports and Reporting Services -
How to create a Foreign key relationship between 2 user defined tables...
Hi Folks,
I have created two user defined tables... Where in i want to create foriegn key relationship between the 2 tables.... Can anyone guide the step by step procedure to do this scenario...
Any help would be highly appreciated...
ThanksHi
1. In the 2nd table call the field of the 1st table which is a primary key.
2. Give the same field and dataelement name.
3. Select that field and then click on the foreign key field icon which is beside Search Help button.
4. Then give short text, and the 1st table name.
5. Then in the below box give the 2nd table name and 2nd table field name which you have called from 1st table.
6. Then click on copy, then u will be able to see Check table name and check table field name beside foreign key table name.
7. Then again click on copy.
Regards
Haritha. -
How to fill the records from a User Define Table to PO item Grid
Hi To all,
I need to fill data from User Define table records into Purchase Order Item Grid.
I created an UDF Filed in PO - Header Part - "PRS"(Filed Name)
By using Formatted Search in itemcode column, i called a query,
"Select itemcode, qty from (@user define tablename) where PRS = $http://OPOR.U_PRS"
For eg:
Output from querry
ItemCode Qty
ABC 1
DEF 2
DFG 7
SDGD 9
By using formatted search it is filling only first data in to itemcode column in PO Grid.
Please help, how can i fill ALL the data in to my PO Grid?
Thanks in Advance
SAGARThe easisest way is to create datasource and the result bind to grid.
Datasource:
oDBDataSource = oForm.DataSources.DBDataSources.Add("@usertablename")
Dim xoConditions As SAPbouiCOM.Conditions
Dim xoCondition As SAPbouiCOM.Condition
xoConditions = New SAPbouiCOM.Conditions
xoCondition = xoConditions.Add
xoCondition.BracketOpenNum = 1
xoCondition.Alias = "u_zn"
xoCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
xoCondition.CondVal = "cond"
xoCondition.BracketCloseNum = 1
oDBDataSource.Query(xoConditions)
binding (example for matrix, in grid is simillar)
oMatrix.Clear()
Dim cols As SAPbouiCOM.Columns
Dim column As SAPbouiCOM.Column
cols = oMatrix.Columns
column = cols.Item("colX")
column.DataBind.SetBound(True, "@usertable", "u_x")
oMatrix.LoadFromDataSource()
hoep it helps
Petr -
Error creating user defined tables: Ref count (-1120)
Hi all !
I have to create user defined tables per code, so I wrote <b>2 main functions</b>, first <i>to create a table</i> (with TableName,TableType and TableDescription properties)and and <i>second to add fields</i> (to a certain table which is sent as parameter).
I call these functions to create multiple tables. For the first 6 tables it works totally ok. But beginning from the 7th table it gives that "<b>Ref count for this object is higher then 0.</b> " (-1120) error. All parameters are ok just as the first 6 tables.
Found such an explanation like below in help files.
<i>The DI API allows only one instance of a meta data object at a time. This maintains data integrity by preventing any manipulation of a business object while modifying the object's user fields. Therefore, verify that no other DI object is active except the meta data object.</i>
But why do I get such an error after sixth call of the function (but not beginning from the second table )?Gül,
Have you tried doing some grbage collection?
Search for a topic: "Add Usertables and Fields while having a recordset"
HTH
Juha -
Error while adding records in user defined table
Dear all,
I am adding a record in user defined table using .add() method. the code is given below. while adding it raises the following error
"-1[Microsoft] [SQL Native Client] [SQL Server] Conversion failed when converting the nvarchar value '-3 @BG_MAILSETTINGS' to data type int. (CINF). "
All the fields are varchar date type.
Dim oUDT As SAPbobsCOM.UserTable
oUDT = oCompany.UserTables.Item("BG_MAILSETTINGS")
With oForm.DataSources.UserDataSources
oUDT.Code = "1"
oUDT.Name = "SMTPSERVER"
oUDT.UserFields.Fields.Item("U_SERVER").Value = .Item("EDTSMTPSVR").ValueEx
oUDT.UserFields.Fields.Item("U_EMAIL").Value = .Item("EDTFEMAIL").ValueEx
oUDT.UserFields.Fields.Item("U_PORT").Value = .Item("EDTSMTPPRT").ValueEx
oUDT.UserFields.Fields.Item("U_USERNAME").Value = .Item("EDTSMTPUSR").ValueEx
oUDT.UserFields.Fields.Item("U_PASSWORD").Value = .Item("EDTSMTPPWD").ValueEx
oUDT.UserFields.Fields.Item("U_AUTHENT").Value = .Item("CMBSMTPAUT").ValueEx
K = oUDT.Add
If K <> 0 Then
oCompany.GetLastError(iErrCode, sErrMsg)
MsgBox(CStr(iErrCode) & "-" & sErrMsg, vbCritical, "Error")
Exit Sub
End If
End with
Could any one please say the solution for this.
Many thanks,
Manikandan.
Edited by: Rui Pereira on Dec 23, 2008 3:49 PMDear Manikandan P,
Is there any change and check in stored procedure SBO_SP_TransactionNotification?
Best Regards
Jane Jing
SAP Business One Forums team
Edited by: Rui Pereira on Dec 23, 2008 3:56 PM -
DI error when binding user defined table
Hi,
I am using matrix. Im binding a User defined table '@NEW' to a Datasource
oForm.DataSources.DBDataSources.Add("@NEW")
I also bind the fields to column of the matrix as given below
oColumn = oColumns.Item("CodeNo")
oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
When the table @New contains no records i get error while binding the fields to the matrix.
I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
Can anyone help me?Hi,
I am using matrix. Im binding a User defined table '@NEW' to a Datasource
oForm.DataSources.DBDataSources.Add("@NEW")
I also bind the fields to column of the matrix as given below
oColumn = oColumns.Item("CodeNo")
oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
When the table @New contains no records i get error while binding the fields to the matrix.
I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
Can anyone help me? -
Creating user defined table in SBO-COMMON
Hello experts,
I'd like to create a user defined table in SBO-COMMON. I'll tell you why:
I have successfully created a SAP B1 addon which adds freight costs to an order if the total amount is under a certain threshold. We have 2 administrations running, a live one and a test administration. We have put the connectionstring to determine the expense code of the freight costs in the exe.config-file of the addon.
We want to be able to point the addon from one administration to the other by modifying only one value, a centralized value, independent of SAP administration. The most proper way to do that in my opinion is to put it in SBO-COMMON and the only logical way to do that is a user defined table in SBO-COMMON.
Is there such a way?
My alternative is to abuse another database on the server and just add the info there, but I'd prefer to store it in SBO-COMMON.
Thanks for your time!
VincentUDT cannot be created in sbo-common. You may create new db and work with table in this db (but it will be not UDT, but standard sql table), or create new company db only for this purposes and create UDT there.
Maybe you are looking for
-
Screen Resolution is "Out of Scan Range" -- Need Help Re-Setting
My daughter accidentally set her screen resolution on her Mac Mini too high for the Sony monitor we have attached. The screen went blank and then flashed "Out of Scan Range", at which time she then confirmed the higher setting by hitting "return". So
-
I am trying to pass arguments to a BPL method using the 'RUN_ITEM' action. I set up the arguments (argument1 and argument2) in the 'reply' task. The task runs fine, however the arguments are not getting passed. My HTML form code is as follows: <br> <
-
How to transfer pictures to an iPad which belongs to someone else?
I have tonnes of pictures of my nephews on my iphoto from my iphone4... but I do not know how to transfer all those pictures, of my nephews, to my sister's iPad1!!! I do not want to sync my sis's iPad to my itunes or anything, just simply want to tra
-
Develop module, camera calibration, Fuji X Pro 1 Camera Profiles question
In Lightroom 5.3 with camera raw 8.3, for my Fuji X Pro 1 lightroom is only showing "Adobe Standard." Is there a way to have it recognize the various shooting modes on the camera? The initial raw preview looks awesome, but as soon as lightroom builds
-
When is new version of i mac due for release
When is new version of I mac due for release