Skip to Content

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

Need Sp query for purchase order

Dear Experts,

I want one SP Query.

When i making purchase order. If i am adding a item in PO and price ill come automatically according to vendor wise price. But i don't want edit price.

If i edit price Document should not to be add and error message need to display.

This is my SP query.It is not working on above condition

if @object_type=22 and  @transaction_type='u'

begin

declare @price int

set @price=(select price from ospp where ItemCode=@list_of_cols_val_tab_del )

begin

if exists(select opor.DocNum from OPOR  INNER JOIN POR1  ON

opor.[DocEntry] = por1.[DocEntry] where por1.Price<>@price and por1.ItemCode=@list_of_cols_val_tab_del )

begin

set @error = -1

set @error_message = 'price cannot to be edit'

end

end

end

Thanks & Regards

ram

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question