cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate PO in Sales Order

Former Member
0 Kudos

Hello Friends,

I have a requirement like to restrict creation Sales order containing duplicate PO number, I changed the setting in T.Code VOV8 for order type i set check PO number field as A, Now its now allowing to create orders having duplicate PO number,

But the main problem is if both the orders we are creating at the same time and saving it, its not showing any error, both the orders are getting created. Can any body help me out to solve this issue.

Thanks in Advance.

Sunita

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hello MK,

We have done this requirement through user exit. We have written coding to check the
PO number while saving the sale order in USEREXIT_SAVE_DOCUMENT user exit.


Thanks,

Sunita

former_member211616
Active Contributor
0 Kudos

Hi Sunita,

Thanks for your reply
,

Even I have tried to do so
, however, with the same PO sales order created,

I think it's taking time to update in the database,

Some time with my old client has the same problem

They you to create the sales order through Bapi,

Sometime the sales order duplicated at that time we use to reject one sales order

Very good observation
..

Regards
Ramesh Prusty

Former Member
0 Kudos

Ya, but for this exclusive case i need the solution....... help me to find any other solution...

moazzam_ali
Active Contributor
0 Kudos

Hi Sunita

Could you check with your ABAPER that after entering PO number and before saving does system save that PO number in some temporary structure like XVBKD may be. I am not sure about it but I hope system must be saving it in some structure and may be ABAPER can validate it. It looks difficult but you can give it a try.

If you cannot control this through ABAP then 2nd possibility could be through authorization check but it depends how many users you have who can create order at the same time and how many order types are there for sale order?

Thank$

Former Member
0 Kudos

Hi,

How did you resolve it, please let us know. same problem facing here.

ty,

mk.

Former Member
0 Kudos

Sorry for the type mistake, Its Now its not allowing to create orders having duplicate PO number,

It's already there for in OVAH for error message, and its working also....

i m asking if we will open VA01 t.code in two tabs then we will try to create the orders with same PO and customer number and will save it with in fraction of second difference then it's not showing the error message, orders are getting created... so i want to restrict this kind of problem.. pls help me

srinu_s1
Active Contributor
0 Kudos

This may be exclusive case,creating multiple sales orders with same PO number, with in fraction of seconds.

System will take to some time to update the data in tables.

Thanks,

Srinu.

Former Member
0 Kudos

Hi Sunita,

As per my understanding you have set  the sales document it's checks with "A" for check purchase order. It will show only warning message.

Now you need to do one thing more that is change this warning message to an 'error' message.

For this:

Run t.code SPRO - > Sales & Distribution-> Sales-> Sales Doc-> Define Variable Messages

-> select the message and change from W to E in System message category and save.

Else you can run T.code OVAH. and set the message as 'E' - error.

Hope this will help you.

Regards

-AJC

srinu_s1
Active Contributor
0 Kudos

Thanks Ashish for sharing new thing to me. Really i did not aware of this functionality.

I tested it. It was working fine, giving error message.

Thanks,

Srinu.

srinu_s1
Active Contributor
0 Kudos
Now its now allowing to create orders having duplicate PO number,

Please check the above once again, I think the above is typo error.

Even though you put A, still system will allow to create sales order with the same PO number which you created earlier.However, system shows only warning message.This is standard behavior only.

If you want error message instead of warning message you need to develop this with help of ABAP'er.

You may use the below exit.

USEREXIT_SAVE_DOCUMENT_PREPARE  in Program MV45AFZZ

Thanks,

Srinu.

Message was edited by: Srinu S