SAP INVENTORY_DIFFERENCES Function Module for NOTRANSL: Realisierung der Inventurdifferenzen









INVENTORY_DIFFERENCES is a standard inventory differences 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: Realisierung der Inventurdifferenzen 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 inventory differences FM, simply by entering the name INVENTORY_DIFFERENCES 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 INVENTORY_DIFFERENCES 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 'INVENTORY_DIFFERENCES'"NOTRANSL: Realisierung der Inventurdifferenzen
EXPORTING
PROFILE = "
* MEMORY_ID_STATUS = ' ' "
BUDAT = "Posting Date in the Document
IBLNR = "Physical Inventory Doc. No.
ZEILI = "
GJAHR = "
BSINFO = "
J_VORGANG_IN = "
J_VORGANG_OUT = "
* SIMULATION = 'X' "Simulation Only
* BAPI = ' ' "Call from BAPI

IMPORTING
ZEILEN_ID = "
SERIAL_COMMIT = "Change Indicator
STATUS_NOT_ALLOWED = "

CHANGING
* T_SMESG = "Message table message collector

EXCEPTIONS
SERIALNUMBER_ERRORS = 1 NO_PROFILE = 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 INVENTORY_DIFFERENCES

PROFILE -

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

MEMORY_ID_STATUS -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: Yes

BUDAT - Posting Date in the Document

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

IBLNR - Physical Inventory Doc. No.

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

ZEILI -

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

GJAHR -

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

BSINFO -

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

J_VORGANG_IN -

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

J_VORGANG_OUT -

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

SIMULATION - Simulation Only

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

BAPI - Call from BAPI

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

EXPORTING Parameters details for INVENTORY_DIFFERENCES

ZEILEN_ID -

Data type: MESG-ZEILE
Optional: No
Call by Reference: Yes

SERIAL_COMMIT - Change Indicator

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

STATUS_NOT_ALLOWED -

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

CHANGING Parameters details for INVENTORY_DIFFERENCES

T_SMESG - Message table message collector

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

EXCEPTIONS details

SERIALNUMBER_ERRORS -

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

NO_PROFILE -

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

Copy and paste ABAP code example for INVENTORY_DIFFERENCES 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_profile  TYPE T377P-SERAIL, "   
lv_t_smesg  TYPE TSMESG, "   
lv_zeilen_id  TYPE MESG-ZEILE, "   
lv_serialnumber_errors  TYPE MESG, "   
lv_memory_id_status  TYPE C, "   SPACE
lv_budat  TYPE MKPF-BUDAT, "   
lv_iblnr  TYPE SER07-IBLNR, "   
lv_no_profile  TYPE SER07, "   
lv_serial_commit  TYPE C, "   
lv_zeili  TYPE SER07-ZEILI, "   
lv_status_not_allowed  TYPE C, "   
lv_gjahr  TYPE SER07-MJAHR, "   
lv_bsinfo  TYPE BSINF, "   
lv_j_vorgang_in  TYPE TJ01-VRGNG, "   
lv_j_vorgang_out  TYPE TJ01-VRGNG, "   
lv_simulation  TYPE C, "   'X'
lv_bapi  TYPE C. "   SPACE

  CALL FUNCTION 'INVENTORY_DIFFERENCES'  "NOTRANSL: Realisierung der Inventurdifferenzen
    EXPORTING
         PROFILE = lv_profile
         MEMORY_ID_STATUS = lv_memory_id_status
         BUDAT = lv_budat
         IBLNR = lv_iblnr
         ZEILI = lv_zeili
         GJAHR = lv_gjahr
         BSINFO = lv_bsinfo
         J_VORGANG_IN = lv_j_vorgang_in
         J_VORGANG_OUT = lv_j_vorgang_out
         SIMULATION = lv_simulation
         BAPI = lv_bapi
    IMPORTING
         ZEILEN_ID = lv_zeilen_id
         SERIAL_COMMIT = lv_serial_commit
         STATUS_NOT_ALLOWED = lv_status_not_allowed
    CHANGING
         T_SMESG = lv_t_smesg
    EXCEPTIONS
        SERIALNUMBER_ERRORS = 1
        NO_PROFILE = 2
. " INVENTORY_DIFFERENCES




ABAP code using 7.40 inline data declarations to call FM INVENTORY_DIFFERENCES

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 SERAIL FROM T377P INTO @DATA(ld_profile).
 
 
"SELECT single ZEILE FROM MESG INTO @DATA(ld_zeilen_id).
 
 
DATA(ld_memory_id_status) = ' '.
 
"SELECT single BUDAT FROM MKPF INTO @DATA(ld_budat).
 
"SELECT single IBLNR FROM SER07 INTO @DATA(ld_iblnr).
 
 
 
"SELECT single ZEILI FROM SER07 INTO @DATA(ld_zeili).
 
 
"SELECT single MJAHR FROM SER07 INTO @DATA(ld_gjahr).
 
 
"SELECT single VRGNG FROM TJ01 INTO @DATA(ld_j_vorgang_in).
 
"SELECT single VRGNG FROM TJ01 INTO @DATA(ld_j_vorgang_out).
 
DATA(ld_simulation) = 'X'.
 
DATA(ld_bapi) = ' '.
 


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!