project QadFinancials > class PMultiDB > method validateEntityCodeByParams


Parameters


icEntityCodeinputcharacter
olEntityValidoutputlogical
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCompany.ValidateCompanyCode


program code (program3/pmultidb.p)

if oiReturnStatus = 0 then oiReturnStatus = -98.

empty temp-table tMFGEntity no-error.

create tMFGEntity.

assign
    tMFGEntity.tcCompanyCode = icEntityCode.

<M-2 run validateEntityCodeAcrossDBs
   (input-output tMFGEntity (tMFGEntity), 
    output viFcReturnSuper (oiReturnStatus)) in PMultiDB>

find first tMFGEntity.
assign olEntityValid = tMFGEntity.tlEntityValid.

if viFcReturnSuper <> 0 then 
    assign oiReturnStatus = viFcReturnSuper.

if oiReturnStatus = -98 then
    assign oiReturnStatus = 0.