Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

user exit for me51n

Former Member
0 Kudos

Hi Friends..

I need to create an user exit for the transaction me51n. Here when i click the save button i need to call one pop up.. in that pop up when i press the yes button i need to call the transaction md04.Here i need to pass the input for Md04. When i press the BACK button i need to come back to the same screen in Me51n.

For this requirement i found one function module exit for the transaction me51n.That function module exit contains around 8 no of function modules...

I would like to know that how to proceed to do this user exit... Where should i write the codings for the existing function module exit or whether i need to create a new function module?

Help me regarding this.. Since i am new for doing User exit..

Regards,

GowriShankar.

2 REPLIES 2

Former Member
0 Kudos

Transaction Code - ME51N Create Purchase Requisition

Exit Name Description

MEREQ001 Customers' Own Data in Purchase Requisition

No of Exits: 1

USER EXIT

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html

Rewards if useful..............

Minal

Former Member
0 Kudos

Hi Shankar,

You can easily do with BADI.

BADI tirgger when ME51N is saved : ME_REQ_POSTED

1.go to se18, put ME_REQ_POSTED and go for implementation and create

2.then enter implementation name like z_me_req_post.

3.then double click on methos posted and place the below code.

4.save and activate both method and interface.


method IF_EX_ME_REQ_POSTED~POSTED.

  data : answer type c.
  CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
*     TITLEBAR                    = ' '
*     DIAGNOSE_OBJECT             = ' '
      text_question               = 'Confirm to switch to MD04'
      TEXT_BUTTON_1               = 'YES'
*     ICON_BUTTON_1               = ' '
      TEXT_BUTTON_2               = 'NO'
*     ICON_BUTTON_2               = ' '
*     DEFAULT_BUTTON              = '1'
      DISPLAY_CANCEL_BUTTON       = ''
*     USERDEFINED_F1_HELP         = ' '
*     START_COLUMN                = 25
*     START_ROW                   = 6
*     POPUP_TYPE                  =
*     IV_QUICKINFO_BUTTON_1       = ' '
*     IV_QUICKINFO_BUTTON_2       = ' '
   IMPORTING
     ANSWER                      = answer.
*   TABLES
*     PARAMETER                   =
*   EXCEPTIONS
*     TEXT_NOT_FOUND              = 1
*     OTHERS                      = 2
            .

  if answer = '1'.
  call TRANSACTION 'MD04'.
  if sy-ucomm = 'EBCK'.
     set SCREEN 0014.
  endif.
  endif.
endmethod.

regards,

Madhu.