IF :transaction_type='A' or :transaction_type='U' AND :object_Type='18' then
Declare Qty decimal (19,4);
Declare TQty decimal (19,4);
SELECT Max("VisOrder" )into RowCount from "PCH1" where "DocEntry"= :list_of_cols_val_tab_del;
While j <=:RowCount ...