If you wish to display Material data related to Material General Data, Material Plant Data and Material Valuation Data then you can use the following BAPI. This BAPI displays the above mentioned data for a Material.

BAPI/Function Module to display Material Data / Display Material Data BAPI/Function Module
 
BAPI_MATERIAL_GET_DETAIL


This BAPI has 4 input parameters
  1. Material  (Mandatory)
  2. Plant
  3. Valuation Area
  4. Valuation Type


REPORT ZEX_GETMATDET .

Parameters: p_matnr like BAPIMATDET-MATERIAL,
            p_werks like BAPIMATALL-PLANT,
            p_valara like BAPIMATALL-VAL_AREA,
            p_valtyp like BAPIMATALL-VAL_TYPE.


Data: st_matgendata like BAPIMATDOA,
      st_matplantdat like BAPIMATDOC,
      st_matvaldat like BAPIMATDOBEW,
      d_return like BAPIRETURN.


CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
  EXPORTING
   MATERIAL                   = p_matnr
   PLANT                       = p_werks
   VALUATIONAREA               = p_valara
   VALUATIONTYPE               = p_valtyp
   IMPORTING
   MATERIAL_GENERAL_DATA       = st_matgendata
   RETURN                      = d_return
   MATERIALPLANTDATA           = st_matplantdat
   MATERIALVALUATIONDATA       = st_matvaldat .

   If sy-subrc = 0.

   endif.


Serkan AKKAVAK
Computer Engineer
serkurumsal@yandex.com