Quantcast
Channel: SCN : Unanswered Discussions - Reporting and Printing
Viewing all articles
Browse latest Browse all 776

Need an SP for UDO or UDT

$
0
0

Hi Experts

 

I need an SP for UDT or UDO  for SAP Business One

 

ex: I have fields like

 

 

Code                     Indent                shade  

1                              1234                    RED

2                               1234                    RED

 

 

Now it should throw an Error that  "Same Indent should not have same shade"

 

 

 

 

Code                     Indent                shade  

1                              1234                    RED

2                               1234                    Black

 

And if it is having different shade then it should get added or updated

 

 

I have written an SP  but it is not working

 

If(@object_type = 'OTP' and (@transaction_type = 'A' or @transaction_type = 'U'))

Begin

IF EXISTs (SELECT T0.U_Shade FROM  [dbo].[@OTP]  T0

WHERE T0.DocEntry = @list_of_cols_val_tab_del and T0.U_shade  not in

(select U_shade FROM [@OTP] WHERE U_Indent != T0.U_Indent and U_shade <> T0.u_SHADE ))

Begin

SET @error = 112

SET @error_message = N'same shade cannot be entered for same Indent'

End

END

 

 

 

please do workout on this and help us

 

 

Regards

Jenny


Viewing all articles
Browse latest Browse all 776

Trending Articles



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