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% [?]
Post a Comment