The xAssets API - Method : SpecialAccountingProcess

Summary

Run a period end depreciation calculation, create journals and close a financial accounting period

Parameters

Parameter : sXML

XML In the form :<AccountingProcess_T><AccountingProcess_R><APS1ID>AccountingPeriodSetID</APS1ID><A8>AccountingPeriodSetDesc</A8><D6>FORWARD</D6><FromStatus>ProcessStatus</FromStatus><ToStatus>ToStatus</ToStatus><F11>ActualAccountingPeriodID</F11><T25>ForecastAccountingPeriodID</T25><FromStartDate>FromStartDate</FromStartDate><ToStartDate>ToStartDate</ToStartDate><FromEndDate>FromEndDate</FromEndDate><ToEndDate>ToEndDate</ToEndDate><AdditionsJournal>0</AdditionsJournal><DepreciationJournal>1</DepreciationJournal><DisposalJournal>1</DisposalJournal><TransferJournal>1</TransferJournal><AID>0</AID><ADPID>0</ADPID></AccountingProcess_R></AccountingProcess_T>

AccountingPeriodSetID = The ID of the accounting period set being calculated

AccountingPeriodSetDesc = The description of the accounting period set being calculated (optional)

FORWARD or BACKWARD = the direction of the calculation. To rewind, use "BACKWARD", to calculate normally, use "FORWARD"

ProcessStatus = NEW to close the last journalled period and open the next period for future calculation, CALCULATED to perform a depreciation calculation and move from a new period to a journalled period, JOURNALLED to write the journal files and then move from a calculated period to a journalled period. It is only possible to move one step at a time, (e.g. from NEW to CALCULATED, from CALCULATED to JOURNALLED, or from JOURNALLED to NEW) but multiple periods can be processed in a single run.

ActualAccountingPeriodID = The accounting period ID you wish to calculate actuals for

ForecastAccountingPeriodiD = The last accounting period ID you wish to calculate budgets for

FromStartDate = the start date of the period we are calculating from

ToStartDate = the start date of the period we are calculating to

FromEndDate = the end date of the period we are calculating from

ToEndDate = the end date of the period we are calculating to

AdditionsJournal = 0 or 1 flag to determine whether to write an additions journal. This journal will contain acquisition amounts related to asset additions

DepreciationJournal = 0 or 1 flag to determine whether to write a depreciation journal. This journal will contain depreciation calculations

DisposalJournal = 0 or 1 flag to determine whether to write a disposal journal. This journal will contain asset disposals

TransferJournal = 0 or 1 flag to determine whether to write a transfer journal. This journal will contain asset transfers

AID and ADPID are not used in this version

Parameter : sArguments

This parameter is not used

Returns

An empty string or a string starting with "special=" if the batch job was launched successfully. If the launch failed, an error message will be returned

Remarks

This command launches an accounting period calculation run as a batch job. Since the calculation operates as a batch job, this method returns to the caller before the process has completed, so the result is not known at the time the method returns.

Syntax and Examples

Restful syntax with Microsoft Visual Basic

Example 1

There is no restful call for this API operation - use a SOAP method instead

SOAP Syntax with Microsoft Visual Basic

Example 1


    Try

        ErrorMessage = ""

        Return w.WebSaveSpecial(_hash, _username, _db, _ip, "", "SpecialAccountingProcess", {}, False, _dns, _port, _scheme, _nonce, _noncedate)

    Catch ex As Exception
        ErrorMessage = ex.Message
        Return "
    End Try

                            

AMSX Syntax

Example 1


    SaveSpecial "SpecialAccountingProcess",""
                        

XCS Syntax

Example 1


    Dim ret as String = Server.SaveSpecial("SpecialAccountingProcess","")
    If ret = " Or ret.Substring(0, 8) = "special=" Then
        MsgBox("Save operation completed.", vbInformation, "Save Data")
    Else
        MsgBox("Save operation failed:" & ret, vbExclamation, "Save Data")
    End If
                        

Download the Visual Studio API Samples Project

Return to the API Index Page