cancel
Showing results for 
Search instead for 
Did you mean: 

Query to get the 'Date' when the Sales order DocStatus become 'Close'

Former Member
0 Kudos

Hi experts,

I am trying to find out when the sales Order is closed. ie., the Date when the Sales Order Docstatus become 'Close'.

I have checked with the ADOC table, but I cant find out.I can see 'UpdateDate' field, its not showing the updated date.

or

Shall I consider the Document Date of Delivery/Invoice documents as Closing Date for the Sales Order.If it is preferrable, then in case, if user manually close the sales order, how to get that date.

Any help is appreciated.

Thanks in Advance.

Parvatha Solai.N

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

So we used the date of creation of target documents as sales order closing date?

Former Member
0 Kudos

Hi Parvatha,

If the user closing sales order manually one more record will be inserted with same docnum and docstatus as closed and the docentry will be incremented.

where as it closed by the target documents no more new records inserted and the docstatus will be changed to closed in the same record.

I think you can use this comparison.

edy_simon
Active Contributor
0 Kudos

Hi Parvatha,

I've once tested in 881.PL10.

There was a problem in the ADOC table.

ie. When my user copy 1 SO to 1 DN-> the ADOC will have an entry of this closing.

But if I copy from multiple SO to 1 DN-> the ADOC of these SOs does not have entries of this closing.

You might want to check if this problem still happens on your version.

If it is still happening, then I would suggest to combine :

1. Those SO closed by manual : get from ADOC table. You can get the Update Date of the first record After this SO is in  closed status.

2. Those SO closed by copying to DN/ARINV, Get the last createDate of the target document(s).

Regards
Edy

Former Member
0 Kudos

Hi ,

Thanks for your reply.

1.)In ADOC table, UpdateDate field not showing the appropriate date.

For Instance, I have copied a SalesOrder to Delivery today.Automatically, Sales Order is closed.

But, for the same sales order, In ADOC table, updateate field does not have today date.

Any suggestion ...

Thanks in Advance,

Parvatha Solai.N

edy_simon
Active Contributor
0 Kudos

Hi Parvatha,

How adoc work is it keeps the previous instance in the adoc table and the latest updated in the ordr table.

So when you close your so now, the update date of the closing is in the ordr table not in the adoc.

As I have mentioned in my previous post, this adoc table is not very dependable. You better get the closed date from the target document.

Regards,

Edy.