Skip to Content
0
Former Member
Mar 25, 2010 at 03:07 PM

Stop to remove Add-on document

10 Views

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