Skip to main content

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

Comments

3 comments

  • Rasmus 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.

    0
  • Morten Lilbæk 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;

    0
  • Rasmus 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

    0

Please sign in to leave a comment.