SAP SERIALPROFILE_CHECK Function Module for NOTRANSL: Zentraler Aufruf für Serialnummernverwaltung









SERIALPROFILE_CHECK is a standard serialprofile check 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: Zentraler Aufruf für Serialnummernverwaltung 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 serialprofile check FM, simply by entering the name SERIALPROFILE_CHECK into the relevant SAP transaction such as SE37 or SE38.

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



Function SERIALPROFILE_CHECK 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 'SERIALPROFILE_CHECK'"NOTRANSL: Zentraler Aufruf für Serialnummernverwaltung
EXPORTING
* ACTIVITY = "Activity Category
* DOC_OLD = "Old document number
* DOC_NEW = "New document number
* PRUEFLOS = "Number of QM inspection lot
* QM_DOC_OLD = "Old inspection lot number
* QM_DOC_NEW = "New inspection lot number
* MBLNR = "Material document number
* MJAHR_NEW = "Year of material document
* MJAHR = "Year of material document
* ZEILE_NEW = "Line of material document
* ZEILE = "Line of material document
* DEBITOR = "Recipient of Delivery
* BLART = "Document type
* BWART = "Movement Type
* SHKZG = "Debit/Credit Indicator
* LIEFERANT = "Vendor
* M_WERK = "Plant of the material
* M_LAGER = "Storage location of material
* M_CHARGE = "Batch of material
* MBLNR_OLD = "Old material number
* J_VORGANG = "Business operation - Status management
* LIEFPOS_NE = "New delivery item (copy)
* DOCUMENT = "SD Document Number
* CUOBJ = "Internal object number of configuration
* R_MATERIAL = "Receiving Material
* BSTCH = "
* BSTUP = "
* SNBWG = "Transaction Type Group
* PPAUFNR = "
* PPPOSNR = "PP order item
* PPAUTYP = "
* PPAUFART = "
* PPAUFNR_NE = "
* ITEM = "Item number
* PMRSORD = "Refurbishment order indicator (PM)
* AUTOMATIC = ' ' "
* VBTYP = "
* SD_AUART = "
* SD_POSTYP = "
* EMATN = "Material Number Corresponding to Manufacturer Part Number
* STORNO_LF = ' ' "
* BAPI = ' ' "
* L_CHARGE = "
* BUDAT = "Posting Date in the Document
* KMATNR = "Standard product (Config.material)
* IUID_RELEVANT = ' ' "
* EXT = "Interface Extensions for SERIALPROFILE_CHECK
* MATERIAL = "Material number
OPERATION = "Serialization procedure
* PROFILE = "Serialization profile of material
* QUANTITY = "Quantity of item (in pieces)

IMPORTING
ANZSN = "Number of serial numbers in object list
SERIAL_COMMIT = "Change indicator
EXIT_FLAG = "Processing of serial numbers was canceled
STATUS_NOT_ALLOWED = "Not all serial numbers can be used

CHANGING
* T_SMESG = "Message table message collector

TABLES
* TAB_CUOBJ = "Temporary/DB-configuration object number
* YMBUZ = "Table with posting line information
* XVBPA = "

EXCEPTIONS
KONFIGURATIONS_ERROR = 1 NO_AUTOMATIC = 2
.




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_SAPLIPW1_001 Automatic Serial Number Assignment
EXIT_SAPLIPW1_002 Check on Copying Object List
EXIT_SAPLIPW1_003 Serial Numbers, User Exit for Additional Fields
EXIT_SAPLIPW1_004 Serial Numbers, User Exit After Exiting the Serial Screen
EXIT_SAPLIPW1_008 Check of Serial Number - Character String

IMPORTING Parameters details for SERIALPROFILE_CHECK

ACTIVITY - Activity Category

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

DOC_OLD - Old document number

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

DOC_NEW - New document number

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

PRUEFLOS - Number of QM inspection lot

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

QM_DOC_OLD - Old inspection lot number

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

QM_DOC_NEW - New inspection lot number

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

MBLNR - Material document number

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

MJAHR_NEW - Year of material document

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

MJAHR - Year of material document

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

ZEILE_NEW - Line of material document

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

ZEILE - Line of material document

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

DEBITOR - Recipient of Delivery

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

BLART - Document type

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

BWART - Movement Type

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

SHKZG - Debit/Credit Indicator

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

LIEFERANT - Vendor

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

M_WERK - Plant of the material

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

M_LAGER - Storage location of material

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

M_CHARGE - Batch of material

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

MBLNR_OLD - Old material number

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

J_VORGANG - Business operation - Status management

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

LIEFPOS_NE - New delivery item (copy)

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

DOCUMENT - SD Document Number

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

CUOBJ - Internal object number of configuration

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

R_MATERIAL - Receiving Material

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

BSTCH -

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

BSTUP -

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

SNBWG - Transaction Type Group

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

PPAUFNR -

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

PPPOSNR - PP order item

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

PPAUTYP -

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

PPAUFART -

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

PPAUFNR_NE -

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

ITEM - Item number

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

PMRSORD - Refurbishment order indicator (PM)

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

AUTOMATIC -

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

VBTYP -

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

SD_AUART -

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

SD_POSTYP -

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

EMATN - Material Number Corresponding to Manufacturer Part Number

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

STORNO_LF -

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

BAPI -

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

L_CHARGE -

Data type: SER03-CHARGE
Optional: Yes
Call by Reference: Yes

BUDAT - Posting Date in the Document

Data type: MKPF-BUDAT
Optional: Yes
Call by Reference: Yes

KMATNR - Standard product (Config.material)

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

IUID_RELEVANT -

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

EXT - Interface Extensions for SERIALPROFILE_CHECK

Data type: EXT_SERIALPROFILE_CHECK
Optional: Yes
Call by Reference: Yes

MATERIAL - Material number

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

OPERATION - Serialization procedure

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

PROFILE - Serialization profile of material

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

QUANTITY - Quantity of item (in pieces)

Data type: RISA0-ANZAHL
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for SERIALPROFILE_CHECK

ANZSN - Number of serial numbers in object list

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

SERIAL_COMMIT - Change indicator

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

EXIT_FLAG - Processing of serial numbers was canceled

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

STATUS_NOT_ALLOWED - Not all serial numbers can be used

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

CHANGING Parameters details for SERIALPROFILE_CHECK

T_SMESG - Message table message collector

Data type: TSMESG
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for SERIALPROFILE_CHECK

TAB_CUOBJ - Temporary/DB-configuration object number

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

YMBUZ - Table with posting line information

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

XVBPA -

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

EXCEPTIONS details

KONFIGURATIONS_ERROR - Error During Configuration

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

NO_AUTOMATIC -

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

Copy and paste ABAP code example for SERIALPROFILE_CHECK 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_anzsn  TYPE LIPS-ANZSN, "   
lv_t_smesg  TYPE TSMESG, "   
lv_activity  TYPE T370-AKTYP, "   
lt_tab_cuobj  TYPE STANDARD TABLE OF CONFNR, "   
lv_konfigurations_error  TYPE CONFNR, "   
lv_doc_old  TYPE LIPS-VBELN, "   
lv_doc_new  TYPE LIPS-VBELN, "   
lv_prueflos  TYPE SER04-PRUEFLOS, "   
lv_qm_doc_old  TYPE SER04-PRUEFLOS, "   
lv_qm_doc_new  TYPE SER04-PRUEFLOS, "   
lv_mblnr  TYPE SER03-MBLNR, "   
lv_mjahr_new  TYPE SER03-MJAHR, "   
lv_mjahr  TYPE SER03-MJAHR, "   
lv_zeile_new  TYPE SER03-ZEILE, "   
lv_zeile  TYPE SER03-ZEILE, "   
lt_ymbuz  TYPE STANDARD TABLE OF MBUZ, "   
lv_debitor  TYPE KNA1-KUNNR, "   
lv_no_automatic  TYPE KNA1, "   
lv_serial_commit  TYPE C, "   
lv_blart  TYPE SER03-BLART, "   
lv_bwart  TYPE SER03-BWART, "   
lv_shkzg  TYPE SER03-SHKZG, "   
lv_lieferant  TYPE SER03-LIEFERANT, "   
lv_m_werk  TYPE SER03-WERK, "   
lv_m_lager  TYPE SER03-LAGERORT, "   
lv_m_charge  TYPE SER03-CHARGE, "   
lv_mblnr_old  TYPE SER03-MBLNR, "   
lv_j_vorgang  TYPE TJ01-VRGNG, "   
lv_liefpos_ne  TYPE LIPS-POSNR, "   
lt_xvbpa  TYPE STANDARD TABLE OF VBPAVB, "   
lv_document  TYPE LIPS-VBELN, "   
lv_exit_flag  TYPE C, "   
lv_cuobj  TYPE EQUI-CUOBJ, "   
lv_r_material  TYPE MSEGK-UMMAT, "   
lv_bstch  TYPE BSINF, "   
lv_bstup  TYPE BSINF, "   
lv_snbwg  TYPE T156Q-SNBWG, "   
lv_ppaufnr  TYPE AUFK-AUFNR, "   
lv_ppposnr  TYPE AFPO-POSNR, "   
lv_ppautyp  TYPE AUFK-AUTYP, "   
lv_ppaufart  TYPE AUFK-AUART, "   
lv_ppaufnr_ne  TYPE AUFK-AUFNR, "   
lv_item  TYPE LIPS-POSNR, "   
lv_status_not_allowed  TYPE C, "   
lv_pmrsord  TYPE AUFK-RSORD, "   
lv_automatic  TYPE C, "   SPACE
lv_vbtyp  TYPE VBAK-VBTYP, "   
lv_sd_auart  TYPE VBAK-AUART, "   
lv_sd_postyp  TYPE VBAP-PSTYV, "   
lv_ematn  TYPE MSEG-EMATN, "   
lv_storno_lf  TYPE C, "   SPACE
lv_bapi  TYPE C, "   SPACE
lv_l_charge  TYPE SER03-CHARGE, "   
lv_budat  TYPE MKPF-BUDAT, "   
lv_kmatnr  TYPE RISA0-MATNR, "   
lv_iuid_relevant  TYPE IUID_RELEVANT, "   SPACE
lv_ext  TYPE EXT_SERIALPROFILE_CHECK, "   
lv_material  TYPE RISA0-MATNR, "   
lv_operation  TYPE T377X-BELEG, "   
lv_profile  TYPE T377P-SERAIL, "   
lv_quantity  TYPE RISA0-ANZAHL. "   

  CALL FUNCTION 'SERIALPROFILE_CHECK'  "NOTRANSL: Zentraler Aufruf für Serialnummernverwaltung
    EXPORTING
         ACTIVITY = lv_activity
         DOC_OLD = lv_doc_old
         DOC_NEW = lv_doc_new
         PRUEFLOS = lv_prueflos
         QM_DOC_OLD = lv_qm_doc_old
         QM_DOC_NEW = lv_qm_doc_new
         MBLNR = lv_mblnr
         MJAHR_NEW = lv_mjahr_new
         MJAHR = lv_mjahr
         ZEILE_NEW = lv_zeile_new
         ZEILE = lv_zeile
         DEBITOR = lv_debitor
         BLART = lv_blart
         BWART = lv_bwart
         SHKZG = lv_shkzg
         LIEFERANT = lv_lieferant
         M_WERK = lv_m_werk
         M_LAGER = lv_m_lager
         M_CHARGE = lv_m_charge
         MBLNR_OLD = lv_mblnr_old
         J_VORGANG = lv_j_vorgang
         LIEFPOS_NE = lv_liefpos_ne
         DOCUMENT = lv_document
         CUOBJ = lv_cuobj
         R_MATERIAL = lv_r_material
         BSTCH = lv_bstch
         BSTUP = lv_bstup
         SNBWG = lv_snbwg
         PPAUFNR = lv_ppaufnr
         PPPOSNR = lv_ppposnr
         PPAUTYP = lv_ppautyp
         PPAUFART = lv_ppaufart
         PPAUFNR_NE = lv_ppaufnr_ne
         ITEM = lv_item
         PMRSORD = lv_pmrsord
         AUTOMATIC = lv_automatic
         VBTYP = lv_vbtyp
         SD_AUART = lv_sd_auart
         SD_POSTYP = lv_sd_postyp
         EMATN = lv_ematn
         STORNO_LF = lv_storno_lf
         BAPI = lv_bapi
         L_CHARGE = lv_l_charge
         BUDAT = lv_budat
         KMATNR = lv_kmatnr
         IUID_RELEVANT = lv_iuid_relevant
         EXT = lv_ext
         MATERIAL = lv_material
         OPERATION = lv_operation
         PROFILE = lv_profile
         QUANTITY = lv_quantity
    IMPORTING
         ANZSN = lv_anzsn
         SERIAL_COMMIT = lv_serial_commit
         EXIT_FLAG = lv_exit_flag
         STATUS_NOT_ALLOWED = lv_status_not_allowed
    CHANGING
         T_SMESG = lv_t_smesg
    TABLES
         TAB_CUOBJ = lt_tab_cuobj
         YMBUZ = lt_ymbuz
         XVBPA = lt_xvbpa
    EXCEPTIONS
        KONFIGURATIONS_ERROR = 1
        NO_AUTOMATIC = 2
. " SERIALPROFILE_CHECK




ABAP code using 7.40 inline data declarations to call FM SERIALPROFILE_CHECK

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 ANZSN FROM LIPS INTO @DATA(ld_anzsn).
 
 
"SELECT single AKTYP FROM T370 INTO @DATA(ld_activity).
 
 
 
"SELECT single VBELN FROM LIPS INTO @DATA(ld_doc_old).
 
"SELECT single VBELN FROM LIPS INTO @DATA(ld_doc_new).
 
"SELECT single PRUEFLOS FROM SER04 INTO @DATA(ld_prueflos).
 
"SELECT single PRUEFLOS FROM SER04 INTO @DATA(ld_qm_doc_old).
 
"SELECT single PRUEFLOS FROM SER04 INTO @DATA(ld_qm_doc_new).
 
"SELECT single MBLNR FROM SER03 INTO @DATA(ld_mblnr).
 
"SELECT single MJAHR FROM SER03 INTO @DATA(ld_mjahr_new).
 
"SELECT single MJAHR FROM SER03 INTO @DATA(ld_mjahr).
 
"SELECT single ZEILE FROM SER03 INTO @DATA(ld_zeile_new).
 
"SELECT single ZEILE FROM SER03 INTO @DATA(ld_zeile).
 
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_debitor).
 
 
 
"SELECT single BLART FROM SER03 INTO @DATA(ld_blart).
 
"SELECT single BWART FROM SER03 INTO @DATA(ld_bwart).
 
"SELECT single SHKZG FROM SER03 INTO @DATA(ld_shkzg).
 
"SELECT single LIEFERANT FROM SER03 INTO @DATA(ld_lieferant).
 
"SELECT single WERK FROM SER03 INTO @DATA(ld_m_werk).
 
"SELECT single LAGERORT FROM SER03 INTO @DATA(ld_m_lager).
 
"SELECT single CHARGE FROM SER03 INTO @DATA(ld_m_charge).
 
"SELECT single MBLNR FROM SER03 INTO @DATA(ld_mblnr_old).
 
"SELECT single VRGNG FROM TJ01 INTO @DATA(ld_j_vorgang).
 
"SELECT single POSNR FROM LIPS INTO @DATA(ld_liefpos_ne).
 
 
"SELECT single VBELN FROM LIPS INTO @DATA(ld_document).
 
 
"SELECT single CUOBJ FROM EQUI INTO @DATA(ld_cuobj).
 
"SELECT single UMMAT FROM MSEGK INTO @DATA(ld_r_material).
 
 
 
"SELECT single SNBWG FROM T156Q INTO @DATA(ld_snbwg).
 
"SELECT single AUFNR FROM AUFK INTO @DATA(ld_ppaufnr).
 
"SELECT single POSNR FROM AFPO INTO @DATA(ld_ppposnr).
 
"SELECT single AUTYP FROM AUFK INTO @DATA(ld_ppautyp).
 
"SELECT single AUART FROM AUFK INTO @DATA(ld_ppaufart).
 
"SELECT single AUFNR FROM AUFK INTO @DATA(ld_ppaufnr_ne).
 
"SELECT single POSNR FROM LIPS INTO @DATA(ld_item).
 
 
"SELECT single RSORD FROM AUFK INTO @DATA(ld_pmrsord).
 
DATA(ld_automatic) = ' '.
 
"SELECT single VBTYP FROM VBAK INTO @DATA(ld_vbtyp).
 
"SELECT single AUART FROM VBAK INTO @DATA(ld_sd_auart).
 
"SELECT single PSTYV FROM VBAP INTO @DATA(ld_sd_postyp).
 
"SELECT single EMATN FROM MSEG INTO @DATA(ld_ematn).
 
DATA(ld_storno_lf) = ' '.
 
DATA(ld_bapi) = ' '.
 
"SELECT single CHARGE FROM SER03 INTO @DATA(ld_l_charge).
 
"SELECT single BUDAT FROM MKPF INTO @DATA(ld_budat).
 
"SELECT single MATNR FROM RISA0 INTO @DATA(ld_kmatnr).
 
DATA(ld_iuid_relevant) = ' '.
 
 
"SELECT single MATNR FROM RISA0 INTO @DATA(ld_material).
 
"SELECT single BELEG FROM T377X INTO @DATA(ld_operation).
 
"SELECT single SERAIL FROM T377P INTO @DATA(ld_profile).
 
"SELECT single ANZAHL FROM RISA0 INTO @DATA(ld_quantity).
 


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!