SAP FM00_DEFINE_LEDGER Function Module for
FM00_DEFINE_LEDGER is a standard fm00 define ledger SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for fm00 define ledger FM, simply by entering the name FM00_DEFINE_LEDGER into the relevant SAP transaction such as SE37 or SE38.
Function Group: FM00
Program Name: SAPLFM00
Main Program: SAPLFM00
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FM00_DEFINE_LEDGER pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'FM00_DEFINE_LEDGER'".
EXPORTING
* I_FIKRS = ' ' "FM area
* I_CURRENCY = ' ' "Currency
* I_CB_PERIV = ' ' "Cash Budget Management fiscal year variant
* I_CA_PERIV = ' ' "Funds Management fiscal year variant
IMPORTING Parameters details for FM00_DEFINE_LEDGER
I_FIKRS - FM area
Data type: FM01-FIKRSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CURRENCY - Currency
Data type: FM01-WAERSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CB_PERIV - Cash Budget Management fiscal year variant
Data type: FM01-PERIVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CA_PERIV - Funds Management fiscal year variant
Data type: FM01-CA_PERIVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FM00_DEFINE_LEDGER Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_fikrs | TYPE FM01-FIKRS, " SPACE | |||
| lv_i_currency | TYPE FM01-WAERS, " SPACE | |||
| lv_i_cb_periv | TYPE FM01-PERIV, " SPACE | |||
| lv_i_ca_periv | TYPE FM01-CA_PERIV. " SPACE |
|   CALL FUNCTION 'FM00_DEFINE_LEDGER' " |
| EXPORTING | ||
| I_FIKRS | = lv_i_fikrs | |
| I_CURRENCY | = lv_i_currency | |
| I_CB_PERIV | = lv_i_cb_periv | |
| I_CA_PERIV | = lv_i_ca_periv | |
| . " FM00_DEFINE_LEDGER | ||
ABAP code using 7.40 inline data declarations to call FM FM00_DEFINE_LEDGER
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single FIKRS FROM FM01 INTO @DATA(ld_i_fikrs). | ||||
| DATA(ld_i_fikrs) | = ' '. | |||
| "SELECT single WAERS FROM FM01 INTO @DATA(ld_i_currency). | ||||
| DATA(ld_i_currency) | = ' '. | |||
| "SELECT single PERIV FROM FM01 INTO @DATA(ld_i_cb_periv). | ||||
| DATA(ld_i_cb_periv) | = ' '. | |||
| "SELECT single CA_PERIV FROM FM01 INTO @DATA(ld_i_ca_periv). | ||||
| DATA(ld_i_ca_periv) | = ' '. | |||
Search for further information about these or an SAP related objects