cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable adding Delivery without base doc (Sales Order)?

MeghanWilliams
Newcomer
0 Kudos

I am a superuser withing SAL Version 10.0 - Database:HANA. How do I disable the option to add Delivery with no Base Document? ie:Delivery Block

View Entire Topic
SonTran
Active Contributor
0 Kudos

Hi,

Use Transaction Notification to block, try this

IF :object_type = '15' and :transaction_type = 'A' 							
	THEN
		BEGIN
			IF EXISTS ( 
						select T0."DocEntry" from ODLN T0 inner join DLN1 T1 on T0."DocEntry"=T1."DocEntry"	
						where T0."DocEntry" = :list_of_cols_val_tab_del
							and T0."CANCELED"='N'
							and T0."DocType"='I'
							and T1."BaseType"=-1
						) 
			THEN
				BEGIN
						error := 1501;
						error_message := N'This Delivery is not linked to Base Document, check again.';
				END;
			END IF;

		END;
	END IF;		

Hope this helps,

Son Tran