Skip to Content
0

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

Apr 04, 2017 at 06:28 AM

39

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Rizki Wicaksana Apr 04, 2017 at 07:52 AM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Nagarajan K Apr 04, 2017 at 01:56 PM
0

Hi,

Please check SAP note, you may get some idea.

1320484 - Business One - Stored Procedures

Regards,

Nagarajan

Share
10 |10000 characters needed characters left characters exceeded
Rizki Wicaksana Apr 04, 2017 at 01:54 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded