Skip to Content
avatar image
Former Member

ME21N User exit

I need to change a value in the PO header prior to save a PO with transaction ME21N. I tried with EXIT_SAPMM06E_013 but its not working. Any diea how to?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 01, 2010 at 02:54 AM

    Hi EXIT_SAPMM06E_013 should work.

    anyways just try exit MM06E005 for PO header ME21N. Go to SMOD & see the details of this Exit.

    Regards

    Abhii

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 01, 2010 at 05:34 AM

    Hi Umana,

    Try use this badi:

    ME_PURCHDOC_POSTED .

    You can use this insted of 'EXIT_SAPMM06E_013' , The Badi contains same parameter and you can compare below.

    
    IF active NE space.
    *-User Exit:
        CALL FUNCTION 'EXIT_SAPMM06E_013'
          EXPORTING
            i_ekko     = ekko
            i_ekko_old = ls_ekko_old
            i_logsy    = ekko-logsy
            i_vorga    = t160-vorga
          TABLES
            xeket      = lt_usr_xeket
            xekkn      = lt_usr_xekkn
            xekpo      = lt_usr_xekpo
            xkomv      = lt_usr_xkomv
            yeket      = lt_usr_yeket
            yekkn      = lt_usr_yekkn
            yekpo      = lt_usr_yekpo
            ykomvi     = lt_usr_ykomv
            xekbes     = lt_usr_xekbes
            xekes      = lt_usr_xekes
            xekeh      = lt_usr_xekeh
            xekek      = lt_usr_xekek
            xeina      = lt_usr_xeina
            xeine      = lt_usr_xeine
            yeina      = lt_usr_yeina
            yeine      = lt_usr_yeine
            yekes      = lt_usr_yekes
            yekeh      = lt_usr_yekeh
            yekek      = lt_usr_yekek
            xbatu      = lt_usr_xbatu
            xekpa      = lt_usr_xekpa
            yekpa      = lt_usr_yekpa
            xekpv      = lt_usr_xekpv
          EXCEPTIONS
            OTHERS     = 0.
      ENDIF.
    

    *- BAdI ME_PURCHDOC_POSTED
      IF NOT badi_purchdoc_inst IS INITIAL.
        CALL METHOD badi_purchdoc_inst->posted
          EXPORTING
            im_vorga    = t160-vorga
            im_ekko     = ekko
            im_ekko_old = ls_ekko_old
            im_ekpo     = lt_usr_xekpo
            im_ekpo_old = lt_usr_yekpo
            im_eket     = lt_usr_xeket
            im_eket_old = lt_usr_yeket
            im_ekkn     = lt_usr_xekkn
            im_ekkn_old = lt_usr_yekkn
            im_komv     = lt_usr_xkomv
            im_komv_old = lt_usr_ykomv
            im_ekbes    = lt_usr_xekbes
            im_ekes     = lt_usr_xekes
            im_ekes_old = lt_usr_yekes
            im_ekeh     = lt_usr_xekeh
            im_ekeh_old = lt_usr_yekeh
            im_ekek     = lt_usr_xekek
            im_ekek_old = lt_usr_yekek
            im_eina     = lt_usr_xeina
            im_eina_old = lt_usr_yeina
            im_eine     = lt_usr_xeine
            im_eine_old = lt_usr_yeine
            im_batu     = lt_usr_xbatu
            im_ekpa     = lt_usr_xekpa
            im_ekpa_old = lt_usr_yekpa
            im_ekpv     = lt_usr_xekpv
          EXCEPTIONS
            OTHERS      = 0.
    
      ENDIF.
    

    I hope this may helpfull.

    Thank you,

    Thanks,

    AMS

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 01, 2010 at 07:12 AM

    Can please give me some brief explination for doing the needful.

    Thank,

    AMS

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      IF your problem solved please try to close this Thread.Before closing try give some more inputs that helpfull to you.

      That may helpfull to others.

      Thanks,

      AMS