cancel
Showing results for 
Search instead for 
Did you mean: 

avoid duplicate manuval document numbering for users screen

Former Member
0 Kudos

Hai to All.

Here we give manual docment numbering (user can enter any number that store in docnum) for our screen.It allow duplicate docnum to save.It gave an error as stoped by ui dpi.But it save the record.How can i avoid other than sbo transaction procedure?

Any body can u help me ? urjent please...........

Regards,

Ramya.

Accepted Solutions (0)

Answers (2)

Answers (2)

senthil_m
Active Contributor
0 Kudos

Hi,

To avoid this issue

IF @transaction_type IN (N'A', N'U') AND @Object_type = '18'

BEGIN

declare @count int

set @count =

(

SELECT count(T0.DocNum) FROM OPCH T0 WHERE T0.NumAtCard

IN (Select NumAtCard FROM OPCH where DocEntry <> @list_of_cols_val_tab_del and opch.cardcode = t0.cardcode)

AND T0.DocEntry = @list_of_cols_val_tab_del

)

if @count > 0

BEGIN

SELECT @Error = 1, @error_message = 'Duplicate AP Invoice'

END

END

Thanks and Regards,

Senthil Maruthappan.

Team Work Never Fails.

senthil_m
Active Contributor
0 Kudos

Hi,

Please post this question in the sap Business One SDK Forum

Why canu2019t we maintain the user document number as a primary key and also the unique. As you said we can able to stop such a document number duplication issues in SP Transaction Notification.

Thanks and Regards,

Senthil Maruthappan.

Team Work Never Fails.