Wednesday, July 2, 2008

SAP Stock Per Bin

SAP Stock Per Bin

If you wish to find the stock per bin the following function module can be used.

SAP ABAP function Module to find stock per bin

L_TO_STOCK_PER_BIN_INT
_________________________________________________________


The above Function Module has the following input Parameters.

LTAK-LGNUM                  Warehouse Number / Warehouse Complex
LQUA-LGTYP                   Storage Type
LQUA-LGPLA                   Storage bin
LQUA-LENUM                  Storage unit number
_________________________________________________________


The following Values are extracted


Table
LQUA                              Quants
_________________________________________________________


Find the code below.

REPORT ZEX_BIN .

Parameter: p_lgnum like LTAK-LGNUM,
           p_lgtyp like LQUA-LGTYP,
           p_lgpla like LQUA-LGPLA,
           p_lenum like LQUA-LENUM.


Data: int_LQUA TYPE TABLE OF LQUA.


CALL FUNCTION 'L_TO_STOCK_PER_BIN_INT'
  EXPORTING
    I_LGNUM       = p_lgnum
    I_LGTYP       = p_lgtyp
    I_LGPLA       = p_lgpla
*   I_LENUM       = ' '
  TABLES
    T_LQUA        = int_LQUA
          .

If sy-subrc = 0.

endif.


See Also:
SAP Locating Plants for a Given Material
SAP get Plant Description For a given Material
SAP PLANT MATERIAL and STORAGE LOCATION
Company Code For a Plant
Plant Details Company Code and Controlling Area
SAP Storage Location Data