RE: econnect procedures PRE vs POST
When I run the PRE procedure, the variable is good:
Notice I haven't provided any values for @I_vUNITPRICE. so the PRE procedures does work and gives us the proper unitprice.
here's what we added to the PRE:
declare @oOrigUnitPrice numeric(19,5) ,
@oOrigUnitPriceRND numeric(19,5)
select @O_iErrorState = 0
-- if @I_vUNITPRCE = 0.00
begin
EXECUTE [dbo].[JOV_Find_Price_sp]
@I_vITEMNMBR
,@I_vUOFM
,@I_vCUSTNMBR
,@I_vDOCDATE
,@oOrigUnitPrice OUTPUT
,@oOrigUnitPriceRnd OUTPUT
,@I_vMRKDNPCT OUTPUT
,@O_iErrorState OUTPUT
SET @I_vUNITPRCE = @oOrigUnitPriceRnd
end
return (@O_iErrorState)
GO
Looking at the SQL Profiler when running the smartconnect map (and looking at resulting documents in GP), the unit price is 0. it looks like it's simply getting the "default" value instead of what the PRE procedure should have given it.