Skip to Content
0
Aug 11, 2016 at 01:29 PM

How to declare variables in stored procedure SQL Server 2008, SAP B1?.

501 Views

Hi all,

I have a problem related to stored procedure in SBO_SP_TransactionNotification.

I want to declare two variables and assign them values from in the document of Goods receipt.

for example

@ItemCode= 'First (or only one) Item Code of Goods Receipt in lines'

@Grade='Grade of the above Item Code (UDF), because I record only single line for each goods receipt'

-- ADD YOUR CODE HERE

if @object_type='59' AND @transaction_type in ('A')

BEGIN

---------

---------

---------

SELECT @error, @error_message

END

-- Select the return values

select @error, @error_message

How can I declare the above variables and assign them values from goods receipt in order to use them in where clause or in select case of query?.


Please anyone can help me.