CALCULATION_SHEET 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 CALCULATION_SHEET into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CO09
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'CALCULATION_SHEET' "
EXPORTING
application = " kalc-applid Calling application - 1st key part
key = " kalc-form_key Key field for storage and retrieval
* version = SPACE " kalc-version Version of the saved formulas
* recalc = SPACE " Initial->dialog, not initial->list with formulas
* display = SPACE " Initial->change, not initial->display
* display_lst = SPACE " Value = "X": edit formulas for printing
* changed_value = " sy-datar Save changed value of a component
* changed = " sy-datar Value = "X": save changed formula
* flg_recalc_to_bom = SPACE "
IMPORTING
changed_value = " sy-datar Save changed value of a component
changed = " sy-datar Value = "X": save changed formula
TABLES
in_col = " calc_col Table of column elements
in_join = " calc_join Join row and column tables
in_row = " calc_row Table of row elements
EXCEPTIONS
APPLICATION_ERROR = 1 "
CALCULATION_ERROR = 2 "
CALC_TABLE_ERROR = 3 "
KEY_ERROR = 4 "
VERSION_ERROR = 5 "
OTHERS = 6 "
. " CALCULATION_SHEET
The ABAP code below is a full code listing to execute function module CALCULATION_SHEET 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).
| ld_changed_value | TYPE SY-DATAR , |
| ld_changed | TYPE SY-DATAR , |
| it_in_col | TYPE STANDARD TABLE OF CALC_COL,"TABLES PARAM |
| wa_in_col | LIKE LINE OF it_in_col , |
| it_in_join | TYPE STANDARD TABLE OF CALC_JOIN,"TABLES PARAM |
| wa_in_join | LIKE LINE OF it_in_join , |
| it_in_row | TYPE STANDARD TABLE OF CALC_ROW,"TABLES PARAM |
| wa_in_row | LIKE LINE OF it_in_row . |
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_changed_value | TYPE SY-DATAR , |
| ld_application | TYPE KALC-APPLID , |
| it_in_col | TYPE STANDARD TABLE OF CALC_COL , |
| wa_in_col | LIKE LINE OF it_in_col, |
| ld_changed | TYPE SY-DATAR , |
| ld_key | TYPE KALC-FORM_KEY , |
| it_in_join | TYPE STANDARD TABLE OF CALC_JOIN , |
| wa_in_join | LIKE LINE OF it_in_join, |
| ld_version | TYPE KALC-VERSION , |
| it_in_row | TYPE STANDARD TABLE OF CALC_ROW , |
| wa_in_row | LIKE LINE OF it_in_row, |
| ld_recalc | TYPE STRING , |
| ld_display | TYPE STRING , |
| ld_display_lst | TYPE STRING , |
| ld_changed_value | TYPE SY-DATAR , |
| ld_changed | TYPE SY-DATAR , |
| ld_flg_recalc_to_bom | TYPE STRING . |
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 CALCULATION_SHEET or its description.