validation procedure
Description
Validate a VAT Number on validity and give errors if necessary
Parameters
icTargetField | input | character | Value of the business field to validate. |
icTargetFieldName | input | character | Name of the business field to validate. |
icRowid | input | character | Contents of field tc_Rowid, if the target field is a field of a component temp-table. |
iiCountryId | input | integer | country ID |
icCountryCode | input | character | Country Code |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program5/bbusinessrelation.p)
assign vhFcComponent = ?.
<M-1 run ApiCheckVatNumber
(input iiCountryId (iiCountryId),
input icCountryCode (icCountryCode),
input icTargetField (icVatNumber),
input true (ilMessage),
output vcVatNumberShort (ocVatNumberShort),
output vcVatNumberLong (ocVatNumberLong),
output viFcReturnSuper (oiReturnStatus)) in BCountry>
if viFcReturnSuper < 0 or
(viFcReturnSuper > 0 and oiReturnStatus = 0)
then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0
then return.