I have a stored procedure that errors out. My question is in the following SQL text.
Where the sp says;
",@EdiCustId"(is that a required field/attribute? Meaning it is looking for that value to be plugged in)
next
Where the sp says;
",NULL --@_iStatus" ( Does that mean a null value/attribute is allowed?)
EXECUTE @RC = [Mas500_app].[dbo].[spsoGetSalesOrdDflts]
@company
,@cust_custKey
,@EdiCustId
,@tranType
,NULL --@_iStatus
,NULL --@_iAckDate
,NULL --@_iBillToCustAddrKey
,NULL --@_iBillToCustAddrID
,NULL --@_iBillToCopyKey
,NULL --@_iBillToCopyID
,NULL --@_iBillToAddrName
,NULL --@_iBTAddrLine1
,NULL --@_iBTAddrLine2
,NULL --@_iBTAddrLine3
,NULL --@_iBTAddrLine4
,NULL --@_iBTAddrLine5
,NULL --@_iBTCity
,NULL --@_iBTState
,NULL --@_iBTCountryID
,NULL --@_iBTPostalCode
,NULL --@_iBTTransactionOverride
,NULL --@_iBlnktRelNo
,NULL --@_iBlnktSOKey
,NULL --@_iBlnktSOID
,NULL --@_iChngOrdDate
,NULL --@_iChngOrdNo
,NULL --@_iChngReason
,NULL --@_iChngUserID
,NULL --@_iCloseDate
,@_iCntctKey
,NULL --@_iCntctName
,@_iCurrExchRate --@_iCurrExchRate
,@_iCurrExchSchdKey --@_iCurrExchSchdKey
,@_iCurrExchSchdID --@_iCurrExchSchdID
,@_oSOKey OUTPUT
,@_oTranID OUTPUT
,@_oRetValSp OUTPUT
-- ,@_iMigration
-- ,@_iRptOption
-- ,@_iPrintWarnings
-- ,@_iBlankInvalidReference
-- ,@_iInvalidGLUseSuspense
/* set for logging */
select @_logSoKey = @_oSOKey
select @_logTranNo = SUBSTRING(@_oTranID, 4, 10)
select @_oTranNo = @_logTranNo
--Select @_oSOKey As SOKey, @_oTranID As TranID, @_oRetValSp As RetVal
--select * from #tsoAPIValid
if @_oRetValSp != 1 and @_oRetValSp != 2
begin
select @oRetVal = @_oRetValSp
/* error log call ****************/
select @_logMessage = 'Failure setting SO defaults with spsoGetSalesOrdDflts'
EXECUTE @RC = [edi].[dbo].[SpSoLog] @_logSoImportKey, @_logSessionKey, @_logSoKey , @_logSoLineImportKey, @_logSoLineKey
,@_logTranNo, @_logCustId, @_logCustPoNo, @_logItemId
,@_logMessage, 1, @oRetVal, @oLogKey = @oLogKey OUTPUT
/*********************************/
select @oErrorKey = @oLogKey
GOTO DROPTABLES
end
Thanks for your help in advance.
SA
Where the sp says;
",@EdiCustId"(is that a required field/attribute? Meaning it is looking for that value to be plugged in)
next
Where the sp says;
",NULL --@_iStatus" ( Does that mean a null value/attribute is allowed?)
EXECUTE @RC = [Mas500_app].[dbo].[spsoGetSalesOrdDflts]
@company
,@cust_custKey
,@EdiCustId
,@tranType
,NULL --@_iStatus
,NULL --@_iAckDate
,NULL --@_iBillToCustAddrKey
,NULL --@_iBillToCustAddrID
,NULL --@_iBillToCopyKey
,NULL --@_iBillToCopyID
,NULL --@_iBillToAddrName
,NULL --@_iBTAddrLine1
,NULL --@_iBTAddrLine2
,NULL --@_iBTAddrLine3
,NULL --@_iBTAddrLine4
,NULL --@_iBTAddrLine5
,NULL --@_iBTCity
,NULL --@_iBTState
,NULL --@_iBTCountryID
,NULL --@_iBTPostalCode
,NULL --@_iBTTransactionOverride
,NULL --@_iBlnktRelNo
,NULL --@_iBlnktSOKey
,NULL --@_iBlnktSOID
,NULL --@_iChngOrdDate
,NULL --@_iChngOrdNo
,NULL --@_iChngReason
,NULL --@_iChngUserID
,NULL --@_iCloseDate
,@_iCntctKey
,NULL --@_iCntctName
,@_iCurrExchRate --@_iCurrExchRate
,@_iCurrExchSchdKey --@_iCurrExchSchdKey
,@_iCurrExchSchdID --@_iCurrExchSchdID
,@_oSOKey OUTPUT
,@_oTranID OUTPUT
,@_oRetValSp OUTPUT
-- ,@_iMigration
-- ,@_iRptOption
-- ,@_iPrintWarnings
-- ,@_iBlankInvalidReference
-- ,@_iInvalidGLUseSuspense
/* set for logging */
select @_logSoKey = @_oSOKey
select @_logTranNo = SUBSTRING(@_oTranID, 4, 10)
select @_oTranNo = @_logTranNo
--Select @_oSOKey As SOKey, @_oTranID As TranID, @_oRetValSp As RetVal
--select * from #tsoAPIValid
if @_oRetValSp != 1 and @_oRetValSp != 2
begin
select @oRetVal = @_oRetValSp
/* error log call ****************/
select @_logMessage = 'Failure setting SO defaults with spsoGetSalesOrdDflts'
EXECUTE @RC = [edi].[dbo].[SpSoLog] @_logSoImportKey, @_logSessionKey, @_logSoKey , @_logSoLineImportKey, @_logSoLineKey
,@_logTranNo, @_logCustId, @_logCustPoNo, @_logItemId
,@_logMessage, 1, @oRetVal, @oLogKey = @oLogKey OUTPUT
/*********************************/
select @oErrorKey = @oLogKey
GOTO DROPTABLES
end
Thanks for your help in advance.
SA