SAP L_INV_COUNT Function Module for NOTRANSL: Erfassung von Zähldaten zur Inventur (auch für Fremdsystem-Schni
L_INV_COUNT is a standard l inv count SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Erfassung von Zähldaten zur Inventur (auch für Fremdsystem-Schni 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 l inv count FM, simply by entering the name L_INV_COUNT into the relevant SAP transaction such as SE37 or SE38.
Function Group: LMDE
Program Name: SAPLLMDE
Main Program: SAPLLMDE
Appliation area: L
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function L_INV_COUNT 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 'L_INV_COUNT'"NOTRANSL: Erfassung von Zähldaten zur Inventur (auch für Fremdsystem-Schni.
EXPORTING
* I_CHECK_ONLY = "
* I_COMMIT = 'X' "Explicit commit (do not set for IDOCs)
I_INPUT_METHOD = "Processing (X= foreground processing, otherwise background processing)
IMPORTING
ALLE_LGNUM = "Warehouse number
ALLE_IVNUM = "
ALLE_NVERS = "
TABLES
S_LINV = "Count records
EXCEPTIONS
NOT_UPDATED = 1 BIN_NOT_IN_IVNUM = 10 PLPOS_MISSING = 11 EITHER_QUANTITY_OR_EMPTY_BIN = 12 IVNUM_DIFFERENT = 13 NVERS_DIFFERENT = 14 IDENTICAL_KEY = 15 WRONG_LGORT = 16 FOREIGN_LOCK = 2 LENUM_MISSING = 3 ALTME_MISSING = 4 IVNUM_NOT_FOUND = 5 LGNUM_MISSING = 6 NO_COUNT_ALLOWED = 7 LGPLA_MISSING = 8 LGTYP_MISSING = 9
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLLMDE_001 User Exit for Error Handling IDOC Receipt (MDE)
EXIT_SAPLLMDE_002 Exit for Message WMMBXY (Goods Movement) Receipt (MDE)
EXIT_SAPLLMDE_003 Exit for Message WMINVE (Iventory Count) on Receipt
EXIT_SAPLLMDE_004 Exit for Message WMTORD (Generate TO) on Receipt (MDE/LSR)
EXIT_SAPLLMDE_005 Exit for Message WMTORD (Generate TO) on Receipt (MDE/LSR)
EXIT_SAPLLMDE_006 Follow-Up Actions for Goods Movements
IMPORTING Parameters details for L_INV_COUNT
I_CHECK_ONLY -
Data type: RL04I-XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_COMMIT - Explicit commit (do not set for IDOCs)
Data type: RL03B-COMITDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_INPUT_METHOD - Processing (X= foreground processing, otherwise background processing)
Data type: BDWFAP_PAR-INPUTMETHDOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for L_INV_COUNT
ALLE_LGNUM - Warehouse number
Data type: LINV-LGNUMOptional: No
Call by Reference: No ( called with pass by value option)
ALLE_IVNUM -
Data type: LINV-IVNUMOptional: No
Call by Reference: No ( called with pass by value option)
ALLE_NVERS -
Data type: LINV-NVERSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for L_INV_COUNT
S_LINV - Count records
Data type: E1LINVXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_UPDATED - A processing error has occurred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BIN_NOT_IN_IVNUM - Inventory number does not fit storage bin
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PLPOS_MISSING - Storage bin item missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EITHER_QUANTITY_OR_EMPTY_BIN - Either bin is empty or specify count quantity
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IVNUM_DIFFERENT - Only one inventory number allowed per call
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NVERS_DIFFERENT - Only one recount version allowed per call
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IDENTICAL_KEY - Count record exists twice
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_LGORT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK - Processing terminated because of lock
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LENUM_MISSING - Storage unit number missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ALTME_MISSING - Unit of measure missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IVNUM_NOT_FOUND - No valid inventory number for bin location
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LGNUM_MISSING - Warehouse number missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_COUNT_ALLOWED - Count already executed or not planned
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LGPLA_MISSING - Storage bin missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LGTYP_MISSING - Storage type missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for L_INV_COUNT 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: | ||||
| lt_s_linv | TYPE STANDARD TABLE OF E1LINVX, " | |||
| lv_alle_lgnum | TYPE LINV-LGNUM, " | |||
| lv_not_updated | TYPE LINV, " | |||
| lv_i_check_only | TYPE RL04I-XFELD, " | |||
| lv_bin_not_in_ivnum | TYPE RL04I, " | |||
| lv_plpos_missing | TYPE RL04I, " | |||
| lv_either_quantity_or_empty_bin | TYPE RL04I, " | |||
| lv_ivnum_different | TYPE RL04I, " | |||
| lv_nvers_different | TYPE RL04I, " | |||
| lv_identical_key | TYPE RL04I, " | |||
| lv_wrong_lgort | TYPE RL04I, " | |||
| lv_i_commit | TYPE RL03B-COMIT, " 'X' | |||
| lv_alle_ivnum | TYPE LINV-IVNUM, " | |||
| lv_foreign_lock | TYPE LINV, " | |||
| lv_alle_nvers | TYPE LINV-NVERS, " | |||
| lv_lenum_missing | TYPE LINV, " | |||
| lv_i_input_method | TYPE BDWFAP_PAR-INPUTMETHD, " | |||
| lv_altme_missing | TYPE BDWFAP_PAR, " | |||
| lv_ivnum_not_found | TYPE BDWFAP_PAR, " | |||
| lv_lgnum_missing | TYPE BDWFAP_PAR, " | |||
| lv_no_count_allowed | TYPE BDWFAP_PAR, " | |||
| lv_lgpla_missing | TYPE BDWFAP_PAR, " | |||
| lv_lgtyp_missing | TYPE BDWFAP_PAR. " |
|   CALL FUNCTION 'L_INV_COUNT' "NOTRANSL: Erfassung von Zähldaten zur Inventur (auch für Fremdsystem-Schni |
| EXPORTING | ||
| I_CHECK_ONLY | = lv_i_check_only | |
| I_COMMIT | = lv_i_commit | |
| I_INPUT_METHOD | = lv_i_input_method | |
| IMPORTING | ||
| ALLE_LGNUM | = lv_alle_lgnum | |
| ALLE_IVNUM | = lv_alle_ivnum | |
| ALLE_NVERS | = lv_alle_nvers | |
| TABLES | ||
| S_LINV | = lt_s_linv | |
| EXCEPTIONS | ||
| NOT_UPDATED = 1 | ||
| BIN_NOT_IN_IVNUM = 10 | ||
| PLPOS_MISSING = 11 | ||
| EITHER_QUANTITY_OR_EMPTY_BIN = 12 | ||
| IVNUM_DIFFERENT = 13 | ||
| NVERS_DIFFERENT = 14 | ||
| IDENTICAL_KEY = 15 | ||
| WRONG_LGORT = 16 | ||
| FOREIGN_LOCK = 2 | ||
| LENUM_MISSING = 3 | ||
| ALTME_MISSING = 4 | ||
| IVNUM_NOT_FOUND = 5 | ||
| LGNUM_MISSING = 6 | ||
| NO_COUNT_ALLOWED = 7 | ||
| LGPLA_MISSING = 8 | ||
| LGTYP_MISSING = 9 | ||
| . " L_INV_COUNT | ||
ABAP code using 7.40 inline data declarations to call FM L_INV_COUNT
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 LGNUM FROM LINV INTO @DATA(ld_alle_lgnum). | ||||
| "SELECT single XFELD FROM RL04I INTO @DATA(ld_i_check_only). | ||||
| "SELECT single COMIT FROM RL03B INTO @DATA(ld_i_commit). | ||||
| DATA(ld_i_commit) | = 'X'. | |||
| "SELECT single IVNUM FROM LINV INTO @DATA(ld_alle_ivnum). | ||||
| "SELECT single NVERS FROM LINV INTO @DATA(ld_alle_nvers). | ||||
| "SELECT single INPUTMETHD FROM BDWFAP_PAR INTO @DATA(ld_i_input_method). | ||||
Search for further information about these or an SAP related objects