KLTE_CALCULATE_DATES 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 KLTE_CALCULATE_DATES into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
KLTE
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'KLTE_CALCULATE_DATES' "Get Market Value Change Period and Risk Commitment Period
EXPORTING
i_dat1 = " kldats-dfikt Date To
i_auswdate = " kldats-dfikt Evaluation Date (Date From)
i_arr = " klarrc-arr Default Risk Rule
* i_mwae_rbd = SPACE " c X = Market Value Change Period; ' ' = Risk Commitment Period
i_flag_separate = SPACE " trff_flg Exact Calculation of Market Value Change Period/Risk Commitment Period
* i_prot_level = 1 " sprot-level Log Level
* i_objnr = " tvs_sfgdt_typ-kopf-objnr Object Number
IMPORTING
e_value = " kl0_p_decimals4 Difference in Months, or Exactly, as per I_FLAG_SEPARATE
e_klarrc = " klarrc Definition of Default Risk Rule
TABLES
c_error_itab = " bapierr OR: Structure of Error Handling
EXCEPTIONS
NO_CALC = 1 "
. " KLTE_CALCULATE_DATES
The ABAP code below is a full code listing to execute function module KLTE_CALCULATE_DATES 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_e_value | TYPE KL0_P_DECIMALS4 , |
| ld_e_klarrc | TYPE KLARRC , |
| it_c_error_itab | TYPE STANDARD TABLE OF BAPIERR,"TABLES PARAM |
| wa_c_error_itab | LIKE LINE OF it_c_error_itab . |
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_e_value | TYPE KL0_P_DECIMALS4 , |
| ld_i_dat1 | TYPE KLDATS-DFIKT , |
| it_c_error_itab | TYPE STANDARD TABLE OF BAPIERR , |
| wa_c_error_itab | LIKE LINE OF it_c_error_itab, |
| ld_e_klarrc | TYPE KLARRC , |
| ld_i_auswdate | TYPE KLDATS-DFIKT , |
| ld_i_arr | TYPE KLARRC-ARR , |
| ld_i_mwae_rbd | TYPE C , |
| ld_i_flag_separate | TYPE TRFF_FLG , |
| ld_i_prot_level | TYPE SPROT-LEVEL , |
| ld_i_objnr | TYPE TVS_SFGDT_TYP-KOPF-OBJNR . |
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 KLTE_CALCULATE_DATES or its description.
KLTE_CALCULATE_DATES - Get Market Value Change Period and Risk Commitment Period KLSS_MAPPING_PARTNR - Mapping of CM Business Partners KLSIGLS_WRITE_DOCUMENT - CHDO KLSIGLS => Gen. by RSSCD000 KLSIGLSPOS_WRITE_DOCUMENT - CHDO KLSIGLSPOS => Gen. by RSSCD000 KLSIGLP_WRITE_DOCUMENT - CHDO KLSIGLP => Gen. by RSSCD000 KLSIEZS_WRITE_DOCUMENT - CHDO KLSIEZS => Gen. by RSSCD000