SAP Function Modules

RKC_CONVERSION_DATES_FIND SAP Function module







RKC_CONVERSION_DATES_FIND 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 RKC_CONVERSION_DATES_FIND into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: KXCO
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RKC_CONVERSION_DATES_FIND - RKC CONVERSION DATES FIND





CALL FUNCTION 'RKC_CONVERSION_DATES_FIND' "
  EXPORTING
*   bdatj_hi = '0000'           " t009b-bdatj   To-year of period
*   bdatj_lo = '0000'           " t009b-bdatj   "From" year of period
*   boper_hi = '000'            " t009b-poper   "To" period of period
*   boper_lo = '000'            " t009b-poper   "From" period of period
*   datum_hi = '00000000'       " sy-datum      TO-date of period
*   datum_lo = '00000000'       " sy-datum      FROM-date of period
    periv =                     " t009b-periv   Fiscal year version
*   woche_hi = '0000000'        " cest1-perio   To-week of the period
*   woche_lo = '0000000'        " cest1-perio   From-week of the period
*   zwzei = '2'                 " t242q-zwzei   Time reference field: see domain R
  TABLES
    exchr_tab =                 " rkb1k         Table with the exchange rates as a
  EXCEPTIONS
    NOT_ALL_DATES_FILLED = 1    "               Not all dates were found
    .  "  RKC_CONVERSION_DATES_FIND

ABAP code example for Function Module RKC_CONVERSION_DATES_FIND





The ABAP code below is a full code listing to execute function module RKC_CONVERSION_DATES_FIND 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).

DATA:
it_exchr_tab  TYPE STANDARD TABLE OF RKB1K,"TABLES PARAM
wa_exchr_tab  LIKE LINE OF it_exchr_tab .


SELECT single BDATJ
FROM T009B
INTO @DATA(ld_bdatj_hi).


SELECT single BDATJ
FROM T009B
INTO @DATA(ld_bdatj_lo).


SELECT single POPER
FROM T009B
INTO @DATA(ld_boper_hi).


SELECT single POPER
FROM T009B
INTO @DATA(ld_boper_lo).

DATA(ld_datum_hi) = '20210129'.
DATA(ld_datum_lo) = '20210129'.

SELECT single PERIV
FROM T009B
INTO @DATA(ld_periv).


DATA(ld_woche_hi) = Check type of data required

DATA(ld_woche_lo) = Check type of data required

SELECT single ZWZEI
FROM T242Q
INTO @DATA(ld_zwzei).


"populate fields of struture and append to itab
append wa_exchr_tab to it_exchr_tab. . CALL FUNCTION 'RKC_CONVERSION_DATES_FIND' EXPORTING * bdatj_hi = ld_bdatj_hi * bdatj_lo = ld_bdatj_lo * boper_hi = ld_boper_hi * boper_lo = ld_boper_lo * datum_hi = ld_datum_hi * datum_lo = ld_datum_lo periv = ld_periv * woche_hi = ld_woche_hi * woche_lo = ld_woche_lo * zwzei = ld_zwzei TABLES exchr_tab = it_exchr_tab EXCEPTIONS NOT_ALL_DATES_FILLED = 1 . " RKC_CONVERSION_DATES_FIND
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_bdatj_hi  TYPE T009B-BDATJ ,
it_exchr_tab  TYPE STANDARD TABLE OF RKB1K ,
wa_exchr_tab  LIKE LINE OF it_exchr_tab,
ld_bdatj_lo  TYPE T009B-BDATJ ,
ld_boper_hi  TYPE T009B-POPER ,
ld_boper_lo  TYPE T009B-POPER ,
ld_datum_hi  TYPE SY-DATUM ,
ld_datum_lo  TYPE SY-DATUM ,
ld_periv  TYPE T009B-PERIV ,
ld_woche_hi  TYPE CEST1-PERIO ,
ld_woche_lo  TYPE CEST1-PERIO ,
ld_zwzei  TYPE T242Q-ZWZEI .


SELECT single BDATJ
FROM T009B
INTO ld_bdatj_hi.


"populate fields of struture and append to itab
append wa_exchr_tab to it_exchr_tab.

SELECT single BDATJ
FROM T009B
INTO ld_bdatj_lo.


SELECT single POPER
FROM T009B
INTO ld_boper_hi.


SELECT single POPER
FROM T009B
INTO ld_boper_lo.

ld_datum_hi = '20210129'.
ld_datum_lo = '20210129'.

SELECT single PERIV
FROM T009B
INTO ld_periv.


ld_woche_hi = Check type of data required

ld_woche_lo = Check type of data required

SELECT single ZWZEI
FROM T242Q
INTO ld_zwzei.

Contribute (Add Comments)

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 RKC_CONVERSION_DATES_FIND or its description.