SAP MCB_STOCK_SELECT Function Module for NOTRANSL: Selektion von Bestandsfeldern für das Bestandscontrolling









MCB_STOCK_SELECT is a standard mcb stock select 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: Selektion von Bestandsfeldern für das Bestandscontrolling 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 mcb stock select FM, simply by entering the name MCB_STOCK_SELECT into the relevant SAP transaction such as SE37 or SE38.

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



Function MCB_STOCK_SELECT 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 'MCB_STOCK_SELECT'"NOTRANSL: Selektion von Bestandsfeldern für das Bestandscontrolling
EXPORTING
* I_MARC = BOOLE_X "Plant Stock
* I_NULL_STOCKS = BOOLE_' ' "
* I_MARD = BOOLE_X "Storage Location Stock
* I_MCHB = BOOLE_X "Batch Stock
* I_MKOL = "Vendor Consignment
* I_MSKU = BOOLE_X "
* I_MSLB = BOOLE_X "Stock with subcontractor
* I_MSKA = "Individual customer stock
* I_MSPR = "Project Stock
* I_MBEW = BOOLE_X "Valuated Stock

TABLES
MAT_SEL = "
* T_MSKA = "
* T_MSPR = "
* T_MBEW = "Material Valuation
* T_QBEW = "Transfer Structure of Valuated Project Stock
* T_EBEW = "Transfer Structure of Valuated Sales Order Stock
WRK_SEL = "
BWKREIS_SEL = "Ranges Structure for Valuation Areas
* T_MARC = "
T_MARD = "
T_MCHB = "
T_MKOL = "
* T_MSKU = "
* T_MSLB = "
.




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_SAPLMCB1_001 User Exit for Inventory Controlling

IMPORTING Parameters details for MCB_STOCK_SELECT

I_MARC - Plant Stock

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

I_NULL_STOCKS -

Data type: BOOLE
Default: BOOLE_SPACE
Optional: Yes
Call by Reference: Yes

I_MARD - Storage Location Stock

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

I_MCHB - Batch Stock

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

I_MKOL - Vendor Consignment

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

I_MSKU -

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

I_MSLB - Stock with subcontractor

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

I_MSKA - Individual customer stock

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

I_MSPR - Project Stock

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

I_MBEW - Valuated Stock

Data type: BOOLE
Default: BOOLE_X
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for MCB_STOCK_SELECT

MAT_SEL -

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

T_MSKA -

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

T_MSPR -

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

T_MBEW - Material Valuation

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

T_QBEW - Transfer Structure of Valuated Project Stock

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

T_EBEW - Transfer Structure of Valuated Sales Order Stock

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

WRK_SEL -

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

BWKREIS_SEL - Ranges Structure for Valuation Areas

Data type: MCBRBWK
Optional: No
Call by Reference: Yes

T_MARC -

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

T_MARD -

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

T_MCHB -

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

T_MKOL -

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

T_MSKU -

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

T_MSLB -

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

Copy and paste ABAP code example for MCB_STOCK_SELECT 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_marc  TYPE BOOLE, "   BOOLE_X
lt_mat_sel  TYPE STANDARD TABLE OF MCBRMAT, "   
lt_t_mska  TYPE STANDARD TABLE OF MCBXMSKA, "   
lv_i_null_stocks  TYPE BOOLE, "   BOOLE_SPACE
lt_t_mspr  TYPE STANDARD TABLE OF MCBXMSPR, "   
lt_t_mbew  TYPE STANDARD TABLE OF MBEW, "   
lt_t_qbew  TYPE STANDARD TABLE OF MCBXQBEW, "   
lt_t_ebew  TYPE STANDARD TABLE OF MCBXEBEW, "   
lv_i_mard  TYPE BOOLE, "   BOOLE_X
lt_wrk_sel  TYPE STANDARD TABLE OF MCBRWRK, "   
lv_i_mchb  TYPE BOOLE, "   BOOLE_X
lt_bwkreis_sel  TYPE STANDARD TABLE OF MCBRBWK, "   
lv_i_mkol  TYPE BOOLE, "   
lt_t_marc  TYPE STANDARD TABLE OF MCBXMARC, "   
lv_i_msku  TYPE BOOLE, "   BOOLE_X
lt_t_mard  TYPE STANDARD TABLE OF MCBXMARD, "   
lv_i_mslb  TYPE BOOLE, "   BOOLE_X
lt_t_mchb  TYPE STANDARD TABLE OF MCBXMCHB, "   
lv_i_mska  TYPE BOOLE, "   
lt_t_mkol  TYPE STANDARD TABLE OF MCBXMKOL, "   
lv_i_mspr  TYPE BOOLE, "   
lt_t_msku  TYPE STANDARD TABLE OF MCBXMSKU, "   
lv_i_mbew  TYPE BOOLE, "   BOOLE_X
lt_t_mslb  TYPE STANDARD TABLE OF MCBXMSLB. "   

  CALL FUNCTION 'MCB_STOCK_SELECT'  "NOTRANSL: Selektion von Bestandsfeldern für das Bestandscontrolling
    EXPORTING
         I_MARC = lv_i_marc
         I_NULL_STOCKS = lv_i_null_stocks
         I_MARD = lv_i_mard
         I_MCHB = lv_i_mchb
         I_MKOL = lv_i_mkol
         I_MSKU = lv_i_msku
         I_MSLB = lv_i_mslb
         I_MSKA = lv_i_mska
         I_MSPR = lv_i_mspr
         I_MBEW = lv_i_mbew
    TABLES
         MAT_SEL = lt_mat_sel
         T_MSKA = lt_t_mska
         T_MSPR = lt_t_mspr
         T_MBEW = lt_t_mbew
         T_QBEW = lt_t_qbew
         T_EBEW = lt_t_ebew
         WRK_SEL = lt_wrk_sel
         BWKREIS_SEL = lt_bwkreis_sel
         T_MARC = lt_t_marc
         T_MARD = lt_t_mard
         T_MCHB = lt_t_mchb
         T_MKOL = lt_t_mkol
         T_MSKU = lt_t_msku
         T_MSLB = lt_t_mslb
. " MCB_STOCK_SELECT




ABAP code using 7.40 inline data declarations to call FM MCB_STOCK_SELECT

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_marc) = BOOLE_X.
 
 
 
DATA(ld_i_null_stocks) = BOOLE_' '.
 
 
 
 
 
DATA(ld_i_mard) = BOOLE_X.
 
 
DATA(ld_i_mchb) = BOOLE_X.
 
 
 
 
DATA(ld_i_msku) = BOOLE_X.
 
 
DATA(ld_i_mslb) = BOOLE_X.
 
 
 
 
 
 
DATA(ld_i_mbew) = BOOLE_X.
 
 


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!