Issue in BADI SMOD_APOCF005
I am facing and issue in BADI SMOD_APOCF005. I have a scenario where i have to update an Demand Profile in the Material Master of SNP. So i activated this BADI and the code is written. The problem is while doing CIF the Demand Profile is not getting updated, its only get updated at the time of changing the Master data in ECC . Below is the ABAP code for the same
Data: ls_matlocx TYPE /SAPAPO/CIF_MATLOCX.
DATA: ls_matloc TYPE /SAPAPO/CIF_MATLOC.
***Added by Ajay Chauhan for Distributing Demand into Balance Weeks for 5m01
*, loop at it_matloc into ls_matloc where ext_locno = '5M01'.
loop at it_matloc into ls_matloc where ext_locno ='5M01'.
* if ls_matloc-EXT_LOCNO = '5M01'.
ls_matloc-DPREX = 'VD_DEM_PRF'.
* LS_MATLOC-PSPLI = '2'.
MODIFY IT_MATLOC FROM LS_MATLOC.
loop at it_matlocx into ls_matlocx.
ls_MATLOCx-beskz = ' '.
ls_MATLOCx-SAFTY = ' '.
ls_MATLOCx-LGRAD = ' '.
ls_MATLOCx-BSTMI = ' '.
ls_MATLOCx-BSTMA = ' '.
ls_MATLOCx-BSTRF = ' '.
ls_MATLOCx-PLIFZ = ' '.
ls_MATLOCx-SVTTY = ' '.
ls_MATLOCx-REORD = ' '.
ls_MATLOCx-MAXSTOCK = ' '.
ls_MATLOCx-MSDP_SB_METHOD = ' '.
* LS_MATLOCX-PSPLI = 'X'.
ls_matlocx-DPREX = 'X'.
modify it_matlocx from ls_matlocx .
Urgent help is hight appreciated.