Description
Returns the
PeriodCategory data structure according to the specified period category key parameters.
Syntax
Parameters
Example
The following is a VB.NET sample that retrieves the period categories by its parameters.
| GetPeriod (Visual Basic) | Copy Code |
|---|
Dim oCompanyService As SAPbobsCOM.CompanyService
Dim oPeriodCategoryColl As PeriodCategoryParamsCollection
Dim oPerCategory As PeriodCategory
Dim oFinancePeriods As FinancePeriods
Dim oFinancePeriod As FinancePeriod
Dim i As Integer
Dim j As Integer
oCompanyService = oCompany.GetCompanyService
oPeriodCategoryColl = oCompanyService.GetPeriods
For i = 0 To oPeriodCategoryColl.Count - 1
oPerCategory = oCompanyService.GetPeriod(oPeriodCategoryColl.Item(i))
Debug.WriteLine(oPerCategory.PeriodName)
oFinancePeriods = oCompanyService.GetFinancePeriods(oPeriodCategoryColl.Item(i))
For j = 0 To oFinancePeriods.Count - 1
oFinancePeriod = oFinancePeriods.Item(j)
Debug.WriteLine(oFinancePeriod.PeriodName)
Next j
Next i
|
|
See Also