cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction notification isn't called for UDT Add in SAP Business One for HANA

former_member390407
Contributor

Dear Experts,

I run SAP Business One version for HANA 9.3 PL 03. I have a table called "@DONE_AIRCRAFTS" and a small script in SBO_SP_PostTransactionNotice:

IF (:transaction_type = 'A' OR :transaction_type = 'U') AND object_type
= '-3  @DONE_AIRCRAFTS' THEN  
    CALL "DONE_ADD_COMMAND" ('A', :list_of_cols_val_tab_del);  
END IF;

I realized that this script is called only for update events. To investigate this problem I added the following to the SBO_SP_TransactionNotification procedure:

error_message := :transaction_type;
error := 1;

There is nothing else customized in the procedure.

When I try to add or update a system object (such as Item) I get the following message: (1) A/U. That is the expected behaviour.

Same with UDTs when I try to update or delete entry I get (1) U/D.

But when I add new entry to a UDT it allows me to perform the operation without any messages.

I have the same version of SAP for SQL Server (9.3 PL 03) and this issue isn't reproduced there.

I traced SQL for this operations and what I have in my trace log:

For Add:

---------------------------------------------------------------------------------

# begin PreparedStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:35:11.915234

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

cursor_140348040675328_c26171.execute(''' Insert into "****"."@DONE_AIRCRAFTS" ("Code","Name","U_MAKE","U_MODEL","U_IS_ACTIVE") values("@DONE_AIRCRAFTS_S".NEXTVAL, ?, ?, ?, ?) ''', (u'''dfsa''', u'''daf''', u'''fsda''', u'''Y'''))

# end PreparedStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:35:11.931249

# begin prepareStatement (thread 20773, con-id 326171) at 2018-08-08 16:35:11.944490

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

cursor_140336061175808_c26171 = con_c26171.cursor()

# end prepareStatement (thread 20773, con-id 326171) at 2018-08-08 16:35:11.944651

-------------------------------------------------------------------------------------------------------

For Update:

--------------------------------------------------------------------------------------------------------

# begin PreparedStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:37:50.010918

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

cursor_140342842218496_c26171.execute(''' UPDATE "@DONE_AIRCRAFTS" T0 SET T0."U_MAKE" = ? FROM "****"."@DONE_AIRCRAFTS" T0 WHERE T0."Code" = (?) AND T0."U_MAKE" = (?) ''', (u'''btergdvwsvd''', 7, u'''sdfsd'''))

# end PreparedStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:37:50.013104

# createStatement call (thread 20773, con-id 326171) at 2018-08-08 16:37:50.026070

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

cursor_140333914032128_c26171 = con_c26171.cursor()

# begin CallableStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:37:50.026161

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

cursor_140333914032128_c26171.execute(''' CALL "****"."SBO_SP_TRANSACTIONNOTIFICATION"(?,?,?,?,?) ''', (u'''-3\x09@DONE_AIRCRAFTS''', u'''U''', 1, u'''Code''', u'''7'''))

# end CallableStatement_execute (thread 20773, con-id 326171) at 2018-08-08 16:37:50.027615

# begin rollback (thread 20773, con-id 326171) at 2018-08-08 16:37:50.041030

# con info [con-id 326171, tx-id 27, cl-pid 4900, cl-ip 192.168.180.51, user: SYSTEM, schema: ****]

con_c26171.rollback()

# end rollback (thread 20773, con-id 326171) at 2018-08-08 16:37:50.042456

------------------------------------------------------------------------------------------------

Looks like transaction notification isn't called for Add event at all.

Has anyone faced the same issue? Do you know how to make it work appropriately or I need to create a support ticket?

Many thanks in advance!

Accepted Solutions (0)

Answers (0)