Badi  for ME51N Item changes

Hi ,
  Is there any Badi or user exit to make changes to the line item data in the purchase requisition create/change ME51N or ME52N transactions. We would want to populate few fields automatically on the item data, so would request if any of you have worked on any Badi for this transaction, please do post in immediately.
Thanks,
Sowmya

Hi,
1)BADI to be implemented: ME_PROCESS_REQ_CUST.
Method to be used: PROCESS_ITEM.
Place the below code in your implementation.
data : l_item type MEREQ_ITEM.
CALL METHOD im_item->get_data
receiving
re_data = l_item.
*C-- L_ITEM-BEDNR is requirement tracking number
2)Exit in ME51N
MEREQ001 Customers' Own Data in Purchase Requisition
You can implemet by this way
You add your customer fields, which should be saved in the database, to
the include CI_EBANDB (in table EBAN). You can also add customer fields
that you want to use during the program run to the include CI_EBANMEM
(in structure MEREQ_ITEM) These fields are not stored in database table
EBAN.
<b>Reward points</b>
Regards

Similar Messages

  • BADI For Commitment Item Change for Service PO

    Hi All,
    I want to change the commitment item in the PR on change of Material Group . I used the BADI ME_PROCESS_REQ_CUST for changing the commitment item and its working fine for all types of PR except Service PR .
    In service PR , its changing the commitment item only on clicking the Account Assigment button because at this instant only the BADI is getting trigger .
    I want to change the commitment item without clicking the Account Assigment button (on pressing enter or at saving time ) .
    Is there any way ?
    Thanks
    Manik L Dhakate

    We are using User Exit MEREQ  EXIT_SAPLMEREQ_010
    In our PR creation for ME51n, we are validating the Person through HR Org structure at the Point of Key in his Cost Center, whether he belong to his Department cost center, we use this User Exit MEREQ  EXIT_SAPLMEREQ_010. If he doesnu2019t not belong, the message pop up as u201C Please use your department cost centeru201D. This works very good in case of NB Document Type (Non stock & Materials).
    We have customized ZCPR (Service PRs), but for service PRs, the place where we enter Account Assignment is Different screen, either it is planned or unplanned service, the system take you to another separate screen to key in Cost Center & GL, here the validation is not happening,
    Please suggest & advice us, we tried in this BADI : ME_PROCESS_REQ_CUST, we can fix it. Any User Exit or BADI for Service PRu2019

  • Any userexit or badi for Me51n or me52n

    Any  user exist  or badis for  Me51n or me52n if
    Material Profit center ,v/s Plant profit center  or v/s WBS profit
    center not matched then PR should not saved.
    Moderator message: please do some own research before asking.
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Feb 21, 2011 2:01 PM

    Hi,
    Please check this thread for the procedure to find the BADI for a transaction
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1276392,00.html#
    Or
    You goto se24 and specify the class CL_EXITHANDLER and in that double click on GET_INSTANCE method in that put a break point on the line 
    CALL METHOD cl_exithandler=>get_class_name_by_interface
    and run you transaction... for almost every action you will get this method trigger and in that check the exit name... And that's the BADI for the interaction made in that transactation.
    Please go through this link for Finding BADI using class CL_EXITHANDLER in detail.
    [Finding BADI|http://abapreports.blogspot.com/2008/06/badi-finding-in-abap.html]
    Hope this would help you.
    Good luck
    Narin
    Edited by: Narin Nandivada on Aug 19, 2008 5:30 PM

  • BADI for inserting items in ME51N

    Hi
    Which BADI do I use to insert items creating a purchase requisition (ME51N)?
    Thanks in advance.

    Check this badi..
    ME_BAPI_PO_CUST      Customer BAdI for BAPI_PO_CREATE1 and BAPI_PO_CHANG
    ME_BAPI_PR_CUST      Customer BAdI for Enjoy Purchase Requisition BAPIs
    next go to t-code Se15>expand the enhacement tab>enter package(ME) under Badi's tab and
                                                         execute you will get the list of Badi's
                                                         available...
    Prabhu
    Edited by: Prabhu Das on Jun 1, 2009 7:17 PM

  • Exit / BADI for ME51N / ME52N

    Hi experts,
    I have the following requirement:
    1. In transactions ME51N / ME52N, the long text field for the item (Item Text) must be made read-only if the PR is already approved / released (release strategy indicator = '2').
    2. The PR workflow approvers must recieve an e-mail if this text has been changed while the PR is still blocked / not fully approved (release strategy indicator = 'X').
    I'm guessing both can be achieved through BADI implementations (in this case, IF_EX_ME_REQ_POSTED~POSTED), but I've read a lot about various Exits in these transactions, and now I'm not sure if this is the right one. Can you help me?
    PS.: I'm not completely familiar with BADIs and Exits, so please bear with me on this.

    Thanks for the replies.
    The MM consultant is still looking for a way to grey out the text field within SPRO. It's not an easy requirement
    Regarding the text changes, I followed your advices and I'm now trying to implement my code within the exit EXIT_SAPLMEREQ_005 (it's triggered right after the user saves the document, so it makes sense). The problem now is that when this exit is called, the changes made to the item text are already committed, and I can't compare the new text with the old one.
    I also tried implementing ME_REQ_PROCESS_ITEM, but it doesn't seem to be called from ME52N.
    Isn't there a log for long text changes? It would be really easy to just read CDHDR / CDPOS and know if the text has been changed. Also, is this text the same text from material master? If it is, I guess it would be easier to log its changes, right?
    Will appreciate your input on this.
    Regards,
    Leo

  • UserExit/ Badi for me51n ( Version Details )

    Hi Experts,
    In transaction ME51n for Purchase Requistion for line item in Version TAB , I want to capture the Status "version completed" checkbox in a User exit or BADI and want to put a validation on the checkbox. I have  list of all UserExits and Badi's
    which are available for me51n. But none of them capture the Version TAB details in me51n. Version Details are available in EREV table.  EREV table details are not available in any of the UserExits and BADI's. No structure is available for that in User exits / Badi's.
    Also I want to know about BTE's. What are BTE's? Can BTE be used for ME51n transaction? If yes . what is the procedure  for the same?
    Please suggest a solution for the same as soon as possible.
    Thanks in Advance.

    Hello Priti,
    For BTE ref following doc-
    http://help.sap.com/saphelp_erp2004/helpdata/en/ee/e87988027a11d5a7d60000e83dda02/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7
    Thank You,
    Nishikant.

  • BADI for ME51N  purchase requisition

    Dear All,
    i want to use user badi for transaction ME51N as i want to put a check for cost centre with plant such that if it does not belong to a particular plant it should throw an error message
    i hav found one BADI
    ME_PROCESS_REQ_CUST
    wherein in one of the methods(PROCESS_ITEM) i m getting
    Plant directly but i have searched all method and i m able to get costcentre(*KOSTL) in methods like 
    IF_ACCT_CONTAINER_MM~LOOKUP
    now if i m trying to use this method its saying either method unknown or private or protected
    can anyone plz help me with the syntax of using methods having such format as above i know the syntax to access normal methods like getdata or getitem and so on.
    Ronak

    Hi Ronak,
    Your input parameter in PROCESS_ITEM (IM_ITEM) is an object of class IF_PURCHASE_REQUISITION_ITEM. You can get all item data by using:
    DATA:
      zls_item TYPE MEREQ_ITEM.
    zls_item = IM_ITEM->GET_DATA( ).
    Regards,
    John.

  • BADI for ME51n screen exit

    hi guys,
                 i have to add a new tab with three fields  under header level in me51n, i have used enhancement MEREQ001 but it is adding under item level only..so, guys can you please tell is there any BADI for this..,thanks in advance.
    regards,
    anand.

    Hi,
    As i know there is no possibility to add custom tab at header level better to go with item level.If need help here check and post.
    Regards,
    Madhu.

  • Code  of ME_process_cust_Po BADI for checking item data?

    Hi all,
    While users are creating new PO in ME21N, I have to check the condition records for the Materials they entered.
    If the condition record is not maintained for the respective material The creation of PO while saving it , should not be  allowed  and a message should be displayed.
    Please mention  the respective method and code to do this?
    Thanks
    Vamshi.

    Hi ,
    this is the sample code for Item check, by using mm_messages_mac(include u can raise error msg based on the INFNR(info record) field.
      DATA: ls_mepoitem TYPE mepoitem,
            ls_customer TYPE mepo_badi_exampl,
            ls_tbsg     TYPE tbsg.
      INCLUDE mm_messages_mac. "useful macros for message handling
    here we check customers data*
      ls_mepoitem = im_item->get_data( ).
      IF ls_mepoitem-loekz EQ 'D'.
    a physical deletion of the item was carried out. therrefor we have to*
    delete customer data on the level of the item*
        ls_customer-ebeln = ls_mepoitem-ebeln.
        ls_customer-ebelp = ls_mepoitem-ebelp.
        CALL FUNCTION 'MEPOBADIEX_SET_DATA'
          EXPORTING
            im_data                    = ls_customer
            im_physical_delete_request = 'X'.
      ELSE.
    update/insert operation*
        CALL FUNCTION 'MEPOBADIEX_GET_DATA'
          EXPORTING
            im_ebeln = ls_mepoitem-ebeln
            im_ebelp = ls_mepoitem-ebelp
          IMPORTING
            ex_data  = ls_customer.
    check customers data*
    check field badi_bsgru. This should be carried out only for new items. Once the PO is posted the*
    field should no longer be changeable. This is done in Method FIELDSELECTION_ITEM.*
        IF im_item->is_persistent( ) EQ mmpur_no.
          IF ls_customer-badi_bsgru IS INITIAL.
    Place the cursor onto field badi_bsgru. The metafield was defined in BAdI ME_GUI_PO_CUST,*
    Method MAP_DYNPRO_FIELDS.*
            mmpur_metafield mmmfd_cust_01.
            mmpur_message_forced 'W' 'ME' '083' text-002 '' '' ''.
          ELSE.
    check whether the field is valid*
            *SELECT SINGLE * FROM tbsg INTO ls_tbsg WHERE bsgru EQ ls_customer-badi_bsgru.*
            IF NOT sy-subrc IS INITIAL.
              mmpur_metafield mmmfd_cust_01.
              mmpur_message_forced 'E' 'ME' '083' text-004 '' '' ''.
    invalidate the object*
              CALL METHOD im_item->invalidate( ).
            ENDIF.
          ENDIF.
        ENDIF.
    check field badi_afnam*
        IF ls_customer-badi_afnam IS INITIAL.
          mmpur_metafield mmmfd_cust_02.
          mmpur_message_forced 'W' 'ME' '083' text-003 '' '' ''.
        ENDIF.
      ENDIF.
    regards
    Prabhu

  • Is there any userexit OR BADI  for MIR7 WHEN change number of PO

    I know I can use badi  NVOICE_UPDATE- CHANGE_BEFORE_UPDATE method. to check PO's number when
    I save .
    I want to find an exit or badi to implement when I change number of PO, and  type enter  to  check the number .How can I do ??

    Hi,
    Please check this thread for the procedure to find the BADI for a transaction
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1276392,00.html#
    Or
    You goto se24 and specify the class CL_EXITHANDLER and in that double click on GET_INSTANCE method in that put a break point on the line 
    CALL METHOD cl_exithandler=>get_class_name_by_interface
    and run you transaction... for almost every action you will get this method trigger and in that check the exit name... And that's the BADI for the interaction made in that transactation.
    Please go through this link for Finding BADI using class CL_EXITHANDLER in detail.
    [Finding BADI|http://abapreports.blogspot.com/2008/06/badi-finding-in-abap.html]
    Hope this would help you.
    Good luck
    Narin
    Edited by: Narin Nandivada on Aug 19, 2008 5:30 PM

  • Exit/badi for me51n

    Hi Folks,
    My PO ordered quantity is greated than my PR quantity and that's because PR is not set to closed. Is there any way how to close the PR using exit/badi?
    Thanks!

    Dear Friend,
    U r creating PO with Reference to PR.
    if u r  doing like this u can check that at the PO Level itself.
    For this u can use the EXIT or BADI.
    Then Function group for the PO is XMO6 . in this there is one include . Include ZXM06U43
    Please Implement this Exit. this will trigger at the Check function of the PO.
    So u can restrict ur PO at the time of Creation..
    2 BADI for this is ME_PROCESS_PO_CUST.
    This BADI contains some many methods.
    For ur Requirement just implement Process_item method .
    Hope this will Help u.
    With Regards,
    Sumodh.P

  • Is it possible to run single workflow instance for multiple item changed or created?

    I have created a SharePoint Designer 2010 approval workflow and I am starting this workflow on item created and modified . Now when I am adding and updating multiple items it is starting workflow for each item but I want to start only one workflow for all items.
    I think it is possible in workflow 2013 but i want to use in
    workflow 2010.
    Is this possible? if yes then how?

    Hi Resham,
    From your description, my understanding is that you want to only start a workflow instance when multiple items are added or updated.
    Per my knowledge, if we set workflow start on item created or modified, when we add or update multiple items, SharePoint will create a workflow instance for each item, it is unable to just create an instance for multiple items. It is same
    between SharePoint 2010 workflow and SharePoint 2013 workflow.
    You said it is possible in workflow 2013, do you have any references?
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • User exit/BADI for PO item blocking

    Hi All,
    Is there any userexit/BADI available for blocking PO item?
    We want block PO item based on some header and item data validations. We need an exit which will be triggered before displaying the first screen(In case of PO change-ME22N). While creating/changing existing the item we got the BADI ME_PROCESS_PO_CUST. Here we can set im_item-loekz to value S so that item will be blocked. This is working fine only for creation/Change of item. Because this BADI will be triggered when ever we make some change in existing PO item/Creating new item.
    But say we have blocked a PO item now. later we have maintained necessary data which is used in validations. Then when we enter into same PO for next time it should automatically unblock that item.
    So we need exit which will be triggered before displaying first screen. If one exit is not available the we can use EXPORT/IMPORT logic to get all the data at one place. Hope there is no confusion in the requirement.
    Please let me know if there is any EXIT/BADI available for this scenario.
    Thanks for your help in Advance.
    Does any one has some solution for this?
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Dec 10, 2008 12:37 PM

    Hi vinod,
    I have come accross similar issue of blocking PO at item level. but we wanted to do it using Tcode MEMASSPO .Can you please give any suggestion in this regard.

  • BADI for ME51N

    Hi,
    Is there any BADI or Screen Exit to add a new TAB at item level in Purchase Requsition (ME51n) ?
    Thanks

    hi ,
    You can find the BADI In diffrent approches, finding thourgh class CL_EXITHANDLER is 1 method.
    Here are the steps.
    1. Go to Tcode SE24
    2. In object type specify object name as CL_EXITHANDLER
    3. Double click on method - GET_INSTANCE
    4. on line no 25 , i.e. is case statement, set a debug point
    5. execute any desire transaction code in a new screen for which
    you want to find a BADI
    6. it will take you in debugging mode, debugging the program
    press F5 until you are in method
    CALL METHOD cl_badi_flt_data_trans_and_db=>act_imps_per_flt_val
    7. check the value of exit_name in exporting parameter
    8. it will list all badi's available for that transaction
    2)Finding thourgh SQL TRACE ST05 is another apporach,see the blog
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Note : pls reward points if this is helpful to you.
    thanks & Regards,
    sravan.

  • Exit or Badi for controlling the change of user status in notification

    Hi,
    I want to check the current user status of notification while saving the notificaton. If the current user status satisifies particular situation, then the notification should be save else not.
    Is there any user exit or Badi which can be used to control the change of user status in notification.
    Thanks
    SUMIT

    Hi Pushpa,
    Thanks for the reply.
    the problem over here is that the BADi IQS0_STATUS_MAINTAIN only allows to disable the user status.
    the other function module STATUS_READ only fetches the data from JEST.
    whereas my problem is that i want to check on the changed status on the screen(which is not saved also).
    Appreciate your reply on the same.
    Thanks
    SUMIT

Maybe you are looking for

  • Problem with Result Analysis report (KKAK)

    Hello Experts, I am facing problem with T-code KKAK, when I am executing this transaction (Results Analysis (RA) on sales orders creates the data for posting to the GL, depending on the sales order (i.e. WIP or COS) ) system is displaying/calculating

  • Error while compiling in JDev 9.0.4.1.1(Build 1436)

    Hi, I am using JDeveloper Version 9.0.4.1.1 (Build 1436) and Java Version 1.5.0_04. But when I compile even a simple HelloWorld.java program also it is giving error: Error: initialization error: class file has wrong version 49.0, should be 45.3 or 46

  • Phone pages not formatting correctly.

    All phone pages are undersized and pinned to the left margin in iPhone Safari browser. When connected with Edge Inspect everything works perfectly except I can scroll right equal or more to page width.   Page property width 380 single column 380.  Ed

  • IPod screen in some other language, but I want English!

    Hello - Just bought an iPOD (7500 songs, photos) for my husband for Christmas. Turns out the screens are all in either Chinese or some kind of font that uses only symbols. Interestingly, the songs we downloaded print across the screen in English. Any

  • How to download ECC scale basis into CRM system?

    Hi All, Please share / suggest how to download ECC defined scale basis into CRM system (ECC to CRM)? We used DNL_CUST_CND & DNL_CUST_CNDALL.  Do we need to update any Tables in these Objects? Thanks and Regards, Fedor.