cancel
Showing results for 
Search instead for 
Did you mean: 

MRP Live enhancement (MD01N) is not working

0 Kudos
2,761

Hello Gurus ,

I created BADI implementation for PPH_MRP_RUN_BADI and provide custom class in the implementation.(picture below)

I type simple code in Eclipse custom class below. I just have a simple test for it.

*Simple test:CT_MDPS-MNG01 always = 0.

CLASS Z_MRP_LIVE_RUN_BADI DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES IF_PPH_MRP_RUN_BADI .
INTERFACES IF_AMDP_MARKER_HDB .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.

CLASS Z_MRP_LIVE_RUN_BADI IMPLEMENTATION.

METHOD IF_PPH_MRP_RUN_BADI~MDPS_ADJUST BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY.
CT_MDPS =
SELECT CTM.the_index,
CTM.matnr, CTM.werks, CTM.berid, CTM.berty, CTM.plaab, CTM.planr, CTM.dat00,
CTM.delkz, CTM.vrfkz, CTM.plumi, 0 as mng01, CTM.mng02, CTM.mng03, CTM.dat01,
CTM.dat02, CTM.dat03, CTM.webaz, CTM.fix01, CTM.fix02, CTM.baart, CTM.beskz,
CTM.sobes, CTM.wrk01, CTM.wrk02, CTM.lgort, CTM.delnr, CTM.delps, TM.delet, CTM.vpzuo,
CTM.zuvkz, CTM.vervp, CTM.rsnum, CTM.sernr, CTM.paltr, CTM.techs, CTM.verid, CTM.knttp,
CTM.kzvbr, CTM.sobkz, CTM.kdauf, CTM.kdpos, CTM.pspel, CTM.cuobj, CTM.aufnr, CTM.verto,
CTM.qunum,CTM.qupos, CTM.lifnr, CTM.ekorg, CTM.ebeln, CTM.ebelp, CTM.glmng, CTM.auftm,
CTM.arsnr, CTM.arsps, CTM.kapfx, CTM.monkz, CTM.vrpla, CTM.pbdnr, CTM.kzbws, CTM.mdmng,
CTM.wamng, CTM.edgno, CTM.ematn, CTM.dbskz, CTM.stlty, CTM.stlnr, CTM.stlkn, CTM.stpoz,
CTM.plifz, CTM.reslo, CTM.prio_urg, CTM.prio_req, CTM.sgt_scat, CTM.sgt_rcat,

0 as mdbs_amng01,
CTM.dabmg, CTM.wemng, CTM.xt_fix_dyn
FROM :CT_MDPS AS CTM;

ENDMETHOD.

Then i excute tcode: MD01N , but it doesn’t work , result is the same.

Is there anything that i can strive , thanks you.

Accepted Solutions (0)

Answers (2)

Answers (2)

Caetano
Product and Topic Expert
Product and Topic Expert

Hello

First of all, your enhancement implemented in the AMDP BAdI will be valid for MRP Live only, not for MD04. So don't expect to see your logic being called when you open transaction MD04.

Additionally, even when you are using MRP Live, your materials can be planned with the MRP Classic logic (ABAP) if there is any restriction. If this is the case, your enhancement will not be called either and you will need to implement a classic ABAP BAdI. You can check where your material was planned using transaction MD_MRP_FORCE_CLASSIC.

Regards,
Caetano

rupesh_brahmankar
Active Contributor
0 Kudos

Hello,

Please check these SAP notes

2270348 - BAdI calls in MRP Live

2276376 - MD01n: AMDP Customer BADIs

2268085 - S4TWL - MRP Live on SAP HANA - MD01N

Best Regards,

R.Brahmankar