SAP BAPI To Get Material Details Data

Here’s the BAPI code you can use to get material details in SAP. The result will be Material General data, plant data and material valuation data.

REPORT Z_BAPI_MATERIAL_GET.

“Declare The Parameters
Parameters: p_matnr like BAPIMATDET-MATERIAL,
p_werks like BAPIMATALL-PLANT,
p_vlarea 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.



“Here’s the function module to get the material detail
CALL FUNCTION ‘BAPI_MATERIAL_GET_DETAIL’
EXPORTING
MATERIAL = p_matnr
PLANT = p_werks
VALUATIONAREA = p_vlarea
VALUATIONTYPE = p_valtyp
IMPORTING
MATERIAL_GENERAL_DATA = st_matgendata
RETURN = d_return
MATERIALPLANTDATA = st_matplantdat
MATERIALVALUATIONDATA = st_matvaldat .

If sy-subrc = 0.

endif.

Popularity: 1% [?]

Subscribe in a reader

Comments

0 Responses to "SAP BAPI To Get Material Details Data"

Post a Comment

Stay Updated