project QadFinancials > class BFRWChart > method ValidateComponentAllSharedSets
Description
Validate data of sharedsets
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bfrwchart.p)
/* ====================================================================================== *
* Method : ValidateComponentAllSafConcepts *
* Description : This method validates saf concepts *
* ====================================================================================== */
MAIN_BLOCK:
do on error undo, throw:
if t_sFRWChart.tcGLSharedSetCode = ? or t_sFRWChart.tcGLSharedSetCode = '':U
then do:
assign vcMessage = trim(#T-60'GL Shared Set code does not exist.':100(428130723)T-60#)
oiReturnStatus = -1.
<M-1 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tFRWChart.tcglSharedSetCode':U (icFieldName),
input t_sFRWChart.tcGLSharedSetCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-870451':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BFRWChart>
end.
else do:
<Q-46 run SharedSetByCode (all) (Read) (NoCache)
(input t_sFRWChart.tcGLSharedSetCode, (SharedSetCode)
output dataset tqSharedSetByCode) in BSharedSet>
find first tqSharedSetByCode no-error.
if available tqSharedSetByCode and
tqSharedSetByCode.tcSharedSetTypeCode <> {&SHAREDSETTYPE-GL}
then do:
assign vcMessage = trim(#T-63'Shared Set must be of type GL Shared Set.':100(70355747)T-63#)
oiReturnStatus = -1.
<M-51 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tFRWChart.tcglSharedSetCode':U (icFieldName),
input t_sFRWChart.tcGLSharedSetCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-237163':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BFRWChart>
end.
end.
if t_sFRWChart.tcDivisionSharedSetCode <> ? and
t_sFRWChart.tcDivisionSharedSetCode <> '':U
then do:
<Q-49 run SharedSetByCode (all) (Read) (NoCache)
(input t_sFRWChart.tcDivisionSharedSetCode, (SharedSetCode)
output dataset tqSharedSetByCode) in BSharedSet>
find first tqSharedSetByCode no-error.
if available tqSharedSetByCode and
tqSharedSetByCode.tcSharedSetTypeCode <> {&SHAREDSETTYPE-DIVISION}
then do:
assign vcMessage = trim(#T-23'Shared Set must be of type Sub-Account Shared Set.':150(680232621)T-23#)
oiReturnStatus = -1.
<M-66 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tFRWChart.tcdivisionSharedSetCode':U (icFieldName),
input t_sFRWChart.tcDivisionSharedSetCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-138444':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BFRWChart>
end.
end.
if t_sFRWChart.tcCostCentreSharedSetCode <> ? and
t_sFRWChart.tcCostCentreSharedSetCode <> '':U
then do:
<Q-48 run SharedSetByCode (all) (Read) (NoCache)
(input t_sFRWChart.tcCostCentreSharedSetCode, (SharedSetCode)
output dataset tqSharedSetByCode) in BSharedSet>
find first tqSharedSetByCode no-error.
if available tqSharedSetByCode and
tqSharedSetByCode.tcSharedSetTypeCode <> {&SHAREDSETTYPE-COSTCENTRE}
then do:
assign vcMessage = trim(#T-44'Shared Set must be of type Cost Center Shared Set.':100(578803215)T-44#)
oiReturnStatus = -1.
<M-11 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tFRWChart.tcCostCentreSharedSetCode':U (icFieldName),
input t_sFRWChart.tcCostCentreSharedSetCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-964966':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BFRWChart>
end.
end.
if t_sFRWChart.tcProjectSharedSetCode <> ? and
t_sFRWChart.tcProjectSharedSetCode <> '':U
then do:
<Q-31 run SharedSetByCode (all) (Read) (NoCache)
(input t_sFRWChart.tcProjectSharedSetCode, (SharedSetCode)
output dataset tqSharedSetByCode) in BSharedSet>
find first tqSharedSetByCode no-error.
if available tqSharedSetByCode and
tqSharedSetByCode.tcSharedSetTypeCode <> {&SHAREDSETTYPE-PROJECT}
then do:
assign vcMessage = trim(#T-35'Shared Set must be of type Project Shared Set.':100(79558065)T-35#)
oiReturnStatus = -1.
<M-20 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tFRWChart.tcprojectSharedSetCode':U (icFieldName),
input t_sFRWChart.tcProjectSharedSetCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-242597':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BFRWChart>
end.
end.
end. /* do on error undo, throw: */