SAP SERIALNUMBER_READ Function Module for NOTRANSL: Read serial number record









SERIALNUMBER_READ is a standard serialnumber read 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: Read serial number record 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 serialnumber read FM, simply by entering the name SERIALNUMBER_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: IE01
Program Name: SAPLIE01
Main Program: SAPLIE01
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SERIALNUMBER_READ 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 'SERIALNUMBER_READ'"NOTRANSL: Read serial number record
EXPORTING
* I_HANDLE = "
* AKTYP = ' ' "
* I_LOCK = "
* EQUNR = "
* MATNR = "
* SERNR = "
* UII = "Unique Item Identifier (CHAR72)
* READ_AS_EQUI = ' ' "
* CHECK_EQUI_EXIST = 'X' "
* CHECK_AUTH = ' ' "

IMPORTING
EQUI = "
EQKT = "
EQUZ = "
ILOA = "
EQBS = "
FLEET = "
EFHM = "
EQUI_EXIST = "

EXCEPTIONS
EQUI_NOT_FOUND = 1 AUTHORITY_IS_MISSING = 2 ERR_HANDLE = 3 LOCK_FAILURE = 4
.




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_SAPLIE01_005 Serial Numbers, User Exit in the Update
EXIT_SAPLIE01_007 Serial Numbers, User Exit in Goods Movement

IMPORTING Parameters details for SERIALNUMBER_READ

I_HANDLE -

Data type: ITOB_HANDLE
Optional: Yes
Call by Reference: No ( called with pass by value option)

AKTYP -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LOCK -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

EQUNR -

Data type: EQUI-EQUNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

MATNR -

Data type: EQUZ-SUBMT
Optional: Yes
Call by Reference: No ( called with pass by value option)

SERNR -

Data type: EQUI-SERNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

UII - Unique Item Identifier (CHAR72)

Data type: EQUI-UII
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_AS_EQUI -

Data type: RM63E-INDU
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_EQUI_EXIST -

Data type: RM63E-INDU
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_AUTH -

Data type: RM63E-INDU
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SERIALNUMBER_READ

EQUI -

Data type: EQUI
Optional: No
Call by Reference: No ( called with pass by value option)

EQKT -

Data type: EQKT
Optional: No
Call by Reference: No ( called with pass by value option)

EQUZ -

Data type: EQUZ
Optional: No
Call by Reference: No ( called with pass by value option)

ILOA -

Data type: ILOA
Optional: No
Call by Reference: No ( called with pass by value option)

EQBS -

Data type: EQBS
Optional: No
Call by Reference: No ( called with pass by value option)

FLEET -

Data type: FLEET
Optional: No
Call by Reference: No ( called with pass by value option)

EFHM -

Data type: EFHM
Optional: No
Call by Reference: No ( called with pass by value option)

EQUI_EXIST -

Data type: RM63E-INDU
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

EQUI_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

AUTHORITY_IS_MISSING -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERR_HANDLE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LOCK_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SERIALNUMBER_READ 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_equi  TYPE EQUI, "   
lv_i_handle  TYPE ITOB_HANDLE, "   
lv_equi_not_found  TYPE ITOB_HANDLE, "   
lv_aktyp  TYPE ITOB_HANDLE, "   ' '
lv_eqkt  TYPE EQKT, "   
lv_i_lock  TYPE C, "   
lv_authority_is_missing  TYPE C, "   
lv_equz  TYPE EQUZ, "   
lv_equnr  TYPE EQUI-EQUNR, "   
lv_err_handle  TYPE EQUI, "   
lv_iloa  TYPE ILOA, "   
lv_matnr  TYPE EQUZ-SUBMT, "   
lv_lock_failure  TYPE EQUZ, "   
lv_eqbs  TYPE EQBS, "   
lv_sernr  TYPE EQUI-SERNR, "   
lv_uii  TYPE EQUI-UII, "   
lv_fleet  TYPE FLEET, "   
lv_efhm  TYPE EFHM, "   
lv_read_as_equi  TYPE RM63E-INDU, "   ' '
lv_equi_exist  TYPE RM63E-INDU, "   
lv_check_equi_exist  TYPE RM63E-INDU, "   'X'
lv_check_auth  TYPE RM63E-INDU. "   ' '

  CALL FUNCTION 'SERIALNUMBER_READ'  "NOTRANSL: Read serial number record
    EXPORTING
         I_HANDLE = lv_i_handle
         AKTYP = lv_aktyp
         I_LOCK = lv_i_lock
         EQUNR = lv_equnr
         MATNR = lv_matnr
         SERNR = lv_sernr
         UII = lv_uii
         READ_AS_EQUI = lv_read_as_equi
         CHECK_EQUI_EXIST = lv_check_equi_exist
         CHECK_AUTH = lv_check_auth
    IMPORTING
         EQUI = lv_equi
         EQKT = lv_eqkt
         EQUZ = lv_equz
         ILOA = lv_iloa
         EQBS = lv_eqbs
         FLEET = lv_fleet
         EFHM = lv_efhm
         EQUI_EXIST = lv_equi_exist
    EXCEPTIONS
        EQUI_NOT_FOUND = 1
        AUTHORITY_IS_MISSING = 2
        ERR_HANDLE = 3
        LOCK_FAILURE = 4
. " SERIALNUMBER_READ




ABAP code using 7.40 inline data declarations to call FM SERIALNUMBER_READ

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_aktyp) = ' '.
 
 
 
 
 
"SELECT single EQUNR FROM EQUI INTO @DATA(ld_equnr).
 
 
 
"SELECT single SUBMT FROM EQUZ INTO @DATA(ld_matnr).
 
 
 
"SELECT single SERNR FROM EQUI INTO @DATA(ld_sernr).
 
"SELECT single UII FROM EQUI INTO @DATA(ld_uii).
 
 
 
"SELECT single INDU FROM RM63E INTO @DATA(ld_read_as_equi).
DATA(ld_read_as_equi) = ' '.
 
"SELECT single INDU FROM RM63E INTO @DATA(ld_equi_exist).
 
"SELECT single INDU FROM RM63E INTO @DATA(ld_check_equi_exist).
DATA(ld_check_equi_exist) = 'X'.
 
"SELECT single INDU FROM RM63E INTO @DATA(ld_check_auth).
DATA(ld_check_auth) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!