cancel
Showing results for 
Search instead for 
Did you mean: 

Trava data vencimento no lote

0 Kudos

Estou tentando criar uma trava que bloquei a entrada de lotes sem que a data de vencimento seja preenchida, estou usando o script abaixo sem sucesso.


IF :object_type= '10000044' AND (:transaction_type = 'A' OR :transaction_type = 'U')THEN

SELECT COUNT(*) INTO cnt From OBTN T0

Where T0."AbsEntry" = :list_of_cols_val_tab_del

AND T0."ExpDate" IS NULL;

IF :cnt > 0 THEN

error := '253';

error_message := 'Preencha data vencimento do lote';

END IF;

cnt = 0;

END IF;END

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi freejack,

TransactionNotification can be enabled and disabled for some specific object by setting in [CompanyDB].CTNS table.

By default, following objects are registered into CTNS as NOT to send the three kinds of notifications: SEVT, SBO_SP_TRANSACTIONNOTIFICATION, SBO_SP_POSTTRANSACTIONNOTICE:

10000044 (BTN), 10000045 (SRN), 10000066 (SRQ), 10000067(BTQ), 310000008 (BTW), 10000062 (IVL), 310000000 (IVK), 310000003 (IVQ), 310000005 (IVE)

For your reported issue, by default, object 10000044 (BTN) seems set to be registered into this table as NOT, so you will need to set or update it to YES manually.

You can update it as below:

Update CTNS Set "EnableTn" = 'Y' Where ObjectId= '10000044'

Update CTNS Set "EnablePTn" = 'Y' Where ObjectId= '10000044'

Please refer to SAP Note 1320484 for the details about this.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

0 Kudos

Funcionou perfeitamente, Obrigado!!!

Answers (0)