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
Similar Messages
-
Reg. Exit/BADI for changing item data of PO in ME22N
Hi all,
My requirement is to update the field LABNR (Order Ack.) of few specific line items of a PO, in the Transaction ME22N, using Exit/BADI.
I have tried the BADI ME_PROCESS_PO_CUST. But the PROCESS_ITEM method of this BADI processes only the line item which has been changed/inserted in ME22N transaction. But my requirement is to update line items irrespective of whether that line item was "changed/not changed" during the process in ME22N screen.
Could you please suggest me some suitable Exit/BADI for this requirement.
Regards,
Anbarasan KThanks Martin.
Problem solved by implementing the method Process_Header.
1. Get the items from Header - im_header->get_items
2. Loop the item list and get the line item record - re_item-item->get_data
3. <- Logic to Update the line item - >.
4. Update the line item - re_item-item->set_data
Thank you very much.. Martin.
Regards,
Anbarasan K -
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 DhakateWe 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 -
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 -
BADI for the transaction s ME51n and ME52n
Hi friends,
Can i get the code and particular BADI ME51n where the conditions are
In the purchase requisition the field (EBAN- PREIS) valuation price is configured as required, and the value is adopted from the material master record field (MBEW-VERPR) moving price. This moving price may differ on the same material based on the assigned plant. For example:
Material Plant Moving Price
1234 1000 9.10
TA10 5.00
TA12 7.00
The plant field in the Purchase Requisition is mandatory except for document type RV. When this document type is assigned SAP doesnt know which moving price to apply and so the user is prompted to manually enter a value.
To ensure an appropriate value is entered SAP should apply the value from the material master record plant 1000 where the plant field in the RV Purchase Requisition field is blank.
Essentially the same scenario applies to the Purchasing Group. As with the plant, the Purcahsing Group should be copied from the plant 1000 material master record.
SAP should apply the value from the material master record plant 1000 where the plant in the RV Purchase Requisition (EBAN-WERKS) is blank:
EBAN- PREIS = MBEW-VERPR
EBAN-EKGRP = MARC-EKGRP
Charitahi charitha
i can help u out in getting the values to the fields mentioned irrespective of document type which u can do i think and i'm here with the piece of code as follows :
Go to se19 to implement badi and give the name say zxyz and give the definition name as me_process_req_cust and implement the method called process_item
and write the following code.
data : wa_item type mereq-item,
v_ekgrp type marc-ekgrp,
v_preis type mbew-verpr.
select single ekgrp
from marc
into (v_ekgrp)
where werks = '1000' and matnr = '100-100'.
select single verpr
from mbew
into (v_preis)
where matnr = '100-100'
and bwkey = '000'.
call method im_item->get_data
receiving
re_data = wa_item.
wa_item-ekgrp = v_ekgrp.
wa_item-preis = v_preis.
wa_item-waers = 'INR'.
if im_count = 1.
call method im_item->set_data
exporting
im_data = wa_item.
endif.
hope this code will help in passing the data to the tcode me51n and if any issues let me know.
reward point if helpful
sandhya -
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 PMHi 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 updating Item Gross Weight (VL01N)
Hi All
I am using interface CHANGE_DELIVERY_ITEM and
FILL_DELIVERY_ITEM of defination name LE_SHP_DELIVERY_PROC to change the gross weight of delivery item. System is allowing me to change the gross weight in interface CHANGE_DELIVERY_ITEM but is not getting saved in the database.
Please Advice.
Ravindra SuvarnaHi!
I have not seen any hint, that this is not possible. But this is difficult to say without own test data, so you have to make some more checks.
Just place a break-point in your coding and debug a little bit starting with your new gross weight. Look, where it is overwritten again. Maybe it's very soon / easy to find. Think about watch points, too (but there can be a lot of different tables involved).
Regards,
Christian -
BADI for Subscreen (Tabstrip)
Hi again,
I am entering the outline agreement no. in the item list.
When I press enter it should display the amount corresponding to the no. Till this step its going fine however when by mistake an enter is pressed again it takes amount as outline agreement no. and output is going wrong.
I tried writing Field Exit for the same but didnt help much. So I have taken up writing a BADI. Can anybody tell me a BADI for subscreen(Item List).
Thanks,
Rinkurun the transaction get the program name from system->status and goto this program and goto the attribute and get the package name and enter the same package in se80..it'll list u all the enhancement..
reward points if it helps
regds
gunjan -
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,
SowmyaHi,
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 -
User exit/BADI for Return PO item delivery Address
Hi Guyz,
We have a requirement where in when a PO item is marked as return PO item(In ME21n/ME22n/ME23n We have check box at item level) and click on enter/Check/Save, In delivery address of item details we have to populate Vendor address. By default SAP populates Plant address. If we manually give Vendor number in item details=>Delivery address tab then it populates vendor address. We want to automate this functionality.
Is there any Exit/BADI which serve this purpose.
Note: We need this functionality for few doc types(i.e PO doc type should also be available in the exit).
Any ideas could be really helpfull.
Thanks,
Vinod.Hi,
there are some user-exit & enhancements....
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
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
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MEETA001 Define schedule line type (backlog, immed. req., preview)
ME590001 Grouping of requsitions for PO split in ME59
M06E0005 Role determination for release of purchasing documents
M06E0004 Changes to communication structure for release purch. doc.
M06B0005 Changes to comm. structure for overall release of requisn.
M06B0004 Number range and document number
M06B0003 Number range and document number
Some BADI s:
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Customer
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
ME_PO_PRICING Enhancements to Price Determination: Internal
ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
SMOD_MRFLB001 Control Items for Contract Release Order
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
MM_DELIVERY_ADDR_SAP Determination of Delivery Address
ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_REQ_POSTED Purchase Requisition Posted
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
ME_PURCHDOC_POSTED Purchasing Document Posted
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
ME_BSART_DET Change document type for automatically generated POs
ME_BAPI_PR_CREATE_02
ME_BAPI_PR_CREATE_01
ME_BAPI_PO_CREATE_02
ME_BAPI_PO_CREATE_01
ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMITMENT_RETURN Commitment for return item
ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CHECK_OA Check BAdI for Contracts
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
No.of Exits: 35
No.of BADis: 55
Arunima -
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.
RonakHi 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. -
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. -
Hi There,
I have to execute some custom code whenever an order line item has been deleted. Is there any BADI for this?
BADI should give me all the line item details and update indicator.
Thanks in advance,
Rams.Hi Rams,
Use the parameter IV_GUID in which you will get HEADER GUID.
Pass this header guid to the CRM_ORDER_READ to get the required data for item.
Refer the following piece of code:
APPEND iv_guid TO lit_header_guid.
INSERT gc_object_name-orderadm_h INTO TABLE lit_req_object.
INSERT gc_object_name-orderadm_i INTO TABLE lit_req_object.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lit_header_guid
it_requested_objects = lit_req_object
IMPORTING
et_orderadm_h = lit_orderadm_h
et_orderadm_i = lit_orderadm_i
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
<b>Reward points if it helps.</b>
Maybe you are looking for
-
I've been a BT Customer for about 6 years now ... just got my Home Hub 3, to replace my 2.0 Hub. I've been having some need to reboot the hub for the past month, due to it just not being connected to the Broadband, this happened to the old HH2 and ha
-
How can I get a cursor position?
Hi Everyone! In my TextArea, there is a blinking cursor. How can I get the cursor position not the mouse position. Thanks,
-
Hi Experts, i am using SAP B1 8.8 pl 08 and sql server 2008 and office 2003.While executing the EXCEL report i am getting following error message Unable to connect to XL Reporter. Error! Server communication failed! Cause: Server I
-
I am running terminal server 2012 R2 (RDS environment) In Windows Domain, 8 users across a LAN on a new server. Outlook 2013 crashes and will not load in safe mode. Outlook allows the initial profile setup and when the configuration is complete, it
-
Generate a delayed pulse with analog trigger
I want to generate a pulse with counter when the gate of counter receives a voltage value which is generated by analog output chanel,is this possible?? I am using PCI-6713 Thanks!!