Quantcast
Viewing all articles
Browse latest Browse all 3353

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, but at the time of changing Master data in ECC then the Demand Profile gets updated.  Below is the ABAP code return for this logic

 

 

 

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


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>