on 03-25-2010 3:07 PM
Hi all SAP experts
Following TRANSACTION _ NOTIFACATION QUERY I AM CREATE TO STOP Deleting the RECEPT FROM LOG CUTTING SCREEN. But this query not works properly. This procedure stop deleting every time. But I have some condition
RECEPT FROM LOG CUTTING SCREEN GENERATE TWO NUMBER ONE IS Receipt From Prod No AND ANOTHER Good Receipt No .
I WANT WHEN Receipt From Prod No OR Good Receipt No . Anyone OF Them IS NOT NULL THEN THE DOCUMENT DOSE NOT REMOVE. IF Bout NUMBER IS NULL THEN DOCUMENT Permitted to delete . Please suggest me any Solution for this procedure
==============================
if @transaction_type='D'
and
@object_type='SSPL_UDO_DD_LOGCUT'
begin
if exists (SELECT T0.[DocEntry] FROM [dbo].[@SSPL_DD_LOGCUT] T0 WHERE T0.DocEntry=@list_of_cols_val_tab_del and T0.[U_RCPTNO] IS NOT NULL OR T0.[U_RCPTNO1] IS NOT NULL)
begin
set @error=10
set @error_message='this document can not deleted'
end
end
=========================
AND
=================================
if @transaction_type='D'
and
@object_type='SSPL_UDO_DD_LOGCUT'
begin
if not exists (SELECT T0.[DocEntry] FROM [dbo].[@SSPL_DD_LOGCUT] T0 WHERE T0.DocEntry=@num_of_cols_in_key and T0.[U_RCPTNO] IS NULL AND T0.[U_RCPTNO1] IS NULL)
begin
set @error=10
set @error_message='this document can not delete'
end
end
Try to use brackets to assign the appropriate sequence of the logical operators:
if @transaction_type='D'
and
@object_type='SSPL_UDO_DD_LOGCUT'
begin
if exists
(SELECT T0.DocEntry FROM dbo.@SSPL_DD_LOGCUT T0
WHERE T0.DocEntry=@list_of_cols_val_tab_del
and (T0.U_RCPTNO IS NOT NULL OR T0.U_RCPTNO1 IS NOT NULL) )
begin
set @error=10
set @error_message='this document can not deleted'
end
end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.