2007 Sep 13 8:14 AM
Hi everybody,
I have to produce a query which outputs header data from VBAK .
As a further column I also need for each document the sum of the taxes (VBAP-MWSBP).
But if I put VBAP in the JOIN definition of SQ02 I get as many records as positions.. which is not correct.
Is thare any way I can solve it?
Thanks,Christian
2007 Sep 13 8:46 AM
Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf">SAP Query (BC-SRV-QUE)</a>
1 - keep your query and create a display variant with a level of summarization
2 - remove the table join, and define VBAP as a structure, managing yourself the selection and grouping of data in a small abap routine.
Regards
2007 Sep 13 8:46 AM
Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf">SAP Query (BC-SRV-QUE)</a>
1 - keep your query and create a display variant with a level of summarization
2 - remove the table join, and define VBAP as a structure, managing yourself the selection and grouping of data in a small abap routine.
Regards
2007 Sep 13 8:57 AM
Thank you,
I'll try and let you know (and reward you eventually..)
2007 Sep 13 9:39 AM
2012 Jun 15 3:18 PM
Hi Christian,
I know this post is going back many years....but how did you resolve this issue?
I am new to SAP queries and very limited knowledge of ABAP code
Thanks
2012 Jun 15 4:12 PM
Raymond's response if excellent, IMHO, but in this case, you may want to obtain the aid of an ABAP guy to get and summarize VBAP for you...since the relationship of VBAK to VBAP is typically one to many, a join would resut in a row of VBAK for every VBAP row....
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |