cancel
Showing results for 
Search instead for 
Did you mean: 

Duplication of Customer Ref No

former_member419030
Active Participant
0 Kudos

Dear Experts,

I'm using SAP B1 Version 9.2.

The standard standard system behavior is, if I set warning at document setting

for duplicate Ref No, the system will prompt the alert/warning only after I click add if there is duplicate Ref No. This also apply to approval procedure.

My concern is, sometimes I have a long list of items in my documents, and it waste my time to key in all the items and after that when click add, I noticed that the Ref No I used at the header is duplicate with other documents.

Is there any way for the alert to pop out after I key in the Ref No, I mean before I key in the row details. I know, this actually can be done using previous version, below 9.0, but why current version cannot?

I went trough the forum, and found out below solutions, but seems i could not understand them because of little experience in SAP.

1) SP Notification,

2) Formatted search

3)Store procedure

Maybe someone can explain to me?

Accepted Solutions (0)

Answers (3)

Answers (3)

Johan_H
Active Contributor
0 Kudos

Hi,

As agustinmarcos mentioned, you do not loose your data. You do not have to enter all the items again, al you have to do is change the reference.

However, you can also create a FMS to automatically give you a unique reference number. For example:

SELECT $[ORDR.CardCode] & '_' & CAST(GETDATE() AS NVARCHAR)

which you trigger at the change of CardCode.

Regards,

Johan

former_member419030
Active Participant
0 Kudos

Dear Johan,

Thank you so much.

Currently, I created FMS and it is working fine , notify user immediately after user key in duplicate Ref No.

It is impossible to substitute the FMS with block function right?

Thank you again

Johan_H
Active Contributor
0 Kudos

Hi,

Unfortunately there is no simple way to block the user from entering items when they enter a duplicate reference.

The only way would be to build an addon.

Regards,

Johan

former_member419030
Active Participant
0 Kudos

Dear Johan,

Well noted.

Thank you.;)

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

The best option is the stored procedure.

You can define the validations here, and before adding the new document you can verify in the table ADOC if exists any document with the same reference number for BP and fiscal period for example.

If your conditions are true, the stored procedure will block the document.

Kind regards

Agustín

former_member419030
Active Participant
0 Kudos

Dear Agustin.

Thank you so much.

Actually. I had try the stored procedure, and its worked.

However, it will only block the document after I click add for the document.

My concern is to make the system, check the duplicate Ref NO and alert me, immediately after i insert the duplicate REF NO.

I have many lines of item, sometimes hundreds, and I only know i cannot add the documents, after adding all the items, it will waste my time.

Thank you.

agustin_marcoscividanes
Active Contributor
0 Kudos

Hi

when you block the document, the user has this document in the form, data will not be lost.

Another option is through the stored procedure:

1. apply your conditions.

2. Create a user table with one field, called text message or something like that. Add a new field called date with the document creation date.

3. Insert a new record in this table when your conditions are true, with the last document number having the same document reference.

4. Create a new alert querying all records from the last day, or the criteria you need.

Kind regards

Agustín

former_member419030
Active Participant
0 Kudos

Dear Agustin,

Thank you so much.

Looks like it is impossible to create the blocking function immediately after user key in duplicate Ref No, unless i have enough knowledge about SP.

I will stick to FMS for a while and try to understand the SP writing process first

thank you so much

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

In general, the customer reference is unique and it will not be same for all customer/vendors. But some times, due to adding of new items under same reference number is possible. So system prompt an warning message or blocking message while adding the document.

System does not know until to add the document. If I am not wrong, old version is also works with same logic.

SP Notification & Stored procedure--> Adding query in SQL server management studio to block the adding/updating of document. Using this, system allows user to enter all lines and it will block only while adding the document.

Formatted search--> Using this Formatted Search Query, we can display those orders with same reference before adding lines. But, it will not block the adding document.

Regards,

Nagarajan

former_member419030
Active Participant
0 Kudos

Dear Nagarajan.

Thank You so much.

I understand your explanation.

Let say, I want to ignore the item level or I do not have items under same reference number, so, i want the alert prompt before I key in the Item.

Can I perform that action?

Thank You