Skip to Content
0
May 11, 2018 at 09:57 PM

Why is every UDF queried 9 times when a document is opened?

74 Views Last edit May 11, 2018 at 09:59 PM 2 rev

We recently expanded to a 2nd building and over the secure point-to-point VPN between buildings it takes SAP 30-40 seconds to open a document. To try to figure out what was happening I ran a trace via the Profiler then opened a blank sales order. There were around 800 of the messages below, one for each of the 88 UDFs on RDR1. Not only that but it queried all 88 in sequence nine times! I checked and the same things happens in SAP on the local network but it's not noticeable until you have a little lag. Why the heck is SAP doing this and how can I stop it?

exec sp_executesql N'SELECT T0.[RelUDO] FROM [dbo].[CUFD] T0 WHERE T0.[TableID] = (@P1) AND T0.[AliasID] = (@P2) ',N'@P1 nvarchar(21),@P2 nvarchar(19)',N'RDR1',N'NumSeats'

Using SAP B1 8.82 PL19