KA01_CALCULATE_COMPONENT 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 KA01_CALCULATE_COMPONENT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
KA01
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'KA01_CALCULATE_COMPONENT' "
EXPORTING
i_afvgd = " afvgdget
i_resb = " resbdget
i_klvar = " caufvd-klvarp
i_auart = " caufvd-auart
i_autyp = " caufvd-autyp
i_aufnr = " caufvd-aufnr
i_smsg_initialize = " sy-uzeit
i_kwaer = " tka01-waers
i_posted = " i
TABLES
t_kalktab_resb = " ckkalktab
t_coeja = " coeja
t_co_object = " ck_co_object_itab
EXCEPTIONS
VALUATION_ERROR = 1 "
. " KA01_CALCULATE_COMPONENT
The ABAP code below is a full code listing to execute function module KA01_CALCULATE_COMPONENT 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_t_kalktab_resb | TYPE STANDARD TABLE OF CKKALKTAB,"TABLES PARAM |
| wa_t_kalktab_resb | LIKE LINE OF it_t_kalktab_resb , |
| it_t_coeja | TYPE STANDARD TABLE OF COEJA,"TABLES PARAM |
| wa_t_coeja | LIKE LINE OF it_t_coeja , |
| it_t_co_object | TYPE STANDARD TABLE OF CK_CO_OBJECT_ITAB,"TABLES PARAM |
| wa_t_co_object | LIKE LINE OF it_t_co_object . |
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_i_afvgd | TYPE AFVGDGET , |
| it_t_kalktab_resb | TYPE STANDARD TABLE OF CKKALKTAB , |
| wa_t_kalktab_resb | LIKE LINE OF it_t_kalktab_resb, |
| ld_i_resb | TYPE RESBDGET , |
| it_t_coeja | TYPE STANDARD TABLE OF COEJA , |
| wa_t_coeja | LIKE LINE OF it_t_coeja, |
| ld_i_klvar | TYPE CAUFVD-KLVARP , |
| it_t_co_object | TYPE STANDARD TABLE OF CK_CO_OBJECT_ITAB , |
| wa_t_co_object | LIKE LINE OF it_t_co_object, |
| ld_i_auart | TYPE CAUFVD-AUART , |
| ld_i_autyp | TYPE CAUFVD-AUTYP , |
| ld_i_aufnr | TYPE CAUFVD-AUFNR , |
| ld_i_smsg_initialize | TYPE SY-UZEIT , |
| ld_i_kwaer | TYPE TKA01-WAERS , |
| ld_i_posted | TYPE I . |
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 KA01_CALCULATE_COMPONENT or its description.