Within this book, you have already found quite a few example queries. There is no exception in this chapter. I do believe query by example is one of the most efficient ways to learn queries.
A user is trying to block outgoing payments (Object 46) for a specific Business Partner for some reason by using the following SP:
IF (@Object_Type = '46') AND (@transaction_type in (N'A', N'U')) BEGIN IF EXISTs (SELECT T0.[DocEntry] FROM OVPM T0 WHERE T0.[DocEntry] = @list_of_cols_val_tab_del and T0.CardCode = 'V0271') BEGIN SET @error = 10 SET @error_message = N'Block BP' END END
However, this SP blocks all outgoing payments for all BP Codes. What is the problem with this ...