0

What is the name of field Absence Type of HEM1 table of SAP B1 in SDK?

I tried to use type and AbsenceType in SDK but I failed

Please anyone can help me

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Schadro
  • 63
  • 6

2 Answers2

0

is reason the field you are interested in?

Dim abs As SAPbobsCOM.EmployeeAbsenceInfo
Dim oei As SAPbobsCOM.EmployeesInfo
Dim objCompany As SAPbobsCOM.Company = Application.SBO_Application.Company.GetDICompany

        oei = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oEmployeesInfo)
        abs = oei.AbsenceInfo
        abs.Add()
        abs.SetCurrentLine(1)
        abs.EmployeeID = 2
        abs.FromDate = "2008-01-01 12:00:00"
        abs.ToDate = "2008-01-01 12:30:00"
        abs.Reason = "Flu"

        abs.Add()
        abs.SetCurrentLine(2)
        abs.EmployeeID = 2
        abs.FromDate = "2008-01-02 10:00:00"
        abs.ToDate = "2008-01-02 11:00:00"
        abs.Add()
        Dim err_code As Integer
        Dim err_msg As String
        err_msg = ""
        err_code = oei.Add()
        If err_code <> 0 Then
            objCompany.GetLastError(err_code, err_msg)
        End If
    End Sub
Praxiom
  • 578
  • 1
  • 8
  • 21
0

The HEM1 table is linked to the PMC5 table that stores the Activity type. Look for the SAP Bobs object that caters to Activity types found in Administration -> Setup -> Project Management -> Activity Types.

The column name is ActType

SAPbobsCOM.Documents actTypes = SboConnection.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oActivityTypes);
Kinyanjui Kamau
  • 1,890
  • 10
  • 55
  • 95