K_TRANSACTION_BASICCOSTS_READ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name K_TRANSACTION_BASICCOSTS_READ into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
KV01
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'K_TRANSACTION_BASICCOSTS_READ' "
EXPORTING
* par_awkab = SPACE " kv042-xfeld No settlement debits
par_awkum = " tkv01-awkum Cumulation
par_awvsb = " tkv09-awvsb Reference version
* par_awwtb = '04' " tkv09-awwtb Reference value type
par_gjahr1 = " t009b-bdatj Fiscal Year From
* par_gjahr2 = 0 " t009b-bdatj Fiscal Year To
par_kokrs = " tkv09-kokrs Controlling area
par_objnr = " kv011-objnr Object number
par_poper1 = " t009b-poper Posting Period From
* par_poper2 = 0 " t009b-poper Posting Period To
* par_slkom = SPACE " kv042-xfeld Key complete
* par_vsall = 'X' " kv042-xfeld
TABLES
pta_kv012 = " kv012 Control Costs
pta_kv011 = " kv011 Reference Output Quantities
pta_kv0122 = " kv012 Transaction control costs
pta_vrgng = " kv041 Transaction
EXCEPTIONS
BASICCOSTS_IMPOSSIBLE = 1 " Not possible to calculate control costs
SYSTEM_ERROR = 2 " System error
. " K_TRANSACTION_BASICCOSTS_READ
The ABAP code below is a full code listing to execute function module K_TRANSACTION_BASICCOSTS_READ including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| it_pta_kv012 | TYPE STANDARD TABLE OF KV012,"TABLES PARAM |
| wa_pta_kv012 | LIKE LINE OF it_pta_kv012 , |
| it_pta_kv011 | TYPE STANDARD TABLE OF KV011,"TABLES PARAM |
| wa_pta_kv011 | LIKE LINE OF it_pta_kv011 , |
| it_pta_kv0122 | TYPE STANDARD TABLE OF KV012,"TABLES PARAM |
| wa_pta_kv0122 | LIKE LINE OF it_pta_kv0122 , |
| it_pta_vrgng | TYPE STANDARD TABLE OF KV041,"TABLES PARAM |
| wa_pta_vrgng | LIKE LINE OF it_pta_vrgng . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_par_awkab | TYPE KV042-XFELD , |
| it_pta_kv012 | TYPE STANDARD TABLE OF KV012 , |
| wa_pta_kv012 | LIKE LINE OF it_pta_kv012, |
| ld_par_awkum | TYPE TKV01-AWKUM , |
| it_pta_kv011 | TYPE STANDARD TABLE OF KV011 , |
| wa_pta_kv011 | LIKE LINE OF it_pta_kv011, |
| ld_par_awvsb | TYPE TKV09-AWVSB , |
| it_pta_kv0122 | TYPE STANDARD TABLE OF KV012 , |
| wa_pta_kv0122 | LIKE LINE OF it_pta_kv0122, |
| ld_par_awwtb | TYPE TKV09-AWWTB , |
| it_pta_vrgng | TYPE STANDARD TABLE OF KV041 , |
| wa_pta_vrgng | LIKE LINE OF it_pta_vrgng, |
| ld_par_gjahr1 | TYPE T009B-BDATJ , |
| ld_par_gjahr2 | TYPE T009B-BDATJ , |
| ld_par_kokrs | TYPE TKV09-KOKRS , |
| ld_par_objnr | TYPE KV011-OBJNR , |
| ld_par_poper1 | TYPE T009B-POPER , |
| ld_par_poper2 | TYPE T009B-POPER , |
| ld_par_slkom | TYPE KV042-XFELD , |
| ld_par_vsall | TYPE KV042-XFELD . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name K_TRANSACTION_BASICCOSTS_READ or its description.