I'm looking for BAPI or Function Module which allows me to get actual invoiced sales volumes (same as transaction KE24
) from SAP ERP database.

- 11,934
- 5
- 22
- 48

- 13
- 1
- 4
-
I'm not sure it fits your needs, but have a look at BAPI_COPAQUERY_GETACC_ACTDATA. You can query COPA value fields with it, so you should be able to get your data out, as long as it is contained in value fields. – Dirk Trilsbeek Oct 16 '15 at 08:45
-
Looks like it's exactly what I need. Do you have any example or detailed documentation for this FM? – Kuzya987 Oct 18 '15 at 12:15
-
If you have access to a SAP system you can get the documentation from within the system (open the function module in transaction SE37, there is a button for showing the documentation). I'm not sure if it is legal to publish this documentation on the internet. Google has a few details on the FM, but nothing detailed. – Dirk Trilsbeek Oct 18 '15 at 12:46
-
Documentation that exist in SE37 also very limited. Actually, I need a list of valid fields for 'SELECTEDFIELDS' Table and example af selection. Goolge doesn't have much information, unfortunately. – Kuzya987 Oct 19 '15 at 08:21
-
1there is an additional bit of documentation for each parameter (the button longtext to the right on the table parameter screen). SELECTEDFIELDS contains the value fields and characteristics you want to select. If you get errors stating that the field name is unknown, you may want to try the FM BAPI_COPAQUERY_GETCOST_ACTDATA instead. I tried using both in our SAP system and I couldn't get anything out of BAPI_COPAQUERY_GETACC_ACTDATA, but BAPI_COPAQUERY_GETCOST_ACTDATA worked in our system. I'm no CO expert, but depending on your customizing you have to choose the right one. – Dirk Trilsbeek Oct 19 '15 at 08:45
-
1BAPI_COPAQUERY_GETCOST_ACTDATA - fit's perfectly for my task! Thank you very much! – Kuzya987 Oct 21 '15 at 08:24
-
@DirkTrilsbeek Please post your comment as an answer, because it's confirmed by the OP (and I will remove my own copy of your answer). Thank you! – Sandra Rossi Jan 09 '21 at 11:11
1 Answers
The BAPIs BAPI_COPAQUERY_GETACC_ACTDATA
or BAPI_COPAQUERY_GETCOST_ACTDATA
, depending on your system, should give you the information you need. The BAPIs have some documentation regarding their usage.
In particular there is some documentation for each parameter (the button longtext to the right on the table parameter screen). SELECTEDFIELDS
contains the value fields and characteristics you want to select. If you get errors stating that the field name is unknown, you may want to try the function module BAPI_COPAQUERY_GETCOST_ACTDATA
instead. I tried using both in our SAP system and I couldn't get anything out of BAPI_COPAQUERY_GETACC_ACTDATA
, but BAPI_COPAQUERY_GETCOST_ACTDATA
worked in our system. I'm no CO expert, but depending on your customizing you have to choose the right one.

- 5,873
- 2
- 25
- 23