cancel
Showing results for 
Search instead for 
Did you mean: 

A/R Invoice as mandatory in HANA

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks....

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

There is an error in Hana