<SQL>
<getid_qjm>
[Out cost]
begin
begin
Select q.id Into :idq
From qjm_product q
, pdm_shipproduct p
Where p.id = :idp
And p.scode = q.scode;
end;
</getid_qjm>
<SetFlt>
[out Filter$Flt_idProduct, Filter$Flt_idProduct_HL]
begin
:Filter$Flt_idProduct := :idqProduct;
:Filter$Flt_idProduct_HL := QJM_ProductAPI.GetHeadLine(:idqProduct);
end;
</SetFlt>
</SQL>
<pascal>
idvProduct:= GetVar('super$idGlobalProduct');
if not VarIsNull(idvProduct) then
begin
sRes := ExecSQL('getIid_qjm', 'idq; idp', [ftInteger, ftInteger], [ , idvProduct]); // здесь ругается
idqProduct := sRes[1];
end;
if not VarIsNull(idqProduct) then
begin
ClientSetVar('FILTER$Flt_idProduct',idqProduct);
Selection.ExecOpScript('SetFlt_idProduct');
Selection.AddVar('idProduct#', idqProduct, ftFloat);
end;
if VarIsNull(GetVar('Filter$Flt_idProduct')) then
ExecSQLEx('SetFlt', 'idpProduct', [ftFloat], [idqProduct]);
Selection.ExecOpScript('#BeforeOpen');
</pascal>