Hi All,
Our client is running on SAP Business One, version for SAP HANA. However, I'm still using the traditional SQL Server on my machine. I have two transaction notification procedures that I tested on my machine and I want to migrate from SQL to SAP HANA. However I'm not familiar with SAP HANA syntax so I don't know how to do this. I require your help.
1. Here are the two transaction notification stored procedures that I require help in changing the syntax to suite the HANA environment.
| -- | ADD | YOUR | CODE | HERE |
-- Block a Standard Production Order without a Production Reference number
IF @transaction_type IN (N'A',N'U') AND @object_type = '202'
BEGIN
IF EXISTS (select DocNum from [dbo].[OWOR] T0
where T0.U_Prod_Reference IS NULL AND T0.Type = N'S' AND T0.DocEntry=@list_of_cols_val_tab_del)
BEGIN
SELECT @Error = -5006,
@error_message = N'Add a Production Order Reference Number'
END
END
--Block a Standard Production order if referencing a nonexistent disassembly production order
IF @object_type = '202' and @transaction_type in (N'A', N'U')
BEGIN
declare @DocNumRef nvarchar(10)
set @DocNumRef = (Select isnull(T0.U_Prod_Reference, '') From OWOR T0 WHERE T0.DocNum = @list_of_cols_val_tab_del)
if @DocNumRef !='' and
not exists (Select T0.DocNum FROM OWOR T0 WHERE T0.DocNum = @DocNumRef AND T0.Type = N'D')
Select @error = 109, @error_message = 'Please enter an existing production order that is being referenced by this Standard Order'
END
Both Transaction notifications are blocking the user from adding documents if the necessary parameters are not met and the system produces an error.
2. If possible, I would appreciate if I'm shown the steps of how to save it in the HANA Studio. If there's a guide I can follow that would be great.
Reply will be appreciated
Kind Regards,
Pascale