SAP Function BAPI_MATERIAL_STOCK_REQ_LIST - Material - Current Requirements/Stock List

Parameter Reference Type Length Default Optional Text
DISPLAY_FILTER BAPI_MRP_LIST_PARAM-DISPLAY_FILTER C 8 X Name of Display Filter
GET_IND_LINES BAPI_MRP_LIST_PARAM-GET_IND_LINES C 1 'X' X Indicator: Determination of Single-Line Display
GET_ITEM_DETAILS BAPI_MRP_LIST_PARAM-GET_ITEM_DETAILS C 1 X Indicator: Determination of Detail Display for MRP Elements
GET_TOTAL_LINES BAPI_MRP_LIST_PARAM-GET_TOTAL_LINES C 1 X Indicator: Determination of Period Totals Display
IGNORE_BUFFER BAPI_MRP_LIST_PARAM-IGNORE_BUFFER C 1 X Indicator: Data Determination of Database (Not from Buffer)
MATERIAL BAPI_MRP_MAT_PARAM-MATERIAL C 18 Material Number
MATERIAL_EVG BAPIMGVMATNR u 82 X
MRP_AREA BAPI_MRP_MAT_PARAM-MRP_AREA C 10 X MRP Area
PERIOD_INDICATOR BAPI_MRP_LIST_PARAM-PERIOD_INDICATOR C 1 X Internal Period Indicator
PLANT BAPI_MRP_MAT_PARAM-PLANT C 4 X Plant
PLAN_SCENARIO BAPI_MRP_MAT_PARAM-PLAN_SCENARIO N 3 X Planning Scenario of Long-Term Planning
SELECTION_RULE BAPI_MRP_LIST_PARAM-SELECTION_RULE C 8 X Selection Rule

Parameter Reference Type Length Text
MRP_CONTROL_PARAM BAPI_MRP_CONTROL_PARAM u 356 Material Requirements Planning: Control Parameters for Material
MRP_LIST BAPI_MRP_LIST u 675 MRP: MRP List
MRP_STOCK_DETAIL BAPI_MRP_STOCK_DETAIL u 301 MRP: Statistics Fields for Stocks
RETURN BAPIRET2 u 548 Return Parameters

Parameter Reference Length Optional Text
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
MRP_IND_LINES BAPI_MRP_IND_LINES 588 X MRP: Single Lines of MRP Elements
MRP_ITEMS BAPI_MRP_ITEMS 952 X MRP: MRP Document Item
MRP_TOTAL_LINES BAPI_MRP_TOTAL_LINES 372 X MRP: Totals Line MRP Elements

Functionality
You use this method to select the current stock/requirements listof a material.
Depending on the control parameters of this method, the stock,requirements and receipt information for the material can be determinedfrom the following planning environments:

  • Stock/requirements list from operative planning:

  • Material requirements planning
    Master production scheduling
    • Stock/requirements list from long-term planning

    • The method selects all relevant stock, requirement, and receiptinformation for the material from the required planning environment.
      As a result, the following is output:
      • A list header of the main planning parameters for the material. This
      • header has the same structure as the MRP list header.
        • Details on all relevant MRP elements in the required formats

        • The following formats are supported for the detailed output:
          • Detailed Dispay of the MRP Elements

          • The detailed display contains the planning-relevant parameters of allMRP elements that must be taken into account in the current planningenvironment.
            • Single Line Display of the Requirements/Stock List (Presetting)

            • The single line display contains the information of the single linedisplay of the corresponding dialog transactions for the display ofrequirements/stock lists.
              • Period Totals Display of the Requirements/Stock List

              • The period totals display contains the information of the period totalsdisplay of the corresponding dialog transactions for the display ofrequirements/stock lists for the requested period.
                INCLUDE BAPI_RET OBJECT DOKU ID TX

                Notes

                Authorization Check

                • MRP: Authorization object M_MTDI_ORG

                • Activity Types in MRP (Field MDAKT)
                  A - MRP/Master Production Scheduling: Display Requirements/StockList
                  Plant
                  MRP controller
                  • Long-Term Plannning: Authorization object M_LFPL_ORG


                  • Activity Types in Long-Term Planning (field MDATL)
                    L4 - Long-Term Planning: Display Requirements/Stock List
                    Planning scenario
                    Plant

                    Parameter Dependencies

                    • In systems with inactive MRP areas, the parameter Plant must be
                    • specified in addition to the parameter Material
                      • In systems with active MRP areas, you can specify either the parameter
                      • Plant or MRP_Area.
                        • If only the parameter Plant is filled, the system determines an
                        • aggregated plant view from the following information:
                          Stock, requirements and receipt information of the plant MRP area
                          All storage location and subcontractor MRP areas for the material in thespecified plant
                          • If only the parameter MRP_Area is transferred, this method
                          • returns the current requirement/stock list of the specified MRP area(plant, storage location or subcontractor MRP area).
                            • If the parameters Plant and MRP_Area are filled, the
                            • system carries out an availability check which can lead to an errormessage.

                              Additional Methods

                              • MRP List for the Material:

                              • Material.GetMRPList
                                • Planning a Material:
                                • Material.MaterialRequirementsPlanning
                                  INCLUDE BAPI_CUST1 OBJECT DOKU ID TX
                                  INCLUDE BAPI_CUST_OUT OBJECT DOKU ID TX
                                  INCLUDE BAPI_INFO1 OBJECT DOKU ID TX
                                  INCLUDE BAPI_INFO2 OBJECT DOKU ID TX

                                  Description
                                  This parameter contains the most important control parametersfor planning a material, taken from the material master and Customizingfor material requirements planning.
                                  INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

                                  Description
                                  This parameter contains the essential planning parameters of thematerial.
                                  The list header of the current requirements/stock list has the samestructure as the MRP list header of the material.
                                  INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

                                  Description
                                  This parameter contains the stock statistics for the material.
                                  The following data is transferred:

                                  • Information on the different partial stocks of the plant stock
                                  • available for MRP.
                                    • Cumulative stock requirement and receipt quantities for the material

                                    • INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

                                      Description
                                      INCLUDE BAPI_RETURN OBJECT DOKU ID TX

                                      Value range
                                      Type ID Number Message
                                      E 61 400 No authorization for & in plant & and MRP controller &
                                      E 61 405 No authorization for & and planning scenario & in plant &
                                      Type ID Number Message
                                      E 61 509 Enter a material
                                      E 61 275 Material & not found
                                      E MD 327 Enter a plant
                                      E 61 272 Plant '&1' does not exist
                                      E MD 320 Enter plant or MRP area
                                      E MD 318 MRP area &1 has not been defined
                                      E MD 317 MRP area &1 is not defined in plant &2
                                      E MD 109 Planning scenario & does not exist
                                      E MD 050 Selection rule & does not exist
                                      E MD 051 Display filter & does not exist
                                      Type ID Number Message
                                      S MD 053 Requirements/stock list for material & & & has been created

                                      Description
                                      INCLUDE MD03_BAPI_DISPLAY_FILTER OBJECT DOKU ID TX
                                      INCLUDE MD03_BAPI_GET_IND_LINES OBJECT DOKU ID TX
                                      INCLUDE MD03_BAPI_GET_ITEM_DETAILS OBJECT DOKU ID TX
                                      INCLUDE MD03_BAPI_GET_TOTAL_LINES OBJECT DOKU ID TX

                                      Description
                                      This parameter specifies in which of the following ways thecurrent stock/requirements list is to be determined in themethod:

                                      • The relevant MRP elements are read directly from the database.

                                      • The buffered requirements list/stock list from the main memory is used.

                                      • A prerequisite for the use of this parameter is that thestock/requirements list is already created in the corresponding LUW andstored in the main memory.
                                        This happens, for example, if thedialog function for the display of the current stock/requirements listwas called before the call of the method.

                                        Value range

                                        • X: All relevant MRP elements are read from the database.

                                        • Leerzeichen: The stock/requirements list from the main
                                        • memory buffer is used if this buffer had been filled.Otherwise, all MRP elements are read from the database.

                                          Description
                                          INCLUDE MD03_BAPI_MATERIAL OBJECT DOKU ID TX

                                          Description
                                          Parameter for the long material number
                                          This parameter can be used to transfer long material numbers. Thesenumbers can be up to 40 characters long.
                                          To be able to use this parameter you must activate the switch for thebusiness function LAMA (long material number) in the system.
                                          The business function LAMA is available as a component of the businessfunction set for DIMP.

                                          Value range
                                          None

                                          Default
                                          None

                                          Description
                                          INCLUDE MD03_BAPI_MRP_AREA OBJECT DOKU ID TX
                                          INCLUDE MD03_BAPI_PERIOD_INDICATOR OBJECT DOKU ID TX

                                          Description
                                          INCLUDE MD03_BAPI_PLANT OBJECT DOKU ID TX

                                          Description
                                          INCLUDE MD03_BAPI_PLAN_SCENARIO OBJECT DOKU ID TX

                                          Description
                                          INCLUDE MD03_BAPI_SELECTION_RULE OBJECT DOKU ID TX

                                          Description
                                          INCLUDE BAPI_EXTOUT OBJECT DOKU ID TX
                                          INCLUDE MD03_BAPI_IND_LINES OBJECT DOKU ID TX
                                          INCLUDE MD03_BAPI_MRP_ITEMS OBJECT DOKU ID TX
                                          INCLUDE MD03_BAPI_TOTAL_LINES OBJECT DOKU ID TX