User-defined field in existing table
Hello,
I would like to know if it is possible to add a user-defined field in an existing table.
Actually, I would like to add a combobox with other types of partners than vendors, customers and leads and add a user-defined field in the OCRD table.
Thank you
Regards,
Thibault
Hello,
Your answers help me a lot !
My code is working, i.e. when I create a new BP and choose another type in my comboBox, the information is saved.
When I search a BP who has this type, SAP find the good BP.
But, I don't see where the data is stored, I don't see anything which make the difference between 2 BP with 2 different types in the OCRD table.
So, where SAP can make the difference?
Thank you
Regards,
Thibault
Message was edited by: Thibault Romieu
Similar Messages
-
Linking a User Defined Field in Items table
How to Link a User Defined Field in 'Item Master Data' table, to my own User Defined Table?
Example:
In Item Master Data table, I want to add 3 User Defined Fields, for e.g, Country, State and Region.
When the value of Country combo is changed, values loaded in State and Region combos should change automatically.
I'm storing the relationship between Country,State and Region in my own user defined table. I want to load the comboboxes with a query from that table.
Or, if there's no solution to the above problem:
when the Item Master data table is opened, can we launch our own form?
Is there a way to specify that?
Please reply me back.. I'm a beginner learning SAP.
With Thanks in advance,
Geetha
Key: Loading a user defined field through Query defined by us.Geetha,
You should search this forum on user defined fields as you will find many posts that may assist you with your question.
HTH,
Eddy -
User defined field with Linked Table property
Hi All,
I know this has been posted several times but I cannot get this to work. I am trying to add a user defined field and link it to a table.
I am getting the error "The field 'Related Table' should consist of 8 alphanumeric characters with no valid or default values "
Everything I check says that the code I am using is correct. Is it possible the problem is that I am trying to connect to an SAP table instead of a user defined table. Is it possible to link a user defined field to an SAP table?
My code below:
oUserFieldsMD.TableName = "OITM"
oUserFieldsMD.Name = "SHP"
oUserFieldsMD.Description = "Must ship via"
oUserFieldsMD.LinkedTable = "OSHP"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_None
oUserFieldsMD.EditSize = 8
oUserFieldsMD.Size = 8
oUserFieldsMD.Mandatory = SAPbobsCOM.BoYesNoEnum.tNO
Thanks
KarenHello Karen,
you cannot link a userfield to a system table. it has to be link to a user table.
oUserFieldsMD.LinkedTable = "OSHP"
when you have error, just try to do it using the same value in the application. If you cannot do it, it means you cannot do it neither with the DI
Sebastien -
User-Defined Fields and Form Settings
I have a User-Defined Field in the table "OCLG" and I'd like to show it in the "Activities Overview for Business Partner - xxx" window.
Is possibile to do that by the "Form Settings" window? Here I don't find U-D Fields. Is there a way to show them?
Or is there an other solution?Hi,
This report is hardcoded. You need to create your own report for it. Better by Crystal Report.
Thanks,
Gordon -
User Defined Fields on System Form
Dear All,
I want to know that how much User Defined Fields can be added on a system form. My problem is that I am developing an add-on for the Item Master Data. And I have used a lot of User Defined Fields on Item Master Data Forms which contains table 'OITM'. Now if I am trying to add any extra User Defined fields in OITM Table, I am not able to do so. I am getting an error as 'Internal Error Occurred'. What can i do regarding this problem.? Help me. It is something very important.
Thanks and RegardsHi,
There is theoretically no limit on the number of UDF for a table. there is however a maximum number of characters for a record in SQL Sever.
As far as I know this is 4000 in SQL Server 2005 and older and 8000 in SQL Server 2008.
pls check Microsoft for the exact numbers
Regards
Ad -
Cannot remove user define fields
Hi,
I am trying to remove a user defined field (U_Prirev) in Table (OHEM) and am getting the following error:
Ref count for this object in higher then 0. Error No -1120
The code is as follows :
Dim sRequete As String
Dim errCode As Long
Dim errMsg As String
Dim IdField As Integer
Dim oUFields As SAPbobsCOM.UserFieldsMD
oUFields = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
Dim oRecordSet As SAPbobsCOM.Recordset
oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
sRequete = "SELECT FieldID FROM CUFD where TableId = '" & pNomTable & _
"' and AliasID = '" & pNomChamp & "'"
oRecordSet.DoQuery(sRequete)
If (oRecordSet.EoF = False) Then
IdField = CType(oRecordSet.Fields.Item(0).Value, Integer))
If (oUFields.GetByKey(pNomTable, IdField) = True) Then
If (oUFields.Remove() <> 0) Then
oCompany.GetLastError(errCode, errMsg)
Console.WriteLine("Erreur => Code = " & errCode.ToString + " Message = " + errMsg)
End If
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUFields)
oRecordSet = Nothing
End Sub
Anyone knows why i am getting this error.
Thanks
Laurent.Hi Laurent
That error you are getting is the error that you get is when there is more than one instance of meta data object open. You see only one metedata object can be open at a time.....if it's higher than zero it means others are available. I see you have,
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUFields)
oRecordSet = Nothing
this is good and what closes the meta data object. But check that you have done this in previous funtions where you might of added other things.Also your recordset, close it before adding.....move oRecordSet = Nothing to before your Remove of the field. that has be the case for me before. Do it without the recordset as a test and you'll see it works.
Hope it helps -
User defined field that looks up a system table?
I want to create a user defined field that looks up parts in the items table (i.e. OITM).
I know I can use a formatted search and that works, but I don't want users to be able to edit the field after the item has been looked up and pasted into the field.
In the user defined field menu, there doesn't seem to be a solution to this. The only solution I can think of is to create a user defined table and then move over the items, and then periodically have the table be updated from the master item table (OITM).
Thoughts?Here is the stored procedure I wrote, but it doesn't seem to work:
IF @transaction_type IN ('A', 'U') AND @Object_type = '97'
BEGIN
IF NOT EXISTS (SELECT T0.ItemCode, T1.U_Part FROM [dbo].[OITM] T0, [dbo].[OOPR] T1
WHERE T0.ItemCode = T1.U_Part AND T1.DocEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @error = 1, @error_message = 'Testing'
END
END
So basically, I have a UDF called U_Part in the Sales Opportunity form, which will have a formatted search to look up parts, but if a user changes the text to something else (which is possible because it's a basic text field), then this should look up what is in that UDF and check it against the Item Master and give an error if it doesn't exist. However it isn't doing anything.
Any ideas?
Edited by: Gary Rey on Jan 21, 2009 4:56 PM -
How I know if a user define field exist?
Hi,
I need to add a user define field to the business partner table using the SDK. Before I add the field I would like to create a condition to know if the field exist.
I will appreciate any help
Thanks.Dear Rafael ...
If you want to check whether there're any user fields you can use recordset to look for the name of field in CUFD table. Here with I enclose example to Look for Fields "ColorID" in "@MSI_COLOR" Table .
===============================================
Private Function CheckUserFields() As Boolean
oRecordset.DoQuery "select count(*) from CUFD where TableId='@MSI_COLOR' And AliasID='ColorID' "
If oRecordset.Fields(0).Value > 0 Then
CheckUserFields = True
Else
CheckUserFields = False
End If
End Function
======================================
You can use that function ...
If CheckUserFields = True then
Else
oSboApplication.messagebox "Field Colot Is Not Found in SAP B1 "
End If
Hopefully can helps
Regards,
Hamdi -
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 -
User Defined Fields & Tables Problem
After the upgrade to B1 2007 and converting our database to 2005 compatibility as per the upgrade directions, were having some weird issues with our user defined fields and tables.
Our user defined fields that used to be alpha-numeric when set up in B1 are now in the database as nvarchar(MAX), even after updating the fields in the Manage User Defined Fields screen. B1 is obviously not setting the right field information as per its interface.
Were can no longer add records to user defined tables through the B1 interface, though we can add them fine through SQL Server or an ODBC interface. The error we are getting is
[Microsoft][SQL Native Client][SQL Server]Conversion failed when converting the nvarchar value '-3 @PASSWORDS' to data type int. (CINF)
. I dont understand where this problem is coming from because there isnt even a data field that is an integer, so I dont know what its trying to convert.Derek,
I would suggest you post this question to SAP Support by creating a message. Also search for any notes on this from https://websmp201.sap-ag.de/notes
Suda -
User defined field insertion problem in Stock Taking Report (PLD)
We are creating one PLD for one of our customer for Stock Taking Report by modifying the existing sytem report. We will insert two user defined fields (Rack & Bin) from OITW table and link these with the warehouse code field which is at report header as there are different warehouse for the item and material is kept in different rank and bin in different warehouse. But after inserting these fields we found that repetative area becomes blank in the report.
So please let us know how to overcome this problem.
Thanks & with regards.
Aloke
Edited by: ALOKE BANDYOPADHYAY on Sep 4, 2010 4:42 PMHi Aloke,
This PLD is one of the hard coded PLD. You are not able to add UDF freely. I believe you may only add UDF from OITM table. Try you own report instead.
Thanks,
Gordon -
User defined fields via DI-API
I want to read user defined fields using the DI-API.
The following code works but lists only UDFs defined for articles:
SAPbobsCOM.Items item =
(SAPbobsCOM.Items) GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
int count = item.UserFields.Fields.Count;
MessageBox.Show("count == "+anzahl.ToString(), "OK");
for(int i=0; i<count; i++){
MessageBox.Show("index == "+i.ToString(), "OK");
MessageBox.Show("name == "+item.UserFields.Fields.Item(i).Name, "OK");
If I try to list all UDFs defined in the system using the oUserFields object I get an exception when I assign the business object:
try{
SAPbobsCOM.UserFields ufd = (SAPbobsCOM.UserFields)
GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields); // exception
int count = ufd.Fields.Count;
catch(System.Exception ex){
MessageBox.Show("ex.ToString(), "OK");
The exception says something like
InvalidCastException: COM object of type 'System.__ComObject' can not casted into
interface type SAPbobsCOM.UserFields
Thank you for help,
Frank RomeniHi Vítor,
thank you for the hint to UserFieldsMD - now the access works.
You wanted to know what I am trying to do - let me explain the background even it is a bit complicated:
I have to access a certain UDF defined for articles.
To access this UDF I can't use a fixed index like e.g. '5' in
item.UserFields.Fields.Item(5).Value
because this index is 5 only on my local machine - it could be a different index on the target machine.
I solved this in writing some sql-code to access table CUFD and to find the index of this UDF in CUFD.FieldID.
But sometimes there is a problem when there are UDFs deleted from the database. It is possible that there are 'holes' between the FieldId of UDFs of one object, e.g.
Initial entries in CUFD (Table, FieldId, Name => code to access field):
OITM 0 'myUDF1' ==> item.UserFields.Fields.Item(0).Value
OITM 1 'myUDF2' ==> item.UserFields.Fields.Item(1).Value
OITM 2 'myUDF3' ==> item.UserFields.Fields.Item(2).Value
After deletion of 'myUDF2':
OITM 0 'myUDF1'
OITM 2 'myUDF3'
Now the access to 'myUDF2' with item.UserFields.Fields.Item(2).Value fails!
You have to use index '1' in .Item(index) to access 'myUDF2' because this UDF is now the second UDF in the item object (zero based).
After I realized this I didn't use the sql-code to get FieldID any longer and searched with a loop all existing indices and compared them with the name of my special UDF, e.g. (this code works as expected):
public int getUDFIndex(string udfName){
index = -1;
for(int i=0; i<item.UserFields.Fields.Count; i++{
if(item.UserFields.Fields.Item(i).Name == udfName){
index = i;
break;
return index;
Now I tried to make this method more general to find UDFs in any object - not only in item objects.
This is the background I wanted to access SAPbobsCOM.UserFields for.
The problem is that UserFieldsMD has no method like Item(index) as I used it in my example.
Do you have an idea to solve the problem with the 'holes' between FieldId in the UFD-table CUFD?
Frank Romeni -
User Defined Field in Material master
Hi Friends,
Can we add any user defined fields in any views in material master (preferably with F4 help)
If so, please let me know how to do it and its impact.
Regards
RamHi Ramachandran,
Of course.
1. If there is an existing Material Class, use it, unless modifying that class interferes with existing business processes. Otherwise create a new class using CL01. Use class type 001.
2. Create a characteristic using CT04 that represents your new field. The characteristic will be your new field name and the description will be the description.
3. Using CL02, assign the characteristic to the existing material class, or to the new one you just created in step 1.
4. If this is a new system, you will have to create user instructions as to how to maintain the field. The field will exist in the Classification view of the Material master in MM01/02/03, and the contents can be edited just like any field.
5. If this is an existing system, you will have to populate this field in all of the existing material masters. Depending on the size and complexity of data, you may have to create a Legacy System Migration Workbench (transaction LSMW) project to bring all the fields up to date.
As far as F4 help, depends on where you want to see it. Within the classification view of the material master, it is possible to establish a validation in CT04 that will require your users to pick from an established validation list when they select the F4 key. If you want F4 help in other places, you should consult your ABAP'ers, who should be able to set this up for you.
Impact of a new characteristic/class is zero. Impact of adding a characteristic to an existing class is dependent on your current use of the existing classes. Writing reports which use these data is a well understood technique within the ABAP community. Although the field will not exist in MARA table, it can still give you the same functionality as if it did.
I do not recommend that you add a field to MARA, even though this is possible. Although hotpack upgrades will leave a customer generated MARA field alone, whatever functionality you create to use this new field will be endangered with every OSS note and every hotpack upgrade you install. Since Characteristics and Classes are considered master data, SAP hotpacks pretty much leave them alone.
Regards,
DB49 -
User Defined Field Print Layout Designer print problem
I am having a problem with a user defined field in the Business Partner - Addresses table. The user defined field is a "directions" text field that is intended to print on packing slips generated from the sales order. When I use the PLD to add the UDF in the header or in the table, all data lines in the body of the report repeat.
Please advise if others are seeing this and what work around or SAP plans exist to resolve.
Glen Kinney
Corrpac
[email protected]Hi Glen,
I am facing the same problem.
I need to add UDFs in Business Partners - Addresses at row level. The field will be used for some Taxation Nos. like CST, LST, VAT. I have tried to add. the fields are added and data saved too.
But when I am going to PLD of Invoice and tried to get, the Business Partners - Addresses Table not showing in the list.
Shell I have your help to resolve this.
Thanks a lot.
With Warm Regards,
Chintesh Soni
India -
I can't see the user-defined fields I'm supposed to - where are they?
Following a recent CACI release upgrade users are expecting to see several user-defined fields within student details in the Enrolments Universe but we can't. Following upgrades, do I need to refresh or run something that'll encorporate any new additions to the existing tables?
Apologies, but this is the 1st time I have had to do this.
regards,
StevenHi,
which version of BOB are you talking about here? Did you already made your changes to the universe and exported it in your repository? What kind of reporting tool (WebI, DeskI, CR) are you using?
Regards,
Stratos
Maybe you are looking for
-
Single Sign On (SSO) Internet Access via ASA
Good Afternoon, I'm looking for a way for users to authenticate through the ASA to determine whether or not they are granted access to the Internet. I would like to provide two separate Active Directory groups, for example, GRP-NO-INTERNET and GRP-IN
-
Read and display the field values in the table control
Hi Experts, I am new to the Table Control. I have created table control using the wizard where i have mentioned the ztable while creating which consist of the following fields. Item Number Material number Material Description Net Price. I would like
-
V$session and v$process
Hi, OS : Red hat 4.2/5 and Aix 5 Db : 10 1,What is the difference between terminal and machine in V$SESSION. SQL> select terminal,machine from v$session where username='SCOTT'; TERMINAL MACHINE pts/34 tctm-x001.it1.com pts/0 tctm-x001.it1.com SQL> 2,
-
Just installed my C309 printer. Photo pages printed beautifully. But I can't get a simply Word document to print. The first copy came out VERY light with most lines missing. The second was nearly blank. The third completely blank. But nothing
-
I have a MacBook Pro laptop and after I followed your advice I constantly get a message that reads, "Alert! This update requires Mac OS X version 10.6. My latest version is 10.8.2. It is too late for me to phone AppleCare. Community, please help with