Skip to Content
avatar image
Former Member

A/R Invoice as mandatory in HANA

My Code is

if transaction_type in ('A','U') and object_type = '13'

BEGIN

   if exists (SELECT * FROM   OINV WHERE (ISNULL(Comments,'')) = '' and OINV.DocEntry = list_of_cols_val_tab_del)

BEGIN

--SELECT Error =11, error_message = 'You have not filled the A/R Invoice Remarks, Kindly Check'

error := 11;

error_message := N'You have not filled the A/R Invoice Remarks, Kindly Check';

END

END

Please help with the correct syntax.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 26, 2015 at 10:38 AM

    Hi,

    Try This...

    if :object_type='13' and (:transaction_type='A' or :transaction_type='U')

    then

    select COUNT(*) into cnt from "OINV" where "DocEntry"=:list_of_cols_val_tab_del and IFNULL("Comments",'')='';

    if :cnt>0 then

                error := -112;

                error_message := 'Enter Remarks';

          end if;

    end if;


    Regards

    Bhanu

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2015 at 09:25 AM

    Hi,

    Try This

    if transaction_type in ('A','U') and object_type = '13'

    BEGIN

       if exists (SELECT DocEntry   FROM   OINV WHERE (ISNULL(Comments,'')) = '' and OINV.DocEntry = list_of_cols_val_tab_del)

    BEGIN

    --SELECT Error =11, error_message = 'You have not filled the A/R Invoice Remarks, Kindly Check'

    error := 11;

    error_message := N'You have not filled the A/R Invoice Remarks, Kindly Check';

    END

    END

    Regards

    Bhanu

    Add comment
    10|10000 characters needed characters exceeded