ME51N User Exit

Hi all,
I need to create a user exit that allows me to create a purchase requisition (ME51N) just for some materials differentiated by type of material, account assignment category and/or plant.
Please help. Thank you very much.

Hi,
You cannot create user exit since user exits are enhancements provided by SAP. You can only insert your own code in the zincludes attached with the exits. Now use the following program to find an exit for a transaction.
This info would definitely help you, reward points if so.
* REPORT YSMOD2
* SELECTION TEXTS : INPUT1 ----> Enter search term for Trxn.
*                   INPUT2 ----> Enter type of exit
REPORT YSMOD2 .
TABLES: MODSAP, MODACT, TSTC.
PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
            INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
DATA: SEARCH1(6),
      SEARCH2(3),
      SEARCH3 LIKE MODSAP-MEMBER.
DATA : FIRST_ROW VALUE 'Y'.
CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
             '%' INPUT2     INTO SEARCH2.
SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
  FIRST_ROW = 'Y'.
  CHECK TSTC-PGMNA NE SPACE.
  CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
  SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
                       AND MEMBER LIKE SEARCH3.
    SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
    IF FIRST_ROW EQ 'Y'.
      WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
                                       45 MODSAP-MEMBER, 70 MODACT-NAME.
      FIRST_ROW = 'N'.
    ELSE.
WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
    ENDIF.
    CLEAR : MODSAP, MODACT.
  ENDSELECT.
  IF SY-SUBRC NE 0.
    WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
  ENDIF.
  CLEAR TSTC.
ENDSELECT.
END-OF-SELECTION.
  CLEAR: SEARCH1, SEARCH2, SEARCH3.
Regards

Similar Messages

  • Purchase requisition , ME51N, user exit for change Release date

    Hello.
    Purchase Requisition ( transaction ME51N).
    I want to change the value of u201ERelease dateu201C using user-exit EXIT_SAPLMEREQ_005.
    CALL METHOD im_req_item->get_data
      RECEIVING
        re_data = get.
    set = get.
    set-frgdt = u2026..
      CALL METHOD im_req_item->set_data
        EXPORTING
          im_data = set.
    Next, in dynpro is visible the right value from EXIT_SAPLMEREQ_005, but when saving the system uses another value, not the value from user exit.
    Do you anybody have some experiences with this problem?
    Lumir

    Hi
    The USer Exit you can use for the ME51n Tcode is by using Badi's.The Badi you can use is ME_PROCESS_REQ_CUST BADI.
    Method to be used: PROCESS_ITEM
    This link gives you a brief idea.Hope it helps you.
    BADI for ME51N
    Thanking you.

  • User exit or customer exits while saving the  the ME51N transaction

    i have the Requirement in ME51N, that i want to place a field in the item level tab, when i want to save the transaction the data eneterd in that field also saved in a Z-table.
    Help me on this issue.
    Regards
    Bobby

    hi
    check this link
    ME51N user exit
    Hope this helps!!
    Cheers
    Alfred

  • User Exit when save Purchase Requisition (ME51N and ME52N)

    Hy Everyboby,
    I want to know an enhancement point/user exit activated when saving a Purchase requisition to control all item amount for a budget check.
    So anyone can help me ?
    Thanks in advance.

    Hi All,
    i am working on an enhancement where in i need to enhance the transactions ME41,42 , ME51n, 52n and ME21n and ME22n.
    the requirement is whenever a PR is created/modified (ME51/52) and a business document is attached to it, then the same business document should be available in the RFQ created for this PR as an attachment. and the same flow should happen while creating the PO using the RFQ. I am unable to find a correct user exit for this requirement. kindlyreply me if you have any solutions for it.
    your help is very much appreciated.
    thanks,
    Mohan

  • User Exit for Purchase Req. ME51N

    Hi,
    In ME51N, I would like to default some value for the field BPUEB.
    Is there any user exit for such purpose?
    Many thanks.
    Regards,
    Chris

    Hi  Chris,
    These are the available exits and badis.
    Enhancement/ Business Add-in            Description
    Enhancement
    MEREQ001                                Customers' Own Data in Purchase Requisition
    Business Add-in
    ME_COMMITMNT_PARKING                    BAdI for Redefining Commitment Interface When Parking
    ME_MEREQ_PARKING                        BAdI Purchase Requisition: "Hold"
    ME_REQ_HEADER_TEXT                      Copy Header Text: Enjoy Purchase Requisition
    o.of Exits:          1
    o.of BADis:          3
    Impliment the coding and put the break points.
    ********Rewards some points.
    Rgds,
    P.Naganjana Reddy

  • User Exit for ME51N Transaction

    Hi folks,
         I have a requirement regarding ME51N Tocde. If the user enters the internal order number in ME51N, while creating Purchase Requisition, the corresponding cost center should be displayed in the cost center field by default. I have found one user exit which will be useful for this. I wrote the code and feteched the Cost Center value in the exit EXIT_SAPLMEREQ_005. But i dont field any paramet for sending the Cost center value here. Could any body suggest me how to proceed now...How can i display the cost center value, using this Exit....
                         Thanks in advance,
                          Shyam.

    Hi Shyam,
    You can find the user exit using the following method:
    1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
    2. In 'Display' mode, go to 'Methods' tab.
    3. Double click the method 'Get Instance' to display it source code.
    4. Set a breakpoint on 'CALL METHOD cl_exithandler=>get_class_name_by_interface'.
    5. Then run your transaction ML81N.
    6. The screen will stop at this method.
    7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.
    Hope this solves your query.
    Regards,
    Saumya

  • USER EXIT for TCODE ME51N,ME52N

    Hi Expers,
    I have one requirement, If you go to TCODE ME51n, ME52N, ME53N,  we will get one ALV grid . So user will change the layout according to his intrests & will save that layout.
    While saving that layout we will get 2 checkboxes
    1>User specific
    2>Default setting.
    So here my requirement is to disable "default setting" check box, sice users are not allowed to set default setting because it affects other users.
    Please help me to solve this issue & provide me user exit for the same
    Regards,
    Santhosh

    Hi,
    AMPL0001  User subscreen for additional data on AMPL
    LMEDR001  Enhancements to print program
    LMELA002  Adopt batch no. from shipping notification when posting
    LMELA010  Inbound shipping notification: Transfer item data from
    LMEQR001  User exit for source determination
    LMEXF001  Conditions in Purchasing Documents Without Invoice Rece
    LWSUS001  Customer-Specific Source Determination in Retail
    M06B0001  Role determination for purchase requisition release
    M06B0002  Changes to comm. structure for purchase requisition rel
    M06B0003  Number range and document number
    M06B0004  Number range and document number
    M06B0005  Changes to comm. structure for overall release of requi
    M06E0004  Changes to communication structure for release purch. d
    M06E0005  Role determination for release of purchasing documents
    ME590001  Grouping of requsitions for PO split in ME59
    MEETA001  Define schedule line type (backlog, immed. req., previe
    MEFLD004  Determine earliest delivery date f. check w. GR (only P
    MELAB001  Gen. forecast delivery schedules: Transfer schedule imp
    MEQUERY1  Enhancement to Document Overview ME21N/ME51N
    MEVME001  WE default quantity calc. and over/ underdelivery toler
    MM06E001  User exits for EDI inbound and outbound purchasing docu
    MM06E003  Number range and document number
    MM06E004  Control import data screens in purchase order
    MM06E005  Customer fields in purchasing document
    MM06E007  Change document for requisitions upon conversion into PO
    MM06E008  Monitoring of contr. target value in case of release orders
    These are all the user exits you have in the ME Package. Identify the exit which is suitable to fulfill your requirement.

  • User Exit ME51N/ME52N/ME53N  when save purchase requisition

    Hi,
    I want to validate purchase requisition  data for release startegy. If there is no value for release startegy .Then ME51N/ME52N/ME53N populate a custom message before saving.
    I have found the Enhancement MEREQ001.Can anyone help me to find the exit because there are 10 user exit for this enhancment.
    Thanks in advance,
    Harinder

    Hi,
    Follow the following steps to find the EXIT
    1. Open transaction SE24.
    2. Now open the object CL_EXITHANDLER in display mode.
    3. Go to the method tab and double click on the method GET_INSTANCE.
    4. Put a break point on cl_exithandler=>get_class_name_by_interface.
    5. Now execute the transaction you want to find EXIT for, it will take you to the above method.
    6. Write EXIT_HANDLER in fieldnames and hit enter, it will tell you the EXIT used for your transaction.
    7. Hit F8 and it will tell you all the EXITu2019s for your transaction.
    Now put break points in each user exit and check which one gets triggered for your transaction.
    Regards,
    Manish

  • Transactions ME51N & ME52N user exits - saving requisitions

    Hi all. 
    I have a new requirement for disallowing transactions ME51N & ME52N from saving purchase requisition records that have more than one line items associated with each of them.
    Basically upon the user clicking on the 'Save' icon I have to first check the purchasing group screen field (MEREQ3211GRID-EKGRP) of the captured purchase requisition at each event instance.  If the purchasing group matches the one I check for (i.e. the configured one) and the purchase requisition also has more than one line item associated to it then I should skip the posting functionality for this specific purchase requisition and then issue an error dialog message to the user telling him/her that such a transaction is not alllowed.
    Please help me to find the following:
    1) The user exit/BADI to use in order to implement such a change.
    2) The data objects or internal table/(s) that I may use in order to count the number of captured line items for each purchase requisition (e.g. via the 'DESCRIBE' command).
    Thanks in advance!

    Hi Venkatesan,
    I have looked at the definition of this BADI via se18.  The interface has a few parameters which also reference other types higher up in the hierachy.
    Which method do you think would be ideal in order to do the following:
    1) Get the item data count as captured by the user via the transaction ME51N?
    2) Get the item data count as collected from the database (i.e. as previously captured) and changed by the user via transaction ME52N?
    I have to then make changes exactly at these points.
    Thanks again!
    Edited by: L J Langa on Apr 16, 2009 3:00 PM

  • User exit for ME51n

    HI All,
    In ME51n/ME52n when the user clicks F4 help for Purchasing Group and selects one Pgroup then Material group is populated  automatically.I searched all the user exits and BADIs for ME but am not able to find how this is getting popualted.Can anyone plz let me know how this is happening?
    Thanks,
    Rakesh.

    Hi rakesh,
    Review OSS note 408017 for code samples
    use this program,
    REPORT YSMOD2
    SELECTION TEXTS : INPUT1 ----> Enter search term for Trxn.
                      INPUT2 ----> Enter type of exit
    REPORT YSMOD2 .
    TABLES: MODSAP, MODACT, TSTC.
    PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
                INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
    DATA: SEARCH1(6),
          SEARCH2(3),
          SEARCH3 LIKE MODSAP-MEMBER.
    DATA : FIRST_ROW VALUE 'Y'.
    CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
                 '%' INPUT2     INTO SEARCH2.
    SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
      FIRST_ROW = 'Y'.
      CHECK TSTC-PGMNA NE SPACE.
      CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
      SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
                           AND MEMBER LIKE SEARCH3.
        SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
        IF FIRST_ROW EQ 'Y'.
          WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
                                           45 MODSAP-MEMBER, 70 MODACT-NAME.
          FIRST_ROW = 'N'.
        ELSE.
    WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
        ENDIF.
        CLEAR : MODSAP, MODACT.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
      ENDIF.
      CLEAR TSTC.
    ENDSELECT.
    END-OF-SELECTION.
      CLEAR: SEARCH1, SEARCH2, SEARCH3.
    thanks,
    nagendra

  • BADI user exit at me51n or me21n

    Hi,
    i need badis or user exit while creating Purchase order requisition(me51n) or purchase order purchase order(me21n).
    What i am trying to do is that the cost center should be provided while the user enters other data.
    And the cost center will be composed of based on some criteria and it will be available while user entering data.
    Thanks.

    Hello
    In both cases you should use the "CUST" version of the BAdI because the other ones are "SAP-internal":
    ME_PROCESS_PO_CUST
    ME_PROCESS_REQ_CUST
    For both BAdIs you will find plenty of sample codings with the ABAP Development forums.
    Regards
      Uwe

  • User exit me51n change 'versions'

    Hi there,
    I'd like to ask which user exit for me51n to change 'Version' in level item detail to 'Set version in process' or 'Complete version' while user click save.
    The reason behind this is to create PR as draft, and PR would not be delivered to be released. So user may have 2 option ("yes/no" option) to create PR, one as final release and two, ready to be released/approved. When user choose "yes" save as draft, user exit change its item 'versions' as 'Set version in process'.
    The question would be, which user exit should be used and what function module to read and change its 'versions'.
    Thanks,
    Imera

    hi
    LMELA002  Adopt batch no. from shipping notification when pos
    LMELA010  Inbound shipping notification: Transfer item data f
    LMEQR001  User exit for source determination
    LMEXF001  Conditions in Purchasing Documents Without Invoice
    LWSUS001  Customer-Specific Source Determination in Retail
    M06B0001  Role determination for purchase requisition release
    M06B0002  Changes to comm. structure for purchase requisition
    M06B0003  Number range and document number
    M06B0004  Number range and document number
    M06B0005  Changes to comm. structure for overall release of r
    M06E0004  Changes to communication structure for release purc
    M06E0005  Role determination for release of purchasing docume
    ME590001  Grouping of requsitions for PO split in ME59
    MEETA001  Define schedule line type (backlog, immed. req., pr
    MEFLD004  Determine earliest delivery date f. check w. GR (on
    MELAB001  Gen. forecast delivery schedules: Transfer schedule
    MEQUERY1  Enhancement to Document Overview ME21N/ME51N
    MEVME001  WE default quantity calc. and over/ underdelivery t
    MM06E001  User exits for EDI inbound and outbound purchasing
    MM06E003  Number range and document number
    MM06E004  Control import data screens in purchase order
    MM06E005  Customer fields in purchasing document
    MM06E007  Change document for requisitions upon conversion in
    These are the posible exits
    Regards

  • User Exit/BADI/BAPI for ME51n

    Hi Experts,
           My requirement is somewhat like this: I need to capture all the EBAN and EBKN data for a NEW PR created. Could you please tell me which User Exit or BADI or BAPI can be used to capture the details AFTER the SAVE button is pressed in ME51N (Create PR)? Most probably it should one of the last ones called just before insertion into the database??!!
    Thanks a lot in advance. Your input would be of great help.
    Amrita.

    Hi
    For PR creation ME51N will call BAPI_PR_CREATE.
    For more information, refer to the interface documentation: IF_EX_ME_BAPI_PR_CREATE_02
    Standard settings
    The BAdI can be used multiple times.
    There is no default implementation.
    Information about the implementation of BAdIs in the context of the Enhancement Concept is available in the SAP Library for SAP NetWeaver under BAdIs - Implementation.
    Example
    The class CL_EXM_IM_ME_BAPI_PR_CUST is available for an example implementation

  • User-Exit of BADI in ME51n T-code

    Hi All,
           I need an urgent help. I want to change the line items data of the purchase requisition before it is saved. When we press the SAVE button in the ME51n transaction, I should be able to add total value of the REQUISITION to some non-significant field of each ITEM in the requisition.
           What all I need at this stage is the user-exit or BADI in which I can do this and where I can get the item details that can be changed in that user-exit. I tried all the user-exits in MEREQ001 include but couldnt find where the item details are stored and where to change the data.
         Any inf. on this will be very very helpful.
       Thanks in advance.
       Raja Sekhar.

    Hi friend,
    Try this ampliation at CMOD:
    WCOUP001
    Try this BADI:
    RDM_PROMOTION_WAK1
    Regards,
    Welinton Rocha

  • User exit or BADI for Tcode ME51N

    Hi All,
    My requirement is i need to check available quantity at the time of Purchase req creation. If PR quantity is available in stock then it should not allow to create new PR.
    Is there any user exit or Badi for this requirement. Kindly send me.
    Regards,
    Paras

    Hai,
    User Exit:  MEREQ001
    Function exit             EXIT_SAPLMEREQ_001  
                                   EXIT_SAPLMEREQ_002  
                                   EXIT_SAPLMEREQ_003  
                                   EXIT_SAPLMEREQ_004  
                                   EXIT_SAPLMEREQ_005  
                                   EXIT_SAPLMEREQ_006  
                                   EXIT_SAPLMEREQ_007  
                                   EXIT_SAPLMEREQ_008  
                                   EXIT_SAPLMEREQ_009  
                                   EXIT_SAPLMEREQ_010  
    Screen exit               SAPLMEGUI           
    Include tables           CI_EBANDB           
                                   CI_EBANMEM

Maybe you are looking for

  • How to create a document/report on all objects in the BW system?

    Hi, The requirement in our company is to create a document/report with the list of all the objects that exist in the BW system for various applications. This list should contain the technical details of the different objects and where an object is us

  • LabVIEW application run on Windows XP Embedded

    I'm doing a Embedded system based on Windows XP Embedded operating system.I want to make a LabVIEW applications which can run on it.I see a lot of paper that show the LabVIEW does not support Windows XP Embedded.I want to know whether the official ha

  • Downloading data with field lables as headerline

    Hello ABAP gurus, i have a report, if i excute it, 10 files will be downloaded from standard tables and from ztables. i am using below method to download the data CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD. Now my client wants  all  downloade

  • Extended Fiori app opens in new window

    Hi, When I add my extended Fiori app to the launchpad, it opens in a new window. Is it possible that if I open it, it opens like all the other standard Fiori apps? When it opens in a new window, I can't navigate to other fiori apps, or go back to the

  • Add Selection Dimension Members in package LoadInfoprovider

    Hello, I have a requirement where i have to add dimensions Entity and Time into standard package LoadInfoprovider. I need to allow user to choose wich entity he wants to extract from Bw infocube into BPC infocube. Using the transformation file to do