cancel
Showing results for 
Search instead for 
Did you mean: 

Intercompany add-on ignores SBO HANA TransactionNotification

oscar_zamora
Explorer
0 Kudos

Hi,

I am installing the Intercompany add-on 2.0.14 in SAP Business One HANA 9.1 PL09,  the company have scripts in SBO_SP_TransactionNotification to control some operations such as the name of the business partner not go blank. The point is that once installed the results of TN are ignored by CTX_IC_SP_TRANSACTIONNOTIFICATION (called by TN at end of procedure)  for example,lets you create business partners with the name blank. I made the same test in SQL environment and not has problem, gives this problem only in HANA..... any idea ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

yash_rastogi31
Active Participant
0 Kudos

Hi Oscar,

There is no difference in CTX_IC_SP_TRANSACTIONNOTIFICATION stored procedure in term of behavior in SQL or HANA DB.

It seems that you are doing some customization in SBO_SP_TransactionNotification.

This issue is not due to CTX_IC_SP_TRANSACTIONNOTIFICATION stored procedure.

It may be a behavior of HANA DB.

Once you create a custom procedure and call it from SBO_SP_TransactionNotification it ignores all  previous validation that exist in SBO_SP_TransactionNotification before the calling of custom stored procedure.

If you want to execute your own custom validations you have to write your custom code after calling CTX_IC_SP_TRANSACTIONNOTIFICATION.

Following sample code runs successfully in HANA DB:

-- Select the return values

CALL ACME_US."CTX_IC_SP_TRANSACTIONNOTIFICATION"(object_type,transaction_type, num_of_cols_in_key,list_of_key_cols_tab_del,list_of_cols_val_tab_del,:error,:error_message );

IF(:transaction_type = 'U' And  :object_type = '2')

      Then

      RecordCount :=0;

     Select Count(*) into RecordCount from OCRD where "CardCode"=:list_of_cols_val_tab_del and ifnull("CardName",'')='';

     IF(:RecordCount>0) THEN

          

       error := 1;             

       error_message:=N'Invalid  Code';     

   

      End if;

End if;

select :error, :error_message FROM dummy;

Regards,

Yash

oscar_zamora
Explorer
0 Kudos

Hi Yash,

Thanks for explanation, you are right. For enhancement the procedure execution time,I wrote the procedure call at the end but it runs only when custom validation is correct, as follows:

if (:error=0) then

   CALL ACME_US."CTX_IC_SP_TRANSACTIONNOTIFICATION"(object_type,transaction_type, num_of_cols_in_key,list_of_key_cols_tab_del,list_of_cols_val_tab_del,:error,:error_message );

endif

Regards,

Oscar

yash_rastogi31
Active Participant
0 Kudos

Hi Oscar,

It is standard behavior of SAP Business one HANA SP transaction notification. Good practice is that instead of  writing validation on SP Transaction Notification call custom stored procedure form SP transaction notification

Regards,
Yash

Answers (0)