Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue in BADI SMOD_APOCF005

Hi Gurus,

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

method IF_EX_SMOD_APOCF005~EXIT_/SAPAPO/SAPLCIF_PROD_001.



     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.

          clear ls_matloc.

*       ENDIF.

     endloop.



     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 .

  clear ls_matlocx.

endloop.

Urgent help is hight appreciated.

Regards

Ajay

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question