Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to User Defined Fields,User Defined Tables and Register User Defined Object in SAP Business One SDK?

Hello Guys,

Greetings !!!

Kindly Find the Attached Procedure Step By Step to Creating UDF,UDT and Registering UDO in Sap Business One System Forms.

  1. Creating User Defined Fields
  2. Creating User Defined Tables
  3. Registering User Defined Objects

Your Source Code Template Must be Same as  Follows   https://blogs.sap.com/2017/08/03/simple-sap-b1-add-on-for-beginners/

  • To Create User Defined Tables : There are Six Types Of Tables in SAP Business One. NoObject,Document,DocumentLines,MasterData and MasterDataLines. Call Following Function in Class Main.
objUtilities.CreateTable("GOD_QCGR", "GOD Groups", SAPbobsCOM.BoUTBTableType.bott_NoObject) 

Just Change the Type Of Parameter to Table Type. CreateTable Function Will be as Follows. Define CreateTable Function in Utilities Class

Public Function CreateTable(ByVal TableName As String, ByVal TableDescription As String, ByVal TableType As SAPbobsCOM.BoUTBTableType) As Boolean
        Dim intRetCode As Integer
        Dim objUserTableMD As SAPbobsCOM.UserTablesMD
        objUserTableMD = GOD_Main.GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
        Try
            If (Not objUserTableMD.GetByKey(TableName)) Then
                objUserTableMD.TableName = TableName
                objUserTableMD.TableDescription = TableDescription
                objUserTableMD.TableType = TableType
                intRetCode = objUserTableMD.Add()
                If (intRetCode = 0) Then
                    GOD_Main.GOD_Application.SetStatusBarMessage(TableDescription & " User Defined Table Successfully.", SAPbouiCOM.BoMessageTime.bmt_Short, False)
                    Return True
                Else
                    GOD_Main.GOD_Application.SetStatusBarMessage(TableDescription & " Failed To Creat User Defined Table.", SAPbouiCOM.BoMessageTime.bmt_Short, True)
                End If
            Else
                Return False
            End If
        Catch ex As Exception
            GOD_Main.GOD_Application.MessageBox(ex.Message)
        Finally
            System.Runtime.InteropServices.Marshal.ReleaseComObject(objUserTableMD)
            GC.Collect()
        End Try
    End Function
  • For Adding Fields in User Defined No Object Table GOD_OCGR Use Following Functions For

Alphanumeric Fields

Date Field

Quantity Field



This post first appeared on Web Service Testing A Blackjack GUI And API, please read the originial post: here

Share the post

How to User Defined Fields,User Defined Tables and Register User Defined Object in SAP Business One SDK?

×

Subscribe to Web Service Testing A Blackjack Gui And Api

Get updates delivered right to your inbox!

Thank you for your subscription

×