Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3255

Stored Procedure for PO !!!

$
0
0

Hello Everyone,

 

I am trying to generate one SP to restrict purchase order having null value in row level field.

 

I have 1 scenario that in Purchase order we have created 1 UDF say U_SO(Sales Order No.). This UDF is auto filled through FMS for particular Item having open Sales Order. Now client requirement is to restrict purchase order if U_SO field is empty or null.

 

I have created 1 SP for this but its not working. can anybody suggest where I am wrong.

 

 

If @object_Type = '22' and @transaction_Type = 'A'

Begin

 

 

If Exists (Select OPOR.DocEntry from OPOR inner join POR1 on OPOR.DocEntry = POR1.DocEntry

where (POR1.U_SO Is Null or POR1.U_SO = '0') and OPOR.DocEntry = @List_of_cols_val_tab_del)

Begin

Select @error = -101,

       @error_message = N'Please enter Sales Order No.'

End

End

 

Thanks,

 

Harshal Makwana


Viewing all articles
Browse latest Browse all 3255

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>