Skip to Content
author's profile photo Former Member
Former Member

Adopt PR to PO BADI or User Exit

Need advise if there any one exprience on creating User Exit or BADI for adopting PR to PO (ME21N) .

I create custom tab for both PR (ME51N) and PO (ME21N), what i need to do when adopting PR to PO the customer tab value not copied even its field name are the same.

Need expert advise on this if there is any BADI or User Exit i can used to copied over the custom tab value.

Thanks

ME21n_1.png (39.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 23, 2013 at 09:10 AM

    Use BAdI ME_PROCESS_PO_CUST, there in method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM, and when PR number changes (im_item->get_previous_data failure or result differs from result of im_item->get_data) and copy values using im_item->set_data.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Raymond,

      Yes Currently using this BADI it seems ok and able to manually select the PR value base on the PR Doc Number. I'll closed this msg once everything confirmed and OK

      BADi: ME_PROCESS_PO_CUST

      PROCESS_ITEM

      Below is the code snippet

      check sy-tcode = 'ME21N'

      or sy-tcode = 'ME21'

      or sy-tcode = 'ME22N'

      or sy-tcode = 'ME22'

      or sy-tcode = 'ME23N'

      or sy-tcode = 'ME23'.

      data: ls_mepoitem type mepoitem.

      data :ls_header type ref to if_purchase_order_mm.

      data : tp_zzpprctr type eban-zzpprctr.

      include mm_messages_mac.

      * get current data from business object

      ls_mepoitem = im_item->get_data( ).

      *-Get the header data

      ls_header = im_item->get_header( ).

      if not ls_mepoitem-banfn is initial.

      select single zzpprctr into tp_zzpprctr

      from eban where banfn = ls_mepoitem-banfn

      and bnfpo = ls_mepoitem-bnfpo.

      if sy-subrc = 0.

      ls_mepoitem-zzpprctr = tp_zzpprctr.

      call method im_item->set_data

      exporting

      im_data = ls_mepoitem.

      endif.

      p/s i don't have time to test the raymond suggestion but any user can try his options and feedback here.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2013 at 03:27 AM

    Hi ,

    Any one can help? What i had done is to look for any BADI related when i'm perform the adopt PR to PO but not sure which is the right BADI

    Here is the list

    LFM2_DB_STRG

    ADDRESS_SUBSCREEN

    ME_CHECK_ALL_ITEMS

    ME_CCP_ACTIVE_CHECK

    LUMER_BADI_ROUND_INT

    EAPS_HRKFT_EXTENSION

    FAGL_DERIVE_SEGMENT

    FAGL_DERIVE_PSEGMENT

    CHECK_COBL_ADDON

    MD_STOCK_TRANSFER

    ME_DEFINE_CALCTYPE

    ME_PO_PRICING

    ME_PO_PRICING_CUST

    REFERENCE_SITE

    SD_COND_ACCESS_A

    ADDR_LANGU_TO_VERS

    p/s i'm using SXV_GET_CLIF_BY_NAME to find the BADI.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2013 at 04:41 AM

    Hi,

    Check for these may be useful,

    ME51N: MEREQ001-----Exit

    ME21N:

    ME_GUI_PO_CUST---- BAdI

    AMPL0001-----Exit

    Regards,

    Ravindra.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.