Class SY_BatchMaintSet

Known SubClasses

PM_LaborEntry_bus

Properties

PROPERTY BatchEnabled  

[boolean] Flag to indicate that batches are enabled for this entry.

PROPERTY ErrorBatchNo$  

[string] Batch Number that contains an error as detected when setting the key to the record.

Methods

FUNCTION CommitRow()  

Override to the function found in SY_Maint. Overridden so that the rows to be committed are pre-processed to update the batch totals if batch is enabled.

Returns Returns return value from call to the base class CommitRow()
FUNCTION Delete(delKey$)  

Override to the function found in SY_Maint. Overridden to capture deleted key of new records when cMode$="SET"

ParameterDescription
delKey$ [input, string] key to be deleted
Returns Returns return value from call to the base class Delete()
FUNCTION DeleteBatch(batchNo$)  

Function to delete all records within a given batch.

ParameterDescription
batchNo$ [input, string] Batch number to be deleted, and all the records that are in that batch.
Returns [boolean]
ValueDescription
retSUCCESS(1) if all records successfully deleted
retFAILURE(0) if one or more records were not deleted successfully
FUNCTION DeleteBatchNo(batchNo$)  

Alternate form of DeleteBatch(). This function calls the DeleteBatch()

ParameterDescription
batchNo$ [input, string] Batch number to be deleted, and all the records that are in that batch.
ValueDescription
retSUCCESS(1) if all records successfully deleted
retFAILURE(0) if one or more records were not deleted successfully
FUNCTION DeleteBatchTransaction()  

Function to update batch totals when deleting a row when cMode$="SET", this is called from CommitRow()

Returns [boolean]
ValueDescription
retSUCCESS(1) If batch totals were updated successfully
retFAILURE(0) If batch totals were not updated successfully
FUNCTION GetBatchHandle(UIObj)  

Returns the handle to the batch business object. If the UI object is not SY_BatchManagerSelete_UI, this class willl have it's own copy of the business object.

ParameterDescription
UIObj [input, objHandle] Current object executing function.
Returns [objHandle] returns the business object handle for SY_BatchManager_bus
FUNCTION GetBatchTotalVars(vars$)  
FUNCTION GetBatchTotalVars(vars$, reverse)  

Retrieve the values of the batch total variables, in a concatenated string of name value pairs.

ParameterDescription
vars$ [output, string] SEP ($8A$) separated string of name value pairs of batch totals
reverse [input, boolean] {optional} Flag to adjust the total by reversing the sign, if set to True
Returns Always returns retSUCCESS(1)
FUNCTION IsBatchActive(batchNo$)  

Function validates that the given batch number contains any records.

ParameterDescription
batchNo$ [input, string] Batch number to verify is an active batch.
Returns [boolean]
ValueDescription
True - if batch contains records
False - if batch contains no records
FUNCTION ResetBatchSubType(batchSubType$, batchBusObj)  

Resets the Batch Sub Type into the batch business object (SY_BatchManager_bus)

ParameterDescription
batchSubType$ [input, string] SubType for current BatchType
batchBusObj [input, objHandle] Object handle to the batch business object
Returns [boolean] Return value for call to the ResetBatchSubType() method call into the batch business object.
FUNCTION SelectBatch(batchNo$)  

Function opens an existing batch with the given batch number.

ParameterDescription
batchNo$ [input, string] Batch number to open or create
ValueDescription
retSUCCESS(1) if batch was successfully open
retFAILURE(0) if batch could not be opened
FUNCTION SelectNewBatch(batchNo$, private$, comment$)  

Function opens and creates a new batch with the given batch number.

ParameterDescription
batchNo$ [input, string] Batch number to open or create
private$ [input, string] Y/N flag to indicate this is a private batch. Only used for creating new batches
comment$ [input, string] Comment associated with the batch. Only used for creating new batches.
Returns [boolean]
ValueDescription
retSUCCESS(1) if batch was successfully opened/created
retFAILURE(0) if batch could not be opened/created
FUNCTION SetBatchTotalVars(vars$)  

Function to set initial values of batch totals

ParameterDescription
vars$ [input, string] concatenated string of total variables to accumulate for batches.
Returns Always returns retSUCCESS(1)
FUNCTION SetCurrentKey(key$)  

Override to base class function found in SY_Maint. This is overriden to ensure that a batch is opened and ready if batches are enabled for this class.

ParameterDescription
key$ [input, key$] key to the record being modified/added.
Returns [boolean]
ValueDescription
retSUCCESS(1) record was successfully read, and current key set. Batch is set if batch is enabled.
retFAILURE(0) record key was not set successfully or no batch is setup and open when batches are enabled.
FUNCTION SetFilter(whereClause$)  
FUNCTION SetFilter(whereClause$, restrictKey$)  

Override to base class function found in SY_Maint. This is overridden to set the Batch Number as part of the overall Where clause when setting the filter, before calling the base class function.

ParameterDescription
whereClasue$ [input, string] Where clause that is applied to select of the physical table into the memory tables
restrictKey$ [input, string] This value is applied to the select as part of the begin/end, this value should be padded appropriately.
Returns [boolean] Returns the value from the call to the base class
FUNCTION VerifyBatch(batchNo$, batchTotals$, count)  

Function to verify the batch totals from records contained within the batch. This will read through the records and retotal the batch variables.

ParameterDescription
batchNo$ [input, string] Batch number to verify records for.
batchTotals$ [output, string] concatenated list of string name value pairs of batch total variables.
count [output, string] number of total variables contained in batchTotals string.
Returns [boolean] Always returns retSUCCESS(1)
FUNCTION WriteBatchTransaction()  

Function to update batch totals to batch tables, if batches enabled.

Returns [boolean]
ValueDescription
retSUCCESS(1) If write and update of batch totals is successful
retFAILURE(0) If write was unsuccessful and batch totals were updated.
FUNCTION LOCAL ClassValidateBatchNo$(col$, value$)  

Class validation method for batch number. This value is program assigned and should never be allowed to be set using conventional SetValue() calls.

ParameterDescription
col$ [input, string] column name that is of a class BATCHNO
val$ [input, string] value of the column.
Returns Always returns retFAILURE(0)
FUNCTION LOCAL PostDeleteRec()  

Function will ensure any record deleted that was initially a NEW record will have the RowStatus$ variable reflect that. This function uses the cLastDeletedKey$ property that is set in the DeleteRec() to determine when to do this.

Returns Always returns retSUCCESS(1)
FUNCTION LOCAL RaiseErrors(oSrcObj)  

Function promotes any error messages set in the source object to be errors in this class.

ParameterDescription
oSrcObj [input, objhandle] Source object being used that will have any errors from this object promoted to errors in this class.
Returns Always returns retSUCCESS(1)

Properties inherited from: SY_Maint

cActionWrite, cActionDelete, cActivityLogFilePrefix$, DocDateWarnDisplayed, DocDateWarnStatus, EditState, RecordChanged, FirstFailure$, DocumentTotal, ReadOnlyReason$, UDTValidation$, ViewOnly, CurrentPrecision, DocDateWarnForceOff, DocDateWarnObject, ScriptObject, ImportTest, SkipNullCheck$, AFSRequiredFields$

Properties inherited from: SY_MaintSet

FileChanged

Methods inherited from: SY_Maint

ChangedRecordCompare(), ChangedRecordInfo(), Clear(), ClearRecord(), ConfirmDelete(), CopyFrom(), ExportToCSV(), GetColumnInfo(), GetColumnProperties$(), GetDefaults(), GetOrigRecord$(), GetPropertyValue(), GetValidationGroups$(), ResetDocDateWarnState(), SetCopyKeyValue(), SetDocDateWarnDisplayed(), SetDocDateWarnOff(), SetKey(), SetKeyValue(), SetPartialRecord(), SetRecord(), SetToReadOnly(), SetValue(), SetValues(), Write(), ActivityLogCreateFile(), ActivityLogPrepare(), ActivityLogSetMessage$(), ActivityLogWrite(), CallScript(), CheckForAdvancedFieldSettings(), CheckForScripts(), CheckNullRequiredField(), PERFORM ChildValidate(), ClassValidateDate(), ClassValidateTelephoneNo(), ClearSetFiles(), ColInfoInitAll(), ColInfoInitDefaults(), CommitRow(), GetPropertyCommon(), InitColInfo(), InitScriptEngine(), InitSearchForUpdate(), InitWorkTable(), IsColInIOList(), IsValid(), LoadColInfo(), OpenMainTable(), ParseExtField(), PreWriteScripts(), RemoveColToSkip(), ResetRow(), RetrieveColInfo(), SetDefaults(), SetFilter(), SetMode(), SetParentHandle(), SetValueNoValidate(), StoreColToSkip(), ValidateAll(), ValidateAllRecord(), ValidateColInfo(), ValidateRule()

Methods inherited from: SY_MaintSet

ClearSetFiles(), CommitRow(), QuickRowLoad(), ResetRow(), SeedDetailRow(), SetFilter(), SetMode()