cancel
Showing results for 
Search instead for 
Did you mean: 

problem on SBO Transaction notification

Former Member
0 Kudos

Dear all,

I wrote one simple SP with SPTransactionNotification for delete transaction type in user define object with object type 'Master data'.

DECLARE @CALC NVARCHAR(1)

SELECT @CALC = U_Calculated

FROM [@MSD_PERIOD]

WHERE [@MSD_PERIOD].Code = @list_of_cols_val_tab_del

IF @object_type = N'MSD_Period' AND @transaction_type = N'D'

AND @CALC = N'Y'

                                 

      BEGIN

        SET @ErrorID = 2

        SET @ErrorMessage = 'Please update this Document' +@list_of_cols_val_tab_del + '_' +@transaction_type

            END

But this SP with true conditions do not work  and do not send any Error Message and so delete data.

if I clear  condition  "@CALC = N'Y'" then SP send Error Message and work properly 'Please update this Document139301_D', But with the addition of this condition with true value don't send any Error Message!

when adding Variable "@CALC" to @errormessage , Return an error message is empty and Just return the error number= 2.

IF @object_type = N'MSD_Period' AND @transaction_type = N'D'

-- AND @CALC ='Y'

                                

      BEGIN

        SET @ErrorID = 2

        SET @ErrorMessage = 'Please update this Document'                           +@list_of_cols_val_tab_del + @transaction_type + @CALC

      END

As if the record is already deleted but record is exists!

Regards

Shayan

Accepted Solutions (0)

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please refer below SAP note, its similar to your issue:

1909417 - SBO_SP_TransactionNotification does not receive
notifications when deleting Territory

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hi Nagarajan,

I do n't access to SAP note.

Can you email the document to below address?

parvin.bahrami.2009@gmail.com


Thanks

Shayan


kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

If you follow on this forum, we can communicate directly.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hi Shayan,

Try:

IF @object_type = N'MSD_Period' AND @transaction_type = N'D'

BEGIN

IF Exists (SELECT Code

FROM [@MSD_PERIOD]

WHERE Code = @list_of_cols_val_tab_del AND U_Calculated='Y')

Begin

        SET @ErrorID = 2

        SET @ErrorMessage = 'Please update this Document'                           +@list_of_cols_val_tab_del + @transaction_type + @CALC

End

END

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

thanks for reply,

I try with your code and also Several similar code.

But this SP with true conditions do not work  with transaction type 'D' and do not send any Error Message and so delete data.

when debugging this code in SQL it is ok and  set Error Message and Error id.

Also,when try this code with transaction type 'U',it is ok.

but  with transaction type 'D', do not work  and delete data.

Thanks & Regards

shayan

Former Member
0 Kudos

Have you tried transaction type 'L'?

Former Member
0 Kudos

This object has not transaction type 'L'.

I need an operation when deleting data.