Adding UDF in SAP table
Ina Colman
how can we add udf in a sap table using core suite ( csharp) ?we just want to add the fields in the table and don't put it on the screen. The fields must appear when we activate user defined fields under the menu point view.
Bastian Hofmeister
Hi Ina,I think you cannot add udf into a sap table with the customizer.
You need to work with the sdk or set up your table for new.
HTH Basti
Anders Olsson
Hi Ina,As Bastian says there is no specific customize functionality to add UDFs. If you want to do it through code, you must use the SAP DI API (SDK). See the SAP DI API reference for more information.
Here's an example (from the DI reference) of how to add a UDF to the BP Master Data:
SAPbobsCOM.UserFieldsMD userFields = (SAPbobsCOM.UserFieldsMD)SwissAddonFramework.B1Connector.GetB1Connector().Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
userFields.TableName = "OCRD";
userFields.Name = "COR_UDF1";
userFields.Description = "My UDF";
userFields.Type = SAPbobsCOM.BoFieldTypes.db_Alpha;
userFields.EditSize = 20;
int errCode = userFields.Add();
If you need further help with your solution please don't hesitate to contact coresystems support. See my signature for contact details.
Kind regards,
Anders Olsson
0
Please sign in to leave a comment.
Comments
0 comments