SAP GM_CHECK_LEDGER_IN_BUKRS Function Module for Check if the ledger is assigned to Company Code
GM_CHECK_LEDGER_IN_BUKRS is a standard gm check ledger in bukrs SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check if the ledger is assigned to Company Code processing and below is the pattern details for this FM, 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 gm check ledger in bukrs FM, simply by entering the name GM_CHECK_LEDGER_IN_BUKRS into the relevant SAP transaction such as SE37 or SE38.
Function Group: GMBD_LEDGER_TOOLS
Program Name: SAPLGMBD_LEDGER_TOOLS
Main Program: SAPLGMBD_LEDGER_TOOLS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GM_CHECK_LEDGER_IN_BUKRS 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 'GM_CHECK_LEDGER_IN_BUKRS'"Check if the ledger is assigned to Company Code.
EXPORTING
* I_LDRNR = '90' "Ledger
* I_BUKRS = "Company Code
* I_GRANT_NBR = "Grant
EXCEPTIONS
GRANT_NOT_VALID = 1 BUKRS_NOT_ASSIGNED = 2 MISSING_SETTINGS = 3
IMPORTING Parameters details for GM_CHECK_LEDGER_IN_BUKRS
I_LDRNR - Ledger
Data type: RLDNRDefault: '90'
Optional: No
Call by Reference: Yes
I_BUKRS - Company Code
Data type: BUKRSOptional: Yes
Call by Reference: Yes
I_GRANT_NBR - Grant
Data type: GM_GRANT_NBROptional: Yes
Call by Reference: Yes
EXCEPTIONS details
GRANT_NOT_VALID - Grant not valid
Data type:Optional: No
Call by Reference: Yes
BUKRS_NOT_ASSIGNED - Company Code is not assigned
Data type:Optional: No
Call by Reference: Yes
MISSING_SETTINGS - Missing settings
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for GM_CHECK_LEDGER_IN_BUKRS 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_ldrnr | TYPE RLDNR, " '90' | |||
| lv_grant_not_valid | TYPE RLDNR, " | |||
| lv_i_bukrs | TYPE BUKRS, " | |||
| lv_bukrs_not_assigned | TYPE BUKRS, " | |||
| lv_i_grant_nbr | TYPE GM_GRANT_NBR, " | |||
| lv_missing_settings | TYPE GM_GRANT_NBR. " |
|   CALL FUNCTION 'GM_CHECK_LEDGER_IN_BUKRS' "Check if the ledger is assigned to Company Code |
| EXPORTING | ||
| I_LDRNR | = lv_i_ldrnr | |
| I_BUKRS | = lv_i_bukrs | |
| I_GRANT_NBR | = lv_i_grant_nbr | |
| EXCEPTIONS | ||
| GRANT_NOT_VALID = 1 | ||
| BUKRS_NOT_ASSIGNED = 2 | ||
| MISSING_SETTINGS = 3 | ||
| . " GM_CHECK_LEDGER_IN_BUKRS | ||
ABAP code using 7.40 inline data declarations to call FM GM_CHECK_LEDGER_IN_BUKRS
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.| DATA(ld_i_ldrnr) | = '90'. | |||
Search for further information about these or an SAP related objects