Thanks for contributing an answer to Stack Overflow! data: lwa_mepoitem type mepoitem,         lwa_po_lgfsb type ymm_po_lgfsb. 6. In case of a special vendor it should not be allowed to be changed - only displayed. You can implement special rules using the methods FIELDSELECTION_HEADER (at header level) and FIELDSELECTION_ITEM (at item level). Do I need to commit? try to fix it in Badi ME_GUI_PO_CUST Method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE, but I think this will not possible due to the fact, that the badi is processed during first call and not after you entered some data. Set break point in both BaDIs to check if they are proceeded. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Since this has got its own limitations alternatively we could use the below BADI for the purpose. CALL METHOD im_item->get_conditions If you give an example with this will be more valuable. . Can we update into EKPO or is it not possible? Your document will help to check the same. Internal tables both referring to your table of step 2 (line 54 – 59), c.      Include lmeviewsf01 (otherwise you will get a dump!!) But there is no set_datax method in class IF_PURCHASE_ORDER_ITEM_MM. This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name IF_EX_ME_PROCESS_PO_CUST into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in. There is also a number of example ABAP code snipts to help you use the functionality of this method. Statements in differential geometry independent from ZFC. Alerting is not available for unauthorized users, Right click and copy the link to share this comment, How to create customer screen on ME21N/ME22N/ME23N Item Level using BadI. Source code: fill your structure with the import parameter (line 18), c.      Function module Y_MM_MEPOBADI_POP as copy of MEPOBADIEX_POP, 1. Field selection (FIELDSELECTION_HEADER_REFKEYS, FIELDSELECTION_ITEM_REFKEYS, FIELDSELECTION_HEADER, FIELDSELECTION_ITEM methods). * Get Item Conditions SAP enhancement package for SAP ERP, version for SAP HANA. Mistake in declaration of screen and/or method, Refer in created screen/dynpro to your defined structure, You need to use both modules (event_pbo and event_pai) to get the method run, they are mandatory, Dump (PERFORM_NOT_FOUND            CX_SY_DYN_CALL_ILLEGAL_FORM ) when choosing the new tab, You forgot to add the include lmeviewsf01 in the top include of your function module, Still no display of the new tab but you already marked your field correct in, Ensure that all your function modules are in the same function pool. Go to Menu –> Implementation –> Overview –> and choose your implementation, ii. Updating ME21n fields WEORA/BSTAE via ME_PROCESS_PO_CUST BAdi? Change the function pool for global data in the top include, Tables: your structure of step 3 (line 52), Internal tables both referring to your table of step 2 (line 54 – 59), Include lmeviewsf01 (otherwise you will get a dump!!) (line 62), Create the following function modules in the, Y_MM_MEPOBADI_GET_DATA as copy of example code MEPOBADIEX_GET_DATA, Source code completely identically to MEPOBADIEX_GET_DATA, Function module Y_MM_MEPOBADI_PUSH as copy of MEPOBADIEX_PUSH, IM_DYNP_DATA type your structure of step 3, Source code: fill your structure with the import parameter (line 18), Function module Y_MM_MEPOBADI_POP as copy of MEPOBADIEX_POP, EX_DYNP_DATA type your structure of step 3, Source code: fill export parameter with your structure (line 18), Y_MM_MEPOBADI_SET_DATA as copy of example code MEPOBADIEX_SET_DATA, IM_PHYSICAL_DELETE_REQUEST type MMPUR_BOOL, Source code (copy of example source code of. Legal Disclosure | Start of transaction (INITIALIZE method). data lt_eban type table of eban. What can I do? MAP_DYNPRO_FIELDS: : enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS, 1. Visit SAP Support Portal's SAP Notes and KBA Search. 531), We’re bringing advertisements for technology courses to Stack Overflow, Introducing a new close reason specifically for non-English questions, EKPO fields not updated after PROCESS_ITEM method set_data in ME21N, BAPI_TRANSACTION_COMMIT with WAIT = 'X' within a BADi, User input in Z fields is not processed in CUSTOMER_ADD_DATA BAdI, Interface method call error: method is unknown or PROTECTED or PRIVATE, Method importing parameter type range of any. Why would remotes work reliably on one garage door opener, but unreliable on another? Overall check (CHECK method) When the purchase order is posted or when the Check function is chosen, the system performs an overall check for the PO. Documentation for BAdI method FIELDSELECTION_HEADER, Documentation for BAdI method FIELDSELECTION_ITEM, When the purchase order is posted or when the Check function is chosen, the system performs an overall check for the. I can hit most every other method in the BADI interface - PROCESS_ITEM, POST, CLOSE, FIELDSELECTION_HEADER_REFKEYS, INITIALIZE, etc - but not the FIELDSELECTION_ITEM method or the FIELDSELECTION_HEADER method. Which font with slashed zero is being used in this screengrab? By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. However, I have one issue which is not documented here. Making statements based on opinion; back them up with references or personal experience. TYPE-POOLS mmmfd . It's great that you give two different options that you've thought about. I had to call im_item->get_data ( ) to get the data from the position and the set method work perfectly. Necessary to display your customer field (compare to Note 1910516), Important: Change to your customer field used in Method MAP_DYNPRO_FIELDS. Helpful information and sample code in example implementation class CL_EXM_IM_ME_GUI_PO_CUST and CL_EXM_IM_ME_PROCESS_PO_CUST. thanks! Most Often Business come across this situation, once a PO is created through a contract they do not want to allow Users or the Concerned to change the Item Prices which are maintained through the conditions of the PO. I have successfully changed the value in the screen, BUT when I saved the PO, table EKPO is not updated with the new value. 5. If you just followed all steps and also put all function modules into the same function pool you should see now your custom tab and field in the item details: o  You forget or did not entered the code in IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM of ME_PROCESS_PO_CUST. How to program the CPU when making a small microcomputer? If needed, we can limit the change to the Company Code and or Plant and or for PO Document Types. I am updating answer. Checking of data (PROCESS_HEADER, PROCESS_ITEM, PROCESS_SCHEDULE, PROCESS_ACCOUNT methods) When data of the purchase order has been changed, it is then checked.With the following methods, you can carry out your own checks of the business objects of the purchase order and derive dependent data according to your own rules:Header data of PO PROCESS_HEADERDocumentation for BAdI method PROCESS_HEADERItem data of PO PROCESS_ITEMDocumentation for BAdI method PROCESS_ITEMDelivery schedule lines of PO PROCESS_SCHEDULEDocumentation for BAdI method PROCESS_SCHEDULEAccount assignments in PO PROCESS_ACCOUNTDocumentation for BAdI method PROCESS_ACCOUNT, 4. Privacy | select single yyrevisionstand from marc     into lwa_mepoitem–yyrevisionstand     where matnr = lwa_mepoitem–matnr     and werks = lwa_mepoitem–werks. CHECK ( ls_header-lifnr = '<specific vendor>' ). SAP as a standard functionality provides, the condition Types of the Condition Category B will be in Non changeable mode and Others will be on Changeable mode allowing users for a Price change as certain Business requires this change. It seems that this BADI doesn't work but I made my research and most people use this BADI to update EKPO fields in ME21n. Looks like your example updates the custom table and reads from this custom table. I had the same mistake and I was able to resolve it by using the same code shown before in IF_EX_ME_PROCESS_PO_CUST->PROCESS_ITEM. I've written the code in ME_PROCESS_PO_CUST BADI, method CHECK:. Can the phrase "bobbing in the water" be used to say a person is struggling? This method is IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM. Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Environment Materials Management (MM) SAP ERP Core Component SAP ERP SAP enhancement package for SAP ERP Terms of use | 2. *–>Check Company Code xxxx for *Description of Company Code (it looks like everything is activated correct). ENDCLASS. 3. TRANSPORT_TO_MODEL enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL, 1. Which one did you use? Append CI_EKPODB with your customer field, Create with SE11 a table with the following fields, Create with SE11 a structure with the following fields, Create with screen painter (SE51) a screen with the new field, Program should be either your already existing function pool for MM exits or create a copy of the SAP example SAPLMEPOBADIEX. MODIFY TABLE ch_fieldselection from field_selection. Important: Change function module to your module of step 6a, iv. o  Compare to Note 1910516, if there are only “display” fields on your customer screen you will not see the whole tab in creation and change mode! I need to implement an F4 help in the "PROCESS ON VALUE-REQUEST ", using some fields from the PO, as reference. By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Method : IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM. How can Estonia give "all" of their 155mm howitzers to Ukraine? Can anyone help, please? i want to check the field LABNR in the tr me21n / me22n. In the CHECK method, you can execute enhancements for an overall check or your own overall check for the purchase order. How does the World Economic Forum seem to have so much influence? Keep up the great work, Thanks a lot . you need to create a local variable of TYPE ref to the class. Is there other exit I can use to update fields WEORA and BSTAE in transaction code ME21N upon saving? A real live example and one I've heard gumbled about before. I am trying to modify the values of WEORA, BSTAE in ME21n tcode upon saving. Full list of available SAP object classes. This will cause the accounting document Posting value issues Once a pricing condition is changed and posted with a MIGO document. Change function module with your module of step 6c, vi. Start of transaction (INITIALIZE method) At the start of the transaction, the INITIALIZE method is processed once. 531), We’re bringing advertisements for technology courses to Stack Overflow, Introducing a new close reason specifically for non-English questions. Not the answer you're looking for? The system opens a new document to create, change or display a purchase order. Does Earth's core actually turn "backwards" at times? Not the answer you're looking for? . Checking of data (PROCESS_HEADER, PROCESS_ITEM, PROCESS_SCHEDULE, PROCESS_ACCOUNT methods). Trademark, SAP ERP Central Component all versions ; SAP ERP all versions ; SAP S/4HANA all versions ; SAP enhancement package for SAP ERP all versions ; SAP enhancement package for SAP ERP, version for SAP HANA all versions, Symptom 1: You change only a custom field, but ME_PROCESS_PO_CUST not triggered, Symptom 2: If you copy an item of the PO (or create a new PO with reference), custom field not copied to the new item / new PO, SAP enhancement package for SAP ERP, version for SAP HANA. Below is documentation, parameters and attributes of ABAP Method FIELDSELECTION_ITEM within SAP class IF_EX_ME_PROCESS_PO_CUST. If I remember correctly there was another possibility. a.      Y_MM_MEPOBADI_GET_DATA as copy of example code MEPOBADIEX_GET_DATA, 1. The above paragraphs briefly explain and give a broad idea on how the PO items can be protected from any changes for their prices in the conditions Based upon the conditions which we provide. Does anything else needs to be done additionally to trigger FIELDSELECTION_HEADER everytime ? What is the meaning of the expression "sling a yarn"? In general, changing the BADI includes the below steps in brief and in Broad. METHOD IF_EX_ME_PROCESS_PO_CUST ~FIELDSELECTION_ITEM. Post (POST method) With the POST method, you can prepare the PO data for posting and updating the database.Documentation for BAdI method POST, 7. You have to call method SET_DATAX and then SET_DATA. , you can reset your own customer programs. Why are bottom silkscreens of PCBs mirrored? and was completely ignored. Tables: your structure of step 3 (line 52), b. So within the screen module, I'm not able to figure, how to retrieve the PO fields like WERKS, MATNR, PARTNER, etc. The documentation is very good. Create with SE11 a table with the following fields, 3. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, I add a reference to your first post about. I was struggling around searching in scn for a complete description and error fixing... Kindly let me know , how to hide/disable customer tab based po condition type ? Understanding transaction with hundreds of input/output. . Important to change the code in line 38 to your customer field: Overview –> and choose your implementation, If there is no implementation you have to create one (search in scn how to do), Change Class Interface YCL_IM_MM_ME_GUI_PO_CUST, SUBSCREEN1 / Level: Constant / Visibility: Public / Type: MEPO_NAME / Initial Value ‘ITEMSCREEN1’, DYNP_DATA_PBO / Level Instance Attribute / Visibility Private / Associated Type your structure of step 3, DYNP_DATA_PAI / Level Instance Attribute / Visibility Private / Associated Type your structure of step 3, SUBSCRIBER: enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~SUBSCRIBE. Please let me know if anyone has faced this earlier and found a solution for this. ( lw_header-bsart = ‘aaaa’ OR I will have look. Trademark, SAP ERP all versions ; SAP R/3 all versions ; SAP enhancement package for SAP ERP all versions ; SAP enhancement package for SAP ERP, version for SAP HANA all versions. I've put code and a breakpoint in the FIELDSELECTION_ITEM method of ME_PROCESS_REQ_CUST, but it does'nt seem to be called. PROTECTED SECTION. To do this, use the relevant Methods of the BADI: PROCESS_HEADER, PROCESS . (line 38), i. Append CI_EKPODB with your customer field 2. method IF_EX_ME_PROCESS_REQ_CUST~FIELDSELECTION_ITEM. CLASS zcl_im_me_process_po_cust DEFINITION PUBLIC FINAL CREATE PUBLIC . Delete lines for standard fields (line20 – 32 of the example coding are not necessary for custom fields), 2. Best REgards, Murali. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. I'm wondering if I'm missing something obvious here and there's something else I need to do to enable these methods - or simply if they don't work - or if a better approach exists to getting an SAP-standard field set to display mode only (conditionally - not for all possible values for that field). DYNP_DATA_PAI / Level Instance Attribute / Visibility Private / Associated Type your structure of step 3, i. Start of transaction (INITIALIZE method) At the start of the transaction, the INITIALIZE method is processed once. i. iv. it updates the screen but when I click the save button, the value changed is not reflected in EKPO table, EKPO fields not updated after PROCESS_ITEM method set_data in ME21N, AI applications open new security vulnerabilities, How chaos engineering preps developers for the ultimate game day (Ep. With the OPEN method, you can import your own data and prepare it for further processing. Checking of Data - In this case Item Data of the PO BADI Method Process -Item Field Selection at Item Rules -BADI Method FIELDSELECTION_ITEM Overall check —BADI Method CHECK Post - BADI Method POST . Change source code by entering your field in the when case in line 56, 2. Start of Transaction – BADI method Initialize, Checking of Data – In this case Item Data of the PO BADI Method Process –Item, Field Selection at Item Rules –BADI Method FIELDSELECTION_ITEM. Method SUBSCRIBE is mandatory to show your own tab. call method im_item->set_data         exporting           im_data = lwa_mepoitem. Thanks for the detailed steps. I had the same mistake and I was able to resolve it by using the same code shown before in IF_EX_ME_PROCESS_PO_CUST->PROCESS_ITEM. Privacy | For example Purpose I have used the Company code and Plant and Document Type as the Limiting factor as Conditions . In this method you can initialize your own function groups. I'm trying to change field WEORA and BSTAE in ME21n through BADI me_process_po_cust, method PROCESS_ITEM. IM_DATA type your table of step 2, 2. SUBSCRIBER: enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~SUBSCRIBE. ls_subscriber-dynpro = dynpro number of your SE51 screen of step 4, ls_subscriber-program = function pool of your SE51 screen of step 4, ls_subscriber-struct_name = your structure of step 3, ls_subscriber-label = either direct text of via text definition of your class. With the OPEN method, you can import your own data and prepare it for further processing.Documentation for BAdI method OPEN, 3. When data of the purchase order has been changed, it is then checked. BADI Enhancement Spot ME_PROCESS_PO_CUST, Have a look into CL_EXM_IM_ME_PROCESS_PO_CUST to get sample coding. Little addition: I think SY-TCODE is in this case not reliable. SUBSCREEN1 / Level: Constant / Visibility: Public / Type: MEPO_NAME / Initial Value ‘ITEMSCREEN1’, 2. Regards Uwe Add a Comment Did medieval peasants work 150 days a year? MAP_DYNPRO_FIELDS: : enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS, Change source code by entering your field in the when case in line 56, Important: mapping one of the following customer fields in Line 58, TRANSPORT_FROM_MODEL enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL, Important: Change function module to your module of step 6a, TRANSPORT_TO_DYNP enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP, Change function module to your module of step 6b, enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP, Change function module with your module of step 6c, enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL, Delete lines for standard fields (line20 – 32 of the example coding are not necessary for custom fields), Change “if case” of line 64 to your own field, Change function module of line 66 to your module of step 6a, Change function module of line 74 to your module of step 6d, Enter line 78 (move changed value to local structure), Method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM, Necessary to display your customer field (compare to Note 1910516), Method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM, Necessary to pre-fill you customer field with e.g values from material master, Important is to use the following highlighted lines to get the entered data, And after your select you have to use the following highlighted lines to set your selected data, Own tab not displayed in ME21N and ME22N but displayed in ME23N, You forget or did not entered the code in IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM of ME_PROCESS_PO_CUST. ii. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. SET_DATAX , you will mark X to field you want to update values. Awesome document!! There is also a number of example ABAP code snipts to help you use the functionality of this method. Alerting is not available for unauthorized users, Right click and copy the link to share this comment. data for posting and updating the database. How to query most recent pair of each unique data-pair? But I have one question: When you save PO document, it is saving in Z table, not EKPO. ME_PROCESS_PO_CUST (enhancement spot) Helpful information and sample code in example implementation class CL_EXM_IM_ME_GUI_PO_CUST and CL_EXM_IM_ME_PROCESS_PO_CUST. Element List (referring to your structure fields)! In both examples all needed information is mentioned, but not always easy to find! Method Type: Instance Method This is an Instance Method so needs to be instantiated first before you can access any of the methods. CLASS zcl_im_me_process_po_cust IMPLEMENTATION. Important: you can call only one “Enhancement Implementation”, if there is already an active implementation you have to either use this or deactivate it! Unfortunately I don't have system access at the moment. In the Business Add-In ME_PROCESS_PO_CUST, the following methods are available enabling you to extend the business logic of the Enjoy purchase order. I'm getting the error endless loop. rev 2023.1.25.43191. Full list of available SAP object classes. INTERFACES if_ex_me_process_po_cust . ls_header = im_header->get_data( ). This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name IF_EX_ME_PROCESS_PO_CUST into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in. Symptom. You should use PROCESS_ITEM method from this BAdi, your code from this question perfectly works for me and updates these fields: Thanks for contributing an answer to Stack Overflow! Important to add the two modules event_pbo and module_pai! And after your select you have to use the following highlighted lines to set your selected data. Can you buy tyres to resist punctures from large thorns? ECC, BADI, MM06E005 MEREQ001 MEQUERY1, ME_GUI_PO_CUST, IF_EX_ME_GUI_PO_CUST, ME22N, ME23N, ENJOY TRANSACTION, ME_PROCESS_PO_CUST  , KBA , MM-PUR-PO-GUI , Userinterface - Purchase Orders , MM-PUR-GF-CE , Customer Enhancements , Problem. @NelsonMiranda, Your code works for me, check if you have conflicts with other BAdi implementations or other custom code. ii. Copyright | The field is being updated in the screen. EX_DYNP_DATA type your structure of step 3, ii. Method SUBSCRIBE is mandatory to show your own tab. o  Mistake in declaration of screen and/or method SUBSCRIBE of ME_GUI_PO_CUST, o  You forgot to add the include lmeviewsf01 in the top include of your function module. Change function module to your module of step 6b, v.      TRANSPORT_FROM_DYNP enter copy of source code of CL_EXM_IM_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP, 1. To learn more, see our tips on writing great answers. Looking through the documentation on BADI ME_PROCESS_PO_CUST, it appears that one of the methods used by the BADI will allow me to perform the validations I need to do (I need to set an SAP-standard field to display only at item level for a purchase order). Below is documentation, parameters and attributes of ABAP Method FIELDSELECTION_ITEM_REFKEYS within SAP class IF_EX_ME_PROCESS_PO_CUST. Unfortunately I don't have system access at the moment. Can you do me a favor and add ABAP Developer to the tag? If the business requirement is to have a different behavior, then the BADI ME_PROCESS_PO_CUST can be used. I announced my resignation . Importing Parameters: IM_ITEM " PO Item External View TYPE REF TO IF_PURCHASE_ORDER_ITEM_MM Exceptions: Can someone's legal name be all lowercase? As soon as the conditions are provided to the BADI, Write the logic to find out the PO is posted with a GR and if a change is being made to the Item Condition to an item already being posted with GR and after changing the Item condition when SAVING the PO issue an error message GR is already done for PO &, Item &. PROCESS_ITEM method - Processing of Item Data. 2. Copyright | Do universities look at the metadata of the recommendation letters? PUBLIC SECTION. Standard fields change data with ensuring data integrity. Very helpful indeed. Thanks and i will check from my end too . Important is to use the following highlighted lines to get the entered data.

Sylvia Roma Stark, Emma Bading Geschwister, Handschlaufen Für Nordic Walking Stöcke Crane, Prinz Robert Tot, Thomas Fritsch Todesursache,