I'm just guessing, Israel, but have you checked whether your calls to eqcalcpepssp(:icodemp, :scodfilial, :icodprod, :nsaldo, :ddtmovprodax, :icodempax, :scodfilialax, :icodalmox )
and eqcustoprodsp(:icodemp, :scodfilial, :icodprod, :dtpesq,'U',:icodempax, :scodfilialax, :icodalmox, 'N' ) have the expected type for all parameters? HTH, Set
