HANA Stored Procedure bug (SAP 9.1 PL09/9.2 and higher on HANA)

Follow

Comments

3 comments

  • Avatar
    Rasmus Wullf Jensen

    FYI: With SAP Business One 9.1 PL10 SAP now solves this issue for new databases by making ObjectType 30 chars default.

    Existing databases still need to apply above option 2 to resolve the issue.

    As a service note it also mean that if you work with other Addons/SSPs that use the StoredProcedures with custom code you should expect that they need to update their custom SQL to ObjectType = 30 instead of 20...

    It does not affect B1UP further as we do not add custom code to SBO_SP_TransactionNotification.

  • Avatar
    Morten Pedersen

    Warning: Only use on databases that does not have any modifications!

    Script that modifies the procedures to work correctly:

    DROP PROCEDURE SBO_SP_PostTransactionNotice;
    -- B1 DEPENDS: BEFORE:PT:PROCESS_START

    CREATE PROCEDURE SBO_SP_PostTransactionNotice
    (
    in object_type nvarchar(30), -- SBO Object Type
    in transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
    in num_of_cols_in_key int,
    in list_of_key_cols_tab_del nvarchar(255),
    in list_of_cols_val_tab_del nvarchar(255)
    )
    LANGUAGE SQLSCRIPT
    AS
    -- Return values
    error int; -- Result (0 for no error)
    error_message nvarchar (200); -- Error string to be displayed
    begin

    error := 0;
    error_message := N'Ok';

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

    -- ADD YOUR CODE HERE

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

    -- Select the return values
    select :error, :error_message FROM dummy;

    end;

    DROP PROCEDURE SBO_SP_TransactionNotification;
    -- B1 DEPENDS: BEFORE:PT:PROCESS_START

    CREATE PROCEDURE SBO_SP_TransactionNotification
    (
    in object_type nvarchar(30), -- SBO Object Type
    in transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
    in num_of_cols_in_key int,
    in list_of_key_cols_tab_del nvarchar(255),
    in list_of_cols_val_tab_del nvarchar(255)
    )
    LANGUAGE SQLSCRIPT
    AS
    -- Return values
    error int; -- Result (0 for no error)
    error_message nvarchar (200); -- Error string to be displayed
    begin

    error := 0;
    error_message := N'Ok';

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

    -- ADD YOUR CODE HERE

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

    -- Select the return values
    select :error, :error_message FROM dummy;

    end;

  • Avatar
    Rasmus Wullf Jensen

    FYI Regarding known issues with this SAP Change:

    - beas add-on aleready correct this in latest version

    - Orbis TaskCenter fixes this from version 2.2

Please sign in to leave a comment.

Powered by Zendesk