Exit in ME51N EXIT_SAPLMEREQ001 & EXIT_SAPLMEREQ003

Hello together,
I am using EXIT_SAPLMEREQ001 and EXIT_SAPLMEREQ003 to change custom fields in the item. But i have the following problem:
When I call IM_REQ_ITEM->get_data( ) in EXIT_SAPLMEREQ001 it has always the BSART 'NB' and not the
one the user has chosen. It seems that it has always the state from the start of the programm where the default for BSART is "NB"

Hello Sebastian,
please take a look at EXIT_SAPLMEREQ005. You should then check for IM_DATA_PERSISTENT-BSART to check for the purchase req. type (as it is stored in EBAN). In case you want to check for BSART of the purchase requisition you are working on, check IM_DATA_NEW-BSART.
Hope this helps,
Matteo

Similar Messages

  • User Exit in ME51N: EXIT_SAPLMEREQ001 Problem with header

    Hello together,
    I am using EXIT_SAPLMEREQ001 and EXIT_SAPLMEREQ003 to change custom fields in the item. But i have the following problem:
    When I call IM_REQ_ITEM->get_data(  ) in EXIT_SAPLMEREQ001 it has always the BSART 'NB' and not the
    one the user has chosen. It seems that it has always the state from the start of the programm where the default for BSART is "NB"

    User Exit
    PR -
    MEREQ001
    PO -
    MM06E004  Control import data screens in purchase order
    MM06E005  Customer fields in purchasing document
    ME_PROCESS_PO_CUST (BADi)
    Hope the above helps.
    Regards,
    Vivek

  • Erro in Screen Exit on ME51N

    Hi there,
    I'm implemente a screen exit on ME51N, the exit MEREQ001, I'm new in screen exits.
    It's implemented, but I got the following error message when trying to access the screen "Customer Data" in the transaction
    <b>
    "Screen SAPLXM02 0111 must be an Include screen (screen error)"</b>
    Thanks a lot.
    Alexandre

    Hello Alexandre,
    I am new in screen exits too and the error you get is because of the fact that SAPLXM012 with subscreen 0111 is a function pool:
      System-defined Include-files.                                 *
      INCLUDE LXM02TOP.                          " Global Data
      INCLUDE LXM02UXX.                          " Function Modules
      INCLUDE LXM02F00.
                             " SAP-Formpool for Customer-Use
      INCLUDE ZXM02ZZZ.                          " Subprograms and Modules
    Within the include  INCLUDE ZXM02ZZZ yo ucan generate includes for your own purpose with source code for PAI and PBO; my tric is to get a control on costcenters in tc ME51N for authorizations and I am also figuring out how to manage this.
    Hopes this helps a little bit and if you can give feed back on my issue ...be my guest...;-)
    Kind regards ,
    René

  • Screen Exit for ME51N and ME52N ??

    Hi all,
    I have to replace the standard Field "Requisitioner" in the CONTACT Tab with a Z table field with Search help and I have to make it mandatory, so that the user MUST enter the Requisitioner and its F4 help can be used from the Z Table field.
    For this i need to modify standard program's screen using screen exit.
    How can i meet the requirement?
    Any sugegstions are welcomed...Helpful answers will be rewarded for sure..
    Thanks in advance,
    Regards,
    Tejas

    Check the threads -
    User Exit or BADI   for ME21N or ME51N
    ME51N user exit
    Screen Exit for  ME51N
    Regards,
    Amit

  • Screen exit for ME51N in header

    Hi friends,
    Is there any screen exit for ME51N(Purchase requisition) in header level.I found MEREQ001 enhancement, but this is for item level.please help.
    regards,
    Thoufique.

    Hi Thoufique,
    try the following screen exits:
    EXIT_SAPLMEREQ_001 Export Data to Customer Subscreen for Re
    EXIT_SAPLMEREQ_002 Prepare Customer Subscreen for Requisiti
    EXIT_SAPLMEREQ_003 Import Data from Customer Subscreen for
    Also, for more help on your problem, refer to the following link:
    Re: re: screen exits
    Hope this will help you...

  • SAP Standard Exits for ME51n/52n/53n

    Hi Friends,
    Please tell me is there any SAP standard Exits for Purchase requisition Me51n/me52n/me53n..
    Thanks in Advance..........
    Ravi

    hi
    this are
    following enhancements that u can use
    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 P
    MM06E008  Monitoring of contr. target value in case of release or
    MM06E009  Relevant texts for "Texts exist" indicator
    MM06E010  Field selection for vendor address
    MM06E011  Activate PReq Block
    MMAL0001  ALE source list distribution: Outbound processing
    MMAL0002  ALE source list distribution: Inbound processing
    MMAL0003  ALE purcasing info record distribution: Outbound proces
    MMAL0004  ALE purchasing info record distribution: Inbound proces
    MMDA0001  Default delivery addresses
    MMFAB001  User exit for generation of release order
    welli mstill searching for that particular enhancement for ur requirment if i found i will let u know
    this the enhancement that u can use
    MEQUERY1  Enhancement to Document Overview ME21N/ME51N
    in this
    u can use the following componets
    EXIT_SAPLMEQUERY_001
    EXIT_SAPLMEQUERY_002
    also there is one more
    MM06E005 Customer fields in purchasing document
    Cheers
    Snehi
    Edited by: snehi chouhan on Jul 31, 2008 1:32 PM

  • Need exit for ME51N G/L account number automatically populated

    Hi ,
    i have the issue with  Enhancement.
    <b>The requirement is   in the tcode ME51N or ME52N .</b>    They will enter maerial and Qty ,Plant, Purchase group.
       i need to get G/L account number with respect to Purchase group automatically.
       pls do the need ful  if u know the procedure...
    regards
    devi

    Transaction Code - ME51N                    Create Purchase Requisition
    Exit Name           Description
    MEREQ001            Customers' Own Data in Purchase Requisition
    No of Exits:          1
    Transaction Code - ME52N                    Change 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.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    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
    Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:
    1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.
    2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.
    BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)
    Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.
    Please go through the following link which will help you understand the exits in a much better way:
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm
    http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
    http://sap.niraj.tripod.com/id21.html
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.sap-img.com/ab038.htm
    User Exits.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    customer exits
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Menu Exit.
    http://www.sappoint.com/abap/spmp.pdf
    http://www.sappoint.com/abap/userexit.pdf
    http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
    http://www.sapdevelopment.co.uk/enhance/enhanceh
    Rewards if useful.........
    Minal

  • 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

  • Badi / Screen Exit for ME51N

    Hi Folks,
    My requirement is to add a standard field in the existing tab . Is there any BAdi / Screen Exit provided for tcode ME51n. I have checked the provided Exits and BAdi's but all of them are to add a new tab. But in my case I want to add a field in the existing tab.
    Kindly let me know the possibilities.
    Thanks in Advance.
    Somu

    Hi Soma,
    As i know it is not possible  . Better to add a new tab and add fields there.
    Regards,
    Madhu.

  • Screen Exit for  ME51N

    HI ,
    EVERYBODY
    I AM DOING SCREEN EXIT FOR TCODE ME51N, ENHANCEMENT (MEREQ001) EXIT SAPLMEGUI , I HAVE ADDED TWO FIELDS
    VALIDITY START DATE AND VALIDITY END DATE.
    I HAVE CONFUSION ABOUT HOW TO EXPORT DATA ENTERED IN SUBSCREEN.
    PLS HELP ME ..........
    THANKS & REGARDS
    SANJEEV

    hi,
    EXIT_SAPLMEREQ_001 -
    Export Data to Customer Subscreen for Requisition (PBO)
    *sample code write in the corresponding include
    DATA: ls_mereq_item TYPE mereq_item.
    clear eban values if no PReq item
    IF im_req_item IS INITIAL.
      CLEAR: *eban,
             eban.
    ELSE.
    read item data from system
      ls_mereq_item = im_req_item->get_data( ).
    fill customer field with old values
      eban-zflag = ls_mereq_item-zflag.
       *eban-zflag = ls_mereq_item-zflag.
    ENDIF.
    Read and store activity type to chnge the field status
    of the subscreen
    IF NOT im_req_item IS INITIAL.
      gf_aktyp = im_req_item->GET_ACTIVITY( ).
    endif.
    EXIT_SAPLMEREQ_003 Import Data from Customer Subscreen for Requisition
    data:     ls_mereq_item type mereq_item.
    *get values if PReq item exists
    if not im_req_item is initial.
    *read item data from system
      ls_mereq_item = im_req_item->get_data( ).
    *if customer field changed
      if eban-zflag ne *eban-zflag.
    *fill field with new value
        ls_mereq_item-zflag = eban-zflag.
    *set new item data to system
        call method im_req_item->set_data( ls_mereq_item ).
    *tell the system that there has something changed on the customer tab
        EX_CHANGED = 'X'.
      endif.
    endif.
    cheers,
    sasi

  • User Exit for ME51N to maintain Item Texts as mandatory

    Hi all,
    In ME51N T.code. I have a requirement wherein the texts has to be maintained mandatory under "TEXT" tab in "Item Detail". I couldn' find the relavant exit's or BADI's.
    Can anyone of you give your suggestions if you had come acroos something similar. Thanks!

    Hi,
    Try BADI  'ME_REQ_POSTED'.
    Regards ,
    Supriya

  • 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

  • SOS:     Exit for ME51n/ ME52n/ ME53n/

    hello erverybody,
    at First i would like to implement the exit mm06e007 but i have no idea how to do it!!
    have someone an example, coding or Tips,... ??
    Second Problem :
    how can I Overwrite the <u>Tapstrips name</u> using exit MEREQ001 ??
    please i need a help!!
    best regard
    dani.

    Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:
    1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.
    2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.
    BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)
    Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.
    Please go through the following link which will help you understand the exits in a much better way:
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm
    http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
    http://sap.niraj.tripod.com/id21.html
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.sap-img.com/ab038.htm
    User Exits.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    customer exits
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Menu Exit.
    http://www.sappoint.com/abap/spmp.pdf
    http://www.sappoint.com/abap/userexit.pdf
    http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
    http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    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

  • Exit for ME51n - ABAP OO coding

    Hi,
    I am writing a BADI for ME51n - ME_REQ_POSTED.
    In that i want to restrict the account assignment category either A or K. but i am not able to write a coding as i am not good enough in OO.
    field name is KNTTP.
    how to do it?
    Thanks.

    I've done the same thing but for PO creation(ME21N) through BADi ME_PURCHDOC_POSTED.
    You may want to do same thing like below:
    DATA:re_ekpo LIKE LINE OF im_ekpo.
      data:tabix type sy-index value '1'.
    *BREAK-POINT.
      READ TABLE im_ekpo INTO re_ekpo INDEX tabix.
      tabix = tabix + 1.
    "Check for account assignment cat only for "A" and "L".
      if re_ekpo-KNTTP = 'L' or re_ekpo-KNTTP = 'A'.
    GET PARAMETER ID 'KNT' FIELD re_ekpo-KNTTP.
    IF sy-subrc ne 0.
    MESSAGE 'You are not aurthorized to use Account Assignment Category (Logit)L!!' TYPE 'E'.
    ENDIF.
    ENDIF.
    Finally assign "KNT" in parameters tab from SU01 for those users who actually want to use Account Assignment Category A and L(In my case)
    Cheers,
    Amit.

Maybe you are looking for

  • No HDMI output after driver updates

    I have for almost a year succesfully been using my micro HDMI port on my Lenovo Yoga 2 Pro for watching movies via my projector. Today, Driver Booster suggested I update 10 drivers that were outdated. So I did. It included some Intel(R) Dynamic Platf

  • Error deploying process flows

    hello, i'm trying to deploy process flows, getting this error. privileges on my workflow manager are set correctly but it looks like something is not ok with connection to database. workflow server looks ok and i can manage it through oracle workflow

  • Apple software not updating - Error message

    iMac locked up (white screen of death) so restarted. When it restarted it will no longer update apple applications through the App Store.  Downloads and then starts to instal and comes up with an error message.   (iTunes, iMovie so far)  Non Apple pr

  • Can't execute Photoshop Elements 11/Premiere Elements 11

    Okay, I have installed/uninstalled about 5 times now and the software WILL NOT excute!!! When I try to open, a window pops up of "Elements 11 Organizer" and wants me to "accept". I do this and still NOTHING happens with the program loading! Sometimes

  • Possible Upgrade Options to Photoshop CS6

    I have the Design Premium Creative Suite latest version, and the latest Lightroom. I want to retain the use of the CS programs but the current versions will be sufficient except for Photoshop and Lightroom.  At this point and in the future I will onl