project QadFinancials > class BBusinessRelation > method ApiLoadBusinessRelationCalcCountryCode
function returns character
Description
This method is used for ApiLoadBusinessRelation to get CountryCode by CountryID.
Parameters
Internal usage
QadFinancials
program code (program9/bbusinessrelation.p)
define variable oiReturnStatus as integer no-undo.
if iiCountryId = ? or
iiCountryId = 0
then return "":U.
<Q-1 run CountryPrim (all) (Read) (Cache)
(input iiCountryId, (CountryId)
input ?, (CountryCode)
output dataset tqCountryPrim) in BCountry >
find first tqCountryPrim where
tqCountryPrim.tiCountry_ID = iiCountryId
no-error.
return if available tqCountryPrim
then tqCountryPrim.tcCountryCode
else "":U.