Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Former Member
replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question