The SP_TransactionNotification is to receive notification on any transaction – in other words to do some validation in SAP Business One and prevent the user from doing an action if the validation condition fails. This stored procedure(SP) is created automatically with each database.This stored procedure is fired whenever operations are performed on business objects like document or master records and User-Defined Objects.

The SBO_SP_TransactionNotification stored procedure is created automatically when new company is created in SAP Business One.

SBO_SP_TransactionNotification

Below are the parameters:

Parameter Description
@objecttype returns a string representing the type of object which is a numerical value
@transaction_type

It may have values of:

  • A (where a record was added)
  • U (where a record was updated)
  • D (where a record was deleted),
  • C (where a document was canceled)
  • L (where a document was closed)
@list_of_cols_val_tab_del This returns a tab-delimited list of values required to retrieve the object from B1.
@error a integer value shows the number
@error_message message needs to be show as a message to user

please make sure you always go through the “@error, @error_message” at the end, especially in the case where you want the transaction to be considered as successful. Without the return of these 2 values, SAP Business One will consider the transaction as failed.

 

Adding Code to the Stored Procedure

Look at a sample code that uses it. The SBO_SP_TransactionNotification stored procedure should be modified to include the following Transact-SQL code. Add the following text to the section of the stored procedure that says “Add Your Code Here”

SBO_SP_TransactionNotification

Sample Code

SBO_SP_TransactionNotification

 

Sample Code for multiple notifications

SBO_SP_TransactionNotificationOnly the query needs to be change according to your need.

 

DisablingComment Code

Comment within SQL statements do not affect the statement execution. You can comment statement in to ways.

In line comments < — > or block comment < /*  */>

 

Sample Code

 

SBO_SP_TransactionNotification

 

Difference between PostTransactionNotice and TransactionNotification procedure

 

The only differences being when they are triggered and the ability to use the @error functionality of SBO_SP_TransactionNotification to rollback transactions. SBO_SP_PostTransactionNotice can only be triggered at the end of an action (transaction committed). Most users only use SP_TransactionNotification because it can be used to verify data to block unwanted posting.

You can buy Cialis online from India.

The following documentation is available:

  • https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf

TransactionNotification of SAP Business One HANA

  • Implementing SBO_SP_Transaction_Notification of SAP Business One, version for SAP HANA
  • sap hana sql script – YouTube..

New NetWeaver Information at SAP.com

Very Helpfull

 

 

User Rating: Be the first one !