cancel
Showing results for 
Search instead for 
Did you mean: 

Better way to identify that the object being added or updated is a marketing document?

rajesh_khater
Active Participant
0 Kudos

Hi,

In SP_Transaction_Notification, I want to add a validation for a UDF in Marketing Document Rows. How can I identify that the stored procedure is triggered for a marketing document, without comparing the @object_type to each of the possible values like 18, 13, etc.

If there a single clean mechanism which can identify that the object being added or updated is a marketing document, without checking individually for AR Invoice, AP Invoice, AR Credit Memo, and so on?

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Hi,

You should filter it with object type. If you don't filter it with object type, it will affect all the transactions.

Because @object_type is one of parameters from SBO_SP_TransactionNotification.

The example :

if @object_type IN ('17','16','15','14','13',....) and @transaction_type IN ('A', 'U')

BEGIN

.......

END

Please refer to this blog :

https://blogs.sap.com/2009/05/22/the-sptransactionnotification-stored-procedure/

Hope this helps 🙂

Regards,

Rizki W

rajesh_khater
Active Participant
0 Kudos

What are the object types for all the marketing documents? Is it possible to make another query based on @object_type to check from another table whether that object_type is a marketing document or not?

Ideally, instead of comparing object_type to the list of possible values for marketing documents, I would have preferred any alternate approach which can straight away tell whether the object type is a marketing document or not, but if that is not possible, that please tell me all the possible object type values for marketing documents.

Thanks.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check SAP note, you may get some idea.

1320484 - Business One - Stored Procedures

Regards,

Nagarajan

0 Kudos

Hi,

Your alternate approach is not possible in SP_Transaction_Notification.

How to find the object type from SAP B1 :

1. Refer from the list :

https://blogs.sap.com/2013/07/09/sap-business-one-form-types-and-object-types/

2. Find it manually from SAP B1 table.

for example : create purchase order manually from SAP B1 then run query : select objtype from OPOR

Hope this helps 🙂

Regards,

Rizki