Description
This method contains list of validation rules for merging of shared sets
Parameters
icSharedSetTypeCode | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bsharedsetmerge.p)
/* =================================================================================================== */
/* Method : GetValidationRulesForSSType */
/* Desc : This method creates and populates temporary tables with rules to apply during vali- */
/* dation of shared set compatibility */
/* --------------------------------------------------------------------------------------------------- */
/* Params: (H) MergeValidateTable Temporary table with data has to be validated */
/* (H) MergeValidateField Temporary table with list of fields of table and validation */
/* (I) SharedSetTypeCode Code of shared set type */
/* --------------------------------------------------------------------------------------------------- */
/* This procedure and all sub-procedures has to be in the same segment as procedure MergeValidate */
/* =================================================================================================== */
assign oiReturnStatus = -98.
/* =================================================================================================== */
/* Default output values */
/* =================================================================================================== */
empty temp-table tMergeValidateTable.
empty temp-table tMergeValidateField.
/* =================================================================================================== */
/* Get validation rules by type of shared set */
/* =================================================================================================== */
case icSharedSetTypeCode:
when {&SHAREDSETTYPECODE-COSTCENTRE}
then do:
<M-1 run GetValidationRulesForSSTypeCostCentre
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-CREDITOR}
then do:
<M-2 run GetValidationRulesForSSTypeCreditor
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-DEBTOR}
then do:
<M-4 run GetValidationRulesForSSTypeDebtor
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-DIVISION}
then do:
<M-5 run GetValidationRulesForSSTypeDivision
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-EXCHANGERATE}
then do:
<M-6 run GetValidationRulesForSSTypeExchangeRate
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-GL}
then do:
<M-7 run GetValidationRulesForSSTypeGL
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-JOURNAL}
then do:
<M-8 run GetValidationRulesForSSTypeJournal
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
when {&SHAREDSETTYPECODE-PROJECT}
then do:
<M-9 run GetValidationRulesForSSTypeProject
(output viFcReturnSuper (oiReturnStatus)) in BSharedSetMerge>
end.
end case.
if viFcReturnSuper <> 0 then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.
/* =================================================================================================== */
/* Return */
/* =================================================================================================== */
if oiReturnStatus = -98 then assign oiReturnStatus = 0.