cancel
Showing results for 
Search instead for 
Did you mean: 

Block Batch entering without Expiry Date

former_member202778
Participant
0 Kudos

I want block null expiry date on OBTN through STPN.. Can anyone guide me on this.

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this:

IF @transaction_type in ('A') AND (@OBJECT_TYPE='10000044')

BEGIN

If exists (SELECT t0.AbsEntry  FROM OBTN T0 WHERE (T0.[ExpDate] IS NULL or T0.[ExpDate]=0) AND

t0.AbsEntry = @list_of_cols_val_tab_del)

Begin

SET @error = 1

SET @error_message = 'Please enter Expiry date'

End

End

Hope helpful.

Thanks & Regards,

Nagarajan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Try this...

IF (@object_type = '10000044') and (@transaction_type in ('A','U'))

BEGIN

IF EXISTS

(select AbsEntry FROM OBTN where ExpDate is null and AbsEntry = @list_of_cols_val_tab_del)

BEGIN

SET @error = 10

SET @error_message = N'Please Put Expiry Date First'

END END