Requirement : Minimum Lot Size of a material in MRP area should update using MD_MRP_LEVEL_CHANGE_DATA function module.
Minimum Lot Size we can find in MM03->MRP1->ARP Areas
i_matnr = Material
i_werk = Storage Location
i_mrp_area = MRP Area
i_berty = Type of MRP Area
i_selfields = Pass the selfields structure
i_mdma = Pass the mdma structure
i_dpop = Pass the dpop structure
Code Snippet :
DATA: wa_selfields TYPE sdibe_massfields,
wa_mdma TYPE mdma,
wa_dpop TYPE dpop,
wa_berty TYPE mdlv-berty,
wa_return TYPE bapireturn1.
wa_mdma-matnr = wa_final-matnr. "Material
wa_mdma-werks = wa_final-plant. "Plant
wa_mdma-dismm = wa_final-mrptype. "MRP Type
wa_mdma-dispo = wa_final-mrpcntrl. "MRP Controller
wa_mdma-berid = wa_final-mrparea. "MRP Area
wa_mdma-bstmi = wa_final-moq. "Minimum order quantity
wa_selfields-xbstmi = 'X'. "Minimum order quantity
CALL FUNCTION 'MD_MRP_LEVEL_CHANGE_DATA'
EXPORTING
i_matnr = wa_final-matnr
i_werk = wa_final-strgloc
i_mrp_area = wa_final-mrparea
i_berty = lv_berty
i_selfields = wa_selfields
i_mdma = wa_mdma
i_dpop = wa_dpop
IMPORTING
e_error_return = wa_return.
IDE Used To Test This Code : SAP GUI.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us. We will reply you as soon as possible.
Post a Comment