User Field as Integer Identity
Hi guys, Has anyone a solution to how to add a user table, and then add a field to use as the primary key with the identity set on it? If I go into the database and set this manually then each time we patch SBO then the identity will be lost right?
Hi,
The SAP business One policy is not to allow any changes in DB.
At the moment - You can keep a primary key behavior in DB using your code.
Sorry,
Yaniv G.
SDK Consultant
SAP Manage Israel.
Similar Messages
-
Hide a user field from the masks of SAP with SDK
Hello everyone,
how I can hide a user field on a form?
I think there are two solutions:
1) I can use the event "Form_Load" and change the property "visible" for the user field (bad)
2) I think the best solution is to modify the configurations of the form, hiding the field for all users.
I tried this with the example I write below, but the addon correctly change the values in the table "CPRF", but still shows the SAP field and then when I close the program, the values are reset again.
I ask your help please. How I can do?
thanks
Info
SAP 8.81 PL09
SQL2008 DB
Dim frmPref As FormPreferencesService
Dim colPrefs As ColumnsPreferences
Dim colPrefsPrm As ColumnsPreferencesParams
Dim col As SAPbobsCOM.ColumnPreferences = Nothing
'_SboCy ==> SAPbobsCOM.Company
'_sboCys ==> SAPbobsCOM.CompanyService
'get Form Preferences Service
frmPref = CType(_sboCys.GetBusinessService(ServiceTypes.FormPreferencesService), FormPreferencesService)
'get Columns Preferences Params
colPrefsPrm = CType(frmPref.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams), ColumnsPreferencesParams)
'set the form id (e.g. A/R invoice=133)
colPrefsPrm.FormID = "-139"
'set the user id (e.g manager= 1)
colPrefsPrm.User = 1
'get the Columns Preferences according to the formId & user id
colPrefs = frmPref.GetColumnsPreferences(colPrefsPrm)
Dim exist As Boolean = False
'change the width of all the visible items
For i As Integer = 0 To colPrefs.Count - 1
If colPrefs.Item(i).ItemNumber = "U_MYFIELD" Then
colPrefs.Item(i).VisibleInForm = BoYesNoEnum.tNO
colPrefs.Item(i).EditableInForm = BoYesNoEnum.tNO
exist = True
Exit For
End If
Next
If Not exist Then
col = colPrefs.Add
col.Column = "-1"
col.EditableInExpanded = BoYesNoEnum.tNO
col.EditableInForm = BoYesNoEnum.tNO
col.FormID = "-139"
col.User = 1
col.ExpandedIndex = 1
col.Width = 0
col.VisibleInExpanded = BoYesNoEnum.tNO
col.VisibleInForm = BoYesNoEnum.tNO
col.ItemNumber = "U_MYFIELD"
End If
'Update
frmPref.UpdateColumnsPreferences(colPrefsPrm, colPrefs)
NothingObj(CObj(col))
NothingObj(CObj(frmPref))
NothingObj(CObj(colPrefs))
NothingObj(CObj(colPrefsPrm))Hello Joris,
I searched on help.sap.com and found the following link, it provides the constraints LDAP and UME sync has.
http://help.sap.com/saphelp_nw70/helpdata/EN/48/d1d13f7fb44c21e10000000a1550b0/frameset.htm
Regards,
Siddhesh -
Update document lines user fields
Hi,
I'm trying to update a user field of a purchase invoice line through the DI API.
The Update method returns 0, but the field isn't updated!
I use this code:
Dim RetVal As Integer
Dim Doc As SAPbobsCOM.Documents = DirectCast(Company.GetBusinessObject(oPurchaseInvoices), SAPbobsCOM.Documents)
If Doc.GetByKey(_CurrentDocId) Then
Doc.Lines.SetCurrentLine(0)
Doc.Lines.UserFields.Fields.Item("U_CONAI").Value = "Y"
Doc.UserFields.Fields.Item("U_IB_OldProtI").Value = 987
RetVal = Doc.Update()
If RetVal <> 0 Then Beep()
End If
Updating a user field on the document (not on the lines) works fine!
Can anyone help me please?
I'm using SAP 8.8 SP 0 PL 11
Thank you
PaoloHi Paolo,
I think the reason behind the inability to change document row data, and also most of the header data, is due to both legal requirements and information transparency (mainly accounting, stock and taxes).
I share your view that the update function should return a value other then 0 when the document is not updated. You can suggest this change by opening a post in the Product Development Collaboration forum.
Kind Regards,
Vítor Vieira -
How to add Valid values in user field?
Hi,
I'm trying to add a user field (valid values) in my user table, but i don't know what's wrong with my code.
It creates the field, but not the field that i want.
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = sTableName
oUserFieldsMD.Name = sFieldName
oUserFieldsMD.Description = sDescription
oUserFieldsMD.Type = FieldType
oUserFieldsMD.Size = iSize
'Valid Values 1
oUserFieldsMD.ValidValues.Value = "D"
oUserFieldsMD.ValidValues.Description = "Disable"
oUserFieldsMD.ValidValues.Add()
oUserFieldsMD.DefaultValue = "D"
'Valid Values 2
oUserFieldsMD.ValidValues.Value = "A"
oUserFieldsMD.ValidValues.Description = "Active"
oUserFieldsMD.ValidValues.Add()
Dim i As Integer
Dim err As String
i = oUserFieldsMD.Add()
If i <> 0 Then
oCompany.GetLastError(i, err)
SBO_Application.MessageBox(i & "; " & err)
End If
BruceHi Bruce
It looks good, just take out the second one "UserFieldsMD.ValidValues.Add()". Leave the first one. Just take out the second one after oUserFieldsMD.ValidValues.Description = "Active"
Hope this helps -
Query help needed for Sales order panel user field query.
I have a user defined form field on sales order row level called = U_DEPFEEAMT
1, I would like this field to get the value from a field on this sales order row level multiplied by what is in point 2 below. The details of field in point 1 is :
Form=139, item=38, pane=1, column=10002117, and row=1
2. The contents in field 1 should be multiplied by a value coming from another user field linked to OITM master item.
The details of user field attached to OITM is :
OITM.U_DepositFeeON
Appreciate your help.
Thank you.Try this one:
SELECT T0.U_DepositFeeON*$[$38.10002117.number\]
FROM dbo.OITM T0
WHERE T0.ItemCode = $[$38.1.0\]
Thanks,
Gordon -
Custom exit or badi for changing the user fields in operation of process order
Hi all
I want to find a exit or badi to set default value to the user fields in operation of process order when COR1.
I have tried exit 'PPCO0001', but this exit is call after commit work, so I can not change any thing
I also tried to use badi 'workorder_update', 'before_update', but all parameters in this BADI are importing, can't be changed, I've tried to change it and then program dump.
Do you have any solution for this question?
ThanksDo a Implicit Enhancement at the PBO of this subscreen.
-
How to get an user field in a sap form
SBO2004
I'm trying to get an user field in a sap form(651).
My code is:
Dim FrmT As SAPbouiCOM.Form
Dim Itm As SAPbouiCOM.Item
FrmT = GestorSAP.SBO_Application.Forms.GetForm("651", 1)
If (Not FrmT Is Nothing) Then
Itm = FrmT.Items.Item("U_Project")
End If
Frmt is not nothing, but itm is ever nothing and gives me an exception(item not valid). If i go to sap and look at this form, with debugging info activated, i see:
Form=651 Itm=U_Project Variable=1 OCLG,U_Project
What am i ding wrong?Hi Miguel Angel.
Try with form "-651".
UDF form is the negative sap form.
HTH
Juli
P.S:I'm not sure your code works, I never work with GetForm method, but yes with UDF form -
Change not done in the user fields of operation for production order save
Hi Experts
I need to change the user fields of the operation like (SLWID and USR00 )for a production order at the time of save.
So am using the exit PPCO0001 and using the OPERATION_TABLE internal table in the exit to chang the details.
I have done coding in the exit to change SLWID and USR00 in OPERATION_TABLE internal table, but its not updated in the database and the screen also. I dont understand why.
Please let me know, why the update are not happening.
Thanks in advance.
Regards
RajaramWhy Update is not happening in PPCO0001.
Please let me know your views.
Thanks in advance. -
Added user field to CJI3 - missing in column set until post
Hello,
We added a user field to the CJI3 report using these instructions:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/400fbf3d-4be0-2d10-2d85-bbaf27f72258?QuickLink=index&overridelayout=true&49563922669358
We added a user defined field in our WBS structure, PRPS-USR001, to the CJI3 report.
On page 8 it says that once the change is made, the column will become availble. We haven't found that to be the case. What I found was that the field does not show up until 1) there is a value in it for a project and 2) there has been a new posting to that particular WBS element.
So it appears that after we update the master data for the particular WBS on each project, we will not be able to use the data in CJI3 until there is a posting to that WBS element for each relevant project.
Is there any way to "activate" or "push" SAP such that once the master data is updated in the project it is available in CJI3? Or do we have to wait until something has been posted to that WBS? Historically there are postings to the WBS but it doesn't appear in CJI3 until there is a new posting since we updated the field.
Thanks much,
AndreaHi Andrea
cji3 is the actual cost/revenue line item report of ps. In order for the new column to appear you need to satisfy both pre-requisites:
1.actual line item in your wbs
2.the user field to have a value.
If you satisfy just one of the pre-req's i am afraid you will not get it in your cji3 output.
Hope it helps somehow
Panagiotis -
User-Exit or BADI for USER FIELD in C201 or C202
Dear Experts,
SAP has made provision of USER FIELDs in C201 / C202 (Create/Change Master Recipe: Operation), which is saved in PLPO table.
By applying logic, for each operation I want to create a Phantom part and update values in this user fields at the time of SAVE.
Is there any BADIs, User-Exit or any standard way available which is called at the time of Recipe Create / Change?
Or Should i go through Implicit Enhancement for the same?
With Regards,
Kaushik SavaliyaHi Kaushik,
Please check these Function exits.
EXIT_SAPLCPDO_001 -PS: User fields
EXIT_SAPLCPDO_002 -PS: Customer specific fields in process (standard net)
EXIT_SAPLCPDO_003 -PS: Customer specific fields in process (standard net)
Hope it helps. -
How to make a User Field Read Only?
Hi,
How can i make a title userfield in a Document Form read only?
I can't set enabled to false i just want to make it read only.
I had tried to capture de key_down event on the user field, nothing happens!
I had tried to capture de form_key_down event on the user field... SAP throws the event without the item id reference.
Is there a work-around for this?
thanks,
Ricardo MommHi,
1. capture et_click and click to another item, also save the original value to a variable
and/or
2. use et_validate with before_action = true to be sure the item hasnt changed and set bubbleevent
to false when the value is different from the variable
regards
David -
Hi Every body,
Please this is very argent I'm searching for this problem sine a week with no success
how can I update a user field (single and multi) using ListItemFormUpdateValue object and ValidateUpdateListItem method
Thanks in Advance
khatib7Hi,
Seems there are already replies in your another similar thread about this issue:
https://social.technet.microsoft.com/Forums/en-US/5e67dc3d-c808-49ee-9aab-383a5cea5bce/sharepoint-angulr-rest-api-update-file-item-userd-field-property?forum=sharepointdevelopment
Please check whether they are helpful to you.
Thanks
Patrick Liang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Question about Web Shop, Reference User field.
Hello,
In web shop, under General Settings tab, should there be User Management tab?
I need to enter the B2CREFUSER which I created in Reference User field.
Or is that field removed now?
Thanks,
HarshaHi Harsha,
The particular field is no more available in webshop, if u want ot provide ur reference user u have to assign the refernce user in CRM Customising in the following path -
IMG-- CRM--- Ecommerce -internet user--Assign refernce user for internet user B2C
Hope this helps.
Regards
Bala -
Copy user fields between PRq and PO.
Hello.
I have little problem.
I prepare new user field in Purchase Requisition called for example ZFIELD it is displayed and save into table EBAN by user exit MEREQ001. Now I want to copy this field to Purchase Order when I create PO with reference to PRq. How to do that? I can't find any user exit or badi
The new field is prepare at item level in Preq and I want to copy it to PO at item level also.
I have extend table EKPO.
Thank you for any help.
A.J.Hi,
Implement the BADI 'ME_REQ_OI_EXT'.
This may help to your requirement
regards,
Siva -
hi,
i want to copy entry invoice description field of a single article code ( description change for lines) in a user field that's i've created in creation serial numbers form when i insert manual serial number. anyone can help me? thanksYou will need to create a formatted search to a column at the Invoice row. The formatted search will insert the ItemCode, Description, Currentlogged User, Invoice No to a temp table.
In the Serial Number screen you will attach another FMS which will read the Item desciption from this temp table.
If the Item Description does not change in every document and is the same as the Item Master, you can simple read it from the Item Master without any of the above procedures.
SELECT T0.ITEMNAME FROM [DBO\].[OITM\] T0 WHERE T0.ITEMCODE = $\[$5.17.0]
Note: ItemCode column should be visible in the Available Serial Number window
Maybe you are looking for
-
In adobe camera raw, what metadata field needs to be filled in so that if an image is uploaded to facebook by a customer, your copyright/info shows up?
-
well Im having problems with my Java im doing a cource which I just want to pass and Ive got a little problem. I was going to hand this in... but then was told I need a input thingy to input the values into my array and I have an example code for imp
-
ImportEnt field in XL Reporter
On a Sales Invoice Accounting Screen there in a field called Sales Order. The database name for this is 'ImportEnt'. Is there anyway to pull this field in to XL reporter? It does not appear to be available in the field selection within XL Reporter?
-
Suddenly the Power Point application won't run properly it open but it would not run the presentation. Any solution to this matter?
-
Hi , Welcome to the HP Forums! I understand that your HP Deskjet 3050 cannot print due to an error state. I am happy to look into this for you! Some questions for you: What is the Operating System you are using Windows or Mac? What version? "Please