Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

possible to determine when order entered from VBAP table

Former Member
0 Kudos

I am trying to answer the following business questions by running sql against the base tables of SAP.

1) What is the total dollar value of all orders entered for a given month, i.e. the month of September?

2) What is the total dollar value of all orders cancelled for a given month, i.e. the month of September.

I was looking in the VBAK and VBAP tables and saw some date fields such as aedat (date record entered) and erdat (date record last changed) but these do not seem to correlate to the date an order was entered and only sometimes to when an order was cancelled.

Is it possible to answer the 2 business questions from any tables in SAP? If so, what is the sql query I would need to use?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Every sales document contains the document date. (VBAK-AUDAT). select records from VBAK based on AUDAT.

If you want the total amount per sales document check NETWR from VBAK. If you want Items then check NETER from VBAP.

Regards,

Vamsi

4 REPLIES 4

Former Member
0 Kudos

Hi,

Every sales document contains the document date. (VBAK-AUDAT). select records from VBAK based on AUDAT.

If you want the total amount per sales document check NETWR from VBAK. If you want Items then check NETER from VBAP.

Regards,

Vamsi

venkata_ramisetti
Active Contributor
0 Kudos

HI,

It is a not a straight forward soltion for your requirement.

But you can get all the data from tables VBAK, VBAP, CDHDR & CDPOS.

Tables CDHDR & CDPOS contain the create/change history of the sales documents.

Thanks,

Ramakrishna

0 Kudos

Hi there,

So based on your response are you saying that the document date in the VBAK table is date I should use to determine when an order is booked. But you also refer to the create/change history tables. Does this imply that an order can be booked on a certain day and then changed or "rebooked" on another day? Or does it mean instead the document date field is reflective of any number of changes made to the order header field , not just when the order was booked and I need the create/change history tables to determine exactly what was changed?

0 Kudos

Hi Ramakrishna,

I have another question regarding the status of orders. Users of the SAP application make a distinction between when an order was entered in SAP and when it was confirmed. If the document date (AUDAT) field in the order header (VBAK) table indicates when the order was entered, where and how can I find the date the order was confirmed?

Regards,

Geraldine