7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought ProgrammerSought ☰ search ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_ PO_CUST How to Mount and Use exFAT Drive on Ubuntu … Recently, I want to learn more about classic BADI. I haven't played BADI screen enhancement before, so I decided to play it. This screen enhancement mainly uses two BADIs: ME_GUI_PO_CUST and ME_PROCESS_PO_CUST There are examples for these two BADIs, you can click GoTo->Sample code>Display at se18 to view, or you can directly view the classes CL_EXM_IM_ME_GUI_PO_CUST and CL_EXM_IM_ME_PROCESS_PO_CUST at SE24 TOP https://www.programmersought.com/article/59575961794/ 1/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Now we add our own subscreen to the PO header, SAP's example provides adding subscreen to the item. Step 1: Create Function Group Build a Function Group modeled on the Function Group MEPOBADIEX The Function Group I built is shown below TOP https://www.programmersought.com/article/59575961794/ 2/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Step 2: Build a screen in the Function Group, the screen number is whatever TOP https://www.programmersought.com/article/59575961794/ 3/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Add the variables corresponding to the screen in the TOP, here I use tables directly. Step 3: Create an implementation for BADI ME_GUI_PO_CUST TOP https://www.programmersought.com/article/59575961794/ 4/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Add in Public SectionTYPE-POOLS mmmfd . TOP https://www.programmersought.com/article/59575961794/ 5/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Step 4: In Method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE, add the setting code of custom subscreen [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~subscribe. 2. DATA: lw_subscribers TYPE mepo_subscribers. 3. 4. * we want to add a customer subscreen on the Header tab 5. CHECK im_application = 'PO'. 6. CHECK im_element = 'HEADER'. 7. 8. CLEAR lw_subscribers. 9. lw_subscribers-name = subscreen1. 10. lw_subscribers-dynpro = '0100'. 11. lw_subscribers-program = 'SAPLZCI_EKKODB'. 12. lw_subscribers-struct_name = 'CI_EKKODB'. 13. lw_subscribers-label = 'Zero test2'. 14. lw_subscribers-position = 11. 15. lw_subscribers-height = 8. 16. APPEND lw_subscribers TO re_subscribers. 17. ENDMETHOD. 1 2 METHOD if_ex_me_gui_po_cust~subscribe. DATA: lw_subscribers TYPE mepo_subscribers. 3 4 * we want to add a customer subscreen on the Header tab 5 CHECK im_application = 'PO'. 6 CHECK im_element = 'HEADER'. 7 8 CLEAR lw_subscribers. 9 lw_subscribers-name = subscreen1. 10 lw_subscribers-dynpro = '0100'. 11 lw_subscribers-program = 'SAPLZCI_EKKODB'. 12 lw_subscribers-struct_name = 'CI_EKKODB'. 13 lw_subscribers-label = 'Zero test2'. 14 lw_subscribers-position = 11. 15 lw_subscribers-height = 8. 16 APPEND lw_subscribers TO re_subscribers. 17 ENDMETHOD. https://www.programmersought.com/article/59575961794/ TOP 6/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Step 5: In IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS, add code to associate the field name with its digital number [plain] view plaincopyprint? 1. FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping. 2. 3. LOOP AT ch_mapping ASSIGNING <mapping>. 4. CASE <mapping>-fieldname. 5. WHEN 'LV_TEST1'. <mapping>-metafield = mmmfd_cust_01. 6. WHEN 'LV_TEST2'. <mapping>-metafield = mmmfd_cust_02. 7. WHEN 'LV_TEST3'. <mapping>-metafield = mmmfd_cust_03. 8. ENDCASE. 9. ENDLOOP. 1 FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping. 2 3 4 LOOP AT ch_mapping ASSIGNING <mapping>. CASE <mapping>-fieldname. 5 WHEN 'LV_TEST1'. <mapping>-metafield = mmmfd_cust_01. 6 WHEN 'LV_TEST2'. <mapping>-metafield = mmmfd_cust_02. 7 WHEN 'LV_TEST3'. <mapping>-metafield = mmmfd_cust_03. 8 9 ENDCASE. ENDLOOP. It is estimated that only 9 Custom fields can be added because I am in TYPE-POOLSmmmfd sees the largest one is mmfd_cust_09, Here you can also get some standard fields on the custom subscreen. After the above five steps, we can see the custom subscreen on ME23N, but it is still not visible on ME21N and ME22N...Why is this, I still don't know. TOP https://www.programmersought.com/article/59575961794/ 7/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Step 6: Create an implementation for BADI ME_PROCESS_PO_CUST Join in the Public SectionTYPE-POOLS mmmfd . Step 7: Add code in Method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADE R, change the field status of table ch_fieldselection '-' means hidden,'+' or'.' means editable,'*' means display [plain] view plaincopyprint? 1. METHOD if_ex_me_process_po_cust~fieldselection_header. 2. DATA: lv_persistent TYPE mmpur_bool. 3. FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection. 4. 5. DEFINE set_input. 6. read table ch_fieldselection assigning <fs> with table key metafield = &1. 7. if sy-subrc = 0. 8. if im_header->is_changeable( ) = mmpur_yes. 9. 10. 11. <fs>-fieldstatus = '+'. else. <fs>-fieldstatus = '*'. https://www.programmersought.com/article/59575961794/ TOP 8/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 12. endif. 13. endif. 14. END-OF-DEFINITION. 15. 16. * if the item is already on the database, we disallow to change field badi_bsgru 17. lv_persistent = im_header->is_persistent( ). 18. 19. set_input mmmfd_cust_01. 20. set_input mmmfd_cust_02. 21. set_input mmmfd_cust_03. 22. 23. ENDMETHOD. 1 METHOD if_ex_me_process_po_cust~fieldselection_header. 2 DATA: lv_persistent TYPE mmpur_bool. 3 FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection. 4 5 DEFINE set_input. 6 read table ch_fieldselection assigning <fs> with table key metafield = &1. 7 if sy-subrc = 0. 8 if im_header->is_changeable( ) = mmpur_yes. 9 10 11 <fs>-fieldstatus = '+'. else. <fs>-fieldstatus = '*'. 12 endif. 13 endif. 14 END-OF-DEFINITION. 15 16 17 * if the item is already on the database, we disallow to change field badi_bsgru lv_persistent = im_header->is_persistent( ). 18 19 set_input mmmfd_cust_01. 20 set_input mmmfd_cust_02. 21 set_input mmmfd_cust_03. 22 23 ENDMETHOD. There are two points to note here: 1. im_header->is_changeable() can determine whether these fields are TOP currently editable, and if they are, it will be'X'. For example, they are https://www.programmersought.com/article/59575961794/ 9/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought editable when they just entered TCODE ME21N, ME22N, but when they are saved successfully by save It is temporarily unavailable to edit, press again You can edit it by changing it back to the editing state, and this function is implemented here. 2. im_header->is_persistent() can judge that when these fields have values in the database, it is'X'. When we write data into the table and don’t want it to be modified, we can use this to judge, such as One field is set to ME21N to be editable, ME22N is not editable. After these seven steps, ME21N/ME22N/ME23N can see this custom subscreen, but all self-built fields are editable. You must complete the eighth step to display normally Step 8: Call 2 modules in screen These two modules are stored in the program below TOP https://www.programmersought.com/article/59575961794/ 10/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Note: If you do not call these two modules, none of the four methods below BADI ME_GUI_PO_CUST will be triggered TRANSPORT_FROM_MODEL TRANSPORT_TO_DYNP TRANSPORT_FROM_DYNP TRANSPORT_TO_MODEL Step 9: Add code in Method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL Pass the three self-built fields of the header to the attribute dynp_data_pho [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~transport_from_model. 2. DATA: lw_header TYPE REF TO if_purchase_order_mm, 3. lw_mepoheader TYPE mepoheader, 4. lw_customer TYPE ci_ekkodb. 5. *--------------------------------------------------------------------* 6. * system asks to transport data from the business logic into the view 7. *--------------------------------------------------------------------* 8. 9. IF im_name = subscreen1. 10. * is it an Header? im_model can be header or item. 11. mmpur_dynamic_cast lw_header im_model. 12. CHECK NOT lw_header IS INITIAL. 13. * transport standard fields https://www.programmersought.com/article/59575961794/ TOP 11/30 7/14/2021 14. ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought lw_mepoheader = lw_header->get_data( ). 15. * store info for later use 16. 17. MOVE-CORRESPONDING lw_mepoheader TO dynp_data_pbo. ENDIF. 18. 19. ENDMETHOD. 1 2 METHOD if_ex_me_gui_po_cust~transport_from_model. DATA: lw_header TYPE REF TO if_purchase_order_mm, 3 lw_mepoheader TYPE mepoheader, 4 lw_customer TYPE ci_ekkodb. 5 *--------------------------------------------------------------------* 6 * system asks to transport data from the business logic into the view 7 *--------------------------------------------------------------------* 8 9 10 IF im_name = subscreen1. * is it an Header? im_model can be header or item. 11 mmpur_dynamic_cast lw_header im_model. 12 CHECK NOT lw_header IS INITIAL. 13 14 15 16 17 * transport standard fields lw_mepoheader = lw_header->get_data( ). * store info for later use MOVE-CORRESPONDING lw_mepoheader TO dynp_data_pbo. ENDIF. 18 19 ENDMETHOD. Step 10: Add code in Method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP By calling FM:ZCI_EKKODB_PUSH the attribute [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~transport_to_dynp. 2. 3. 4. 5. IF im_name = subscreen1. CALL FUNCTION 'ZCI_EKKODB_PUSH' EXPORTING https://www.programmersought.com/article/59575961794/ TOP 12/30 7/14/2021 6. 7. ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought im_dynp_data = dynp_data_pbo. ENDIF. 8. ENDMETHOD. 1 METHOD if_ex_me_gui_po_cust~transport_to_dynp. 2 3 4 5 IF im_name = subscreen1. CALL FUNCTION 'ZCI_EKKODB_PUSH' EXPORTING 6 im_dynp_data = dynp_data_pbo. 7 ENDIF. 8 ENDMETHOD. Step 11: Add code in IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP In the case of a PAI event, pass the value of the screen to the attribute dynp_data_pai, and compare dynp_data_pbo withdynp_data_pai, confirm TOP https://www.programmersought.com/article/59575961794/ 13/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought that the value of the self-built field has changed, set re_changed to'X', so that IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER will be triggered. [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~transport_from_dynp. 2. 3. 4. 5. IF im_name = subscreen1. CALL FUNCTION 'ZCI_EKKODB_POP' IMPORTING ex_dynp_data = dynp_data_pai. 6. 7. ENDIF. 8. 9. IF dynp_data_pai <> dynp_data_pbo. 10. * something has changed therefor we have to notify the framework 11. * to transport data to the model 12. 13. re_changed = mmpur_yes. ENDIF. 14. ENDMETHOD. 1 2 3 4 METHOD if_ex_me_gui_po_cust~transport_from_dynp. IF im_name = subscreen1. CALL FUNCTION 'ZCI_EKKODB_POP' IMPORTING 5 ex_dynp_data = dynp_data_pai. 6 7 ENDIF. 8 9 IF dynp_data_pai <> dynp_data_pbo. 10 * something has changed therefor we have to notify the framework 11 * to transport data to the model 12 re_changed = mmpur_yes. 13 ENDIF. 14 ENDMETHOD. TOP https://www.programmersought.com/article/59575961794/ 14/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Step 12: Add code in IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL, and transfer the modified data to the bussiness object [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~transport_to_model. 2. 3. DATA: lw_header TYPE REF TO if_purchase_order_mm, 4. lw_mepoheader TYPE mepoheader, 5. lw_customer TYPE ci_ekkodb, 6. lw_po_header_handle TYPE REF TO cl_po_header_handle_mm. 7. *--------------------------------------------------------------------* 8. * data have to be transported to business logic 9. *--------------------------------------------------------------------* 10. IF im_name = subscreen1. 11. 12. * is it an item? im_model can be header or item. 13. mmpur_dynamic_cast lw_header im_model. 14. CHECK NOT lw_header IS INITIAL. 15. lw_mepoheader = lw_header->get_data( ). 16. * standard fields changed? 17. IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1 18. OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2 19. OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3. 20. * update standard fields 21. lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1. 22. lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2. 23. lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. 24. 25. 26. CALL METHOD lw_header->set_data EXPORTING 27. im_data = lw_mepoheader. 28. 29. 30. ENDIF. ENDIF. 31. ENDMETHOD. TOP https://www.programmersought.com/article/59575961794/ 15/30 7/14/2021 1 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought METHOD if_ex_me_gui_po_cust~transport_to_model. 2 3 DATA: lw_header TYPE REF TO if_purchase_order_mm, 4 lw_mepoheader TYPE mepoheader, 5 lw_customer TYPE ci_ekkodb, 6 lw_po_header_handle TYPE REF TO cl_po_header_handle_mm. 7 *--------------------------------------------------------------------* 8 * data have to be transported to business logic 9 *--------------------------------------------------------------------* 10 IF im_name = subscreen1. 11 12 * is it an item? im_model can be header or item. 13 mmpur_dynamic_cast lw_header im_model. 14 CHECK NOT lw_header IS INITIAL. 15 lw_mepoheader = lw_header->get_data( ). 16 * standard fields changed? 17 IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1 18 OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2 19 OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3. 20 * update standard fields 21 lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1. 22 lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2. 23 lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. 24 25 CALL METHOD lw_header->set_data 26 EXPORTING 27 im_data = lw_mepoheader. 28 29 ENDIF. 30 ENDIF. 31 ENDMETHOD. Step 13: If you want to check the value of these fields, you can write it in IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER, where I want to check field1 must be PALM. [plain] view plaincopyprint? 1. METHOD if_ex_me_process_po_cust~process_header. 2. 3. DATA: lw_mepoheader TYPE mepoheader, TOP lw_customer TYPE ci_ekkodb. https://www.programmersought.com/article/59575961794/ 16/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 4. 5. DATA: lv_testflag TYPE c. 6. 7. INCLUDE mm_messages_mac. "useful macros for message handling 8. 9. lw_mepoheader = im_header->get_data( ). 10. 11. IF lw_mepoheader-lv_test1 <> 'PALM'. 12. * Place the cursor onto field lv_test1. The metafield was defined in BAdI ME_GUI_PO_CUST, 13. * Method MAP_DYNPRO_FIELDS. 14. 15. mmpur_metafield mmmfd_cust_01. 16. mmpur_message_forced 'E' 'ZDEV001' '999' '' '' '' ''. 17. * MESSAGE 'This field should be filled ''PALM''' TYPE 'W'. 18. 19. * CLEAR lv_testflag. 20. * lv_testflag = 'X'. 21. * EXPORT lv_testflag FROM lv_testflag TO MEMORY ID 'Z_ZERO_ME22N'. 22. 23. * invalidate the object 24. 25. CALL METHOD im_header->invalidate( ). ENDIF. 26. 27. ENDMETHOD. 1 2 3 METHOD if_ex_me_process_po_cust~process_header. DATA: lw_mepoheader TYPE mepoheader, lw_customer TYPE ci_ekkodb. 4 5 DATA: lv_testflag TYPE c. 6 7 INCLUDE mm_messages_mac. "useful macros for message handling 8 9 lw_mepoheader = im_header->get_data( ). 10 11 IF lw_mepoheader-lv_test1 <> 'PALM'. 12 * Place the cursor onto field lv_test1. The metafield was defined in BAdI ME_GUI_PO_CU 13 * Method MAP_DYNPRO_FIELDS.14 15 mmpur_metafield mmmfd_cust_01. 16 mmpur_message_forced 'E' 'ZDEV001' '999' '' '' '' ''. https://www.programmersought.com/article/59575961794/ TOP 17/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 17 * MESSAGE 'This field should be filled ''PALM''' TYPE 'W'. 19 * CLEAR lv_testflag. 20 * lv_testflag = 'X'. 21 * EXPORT lv_testflag FROM lv_testflag TO MEMORY ID 'Z_ZERO_ME22N'. 18 22 23 24 25 * invalidate the object CALL METHOD im_header->invalidate( ). ENDIF. 26 27 ENDMETHOD. If you press Enter to check, it will display an error message. After one change, press Enter once to respond, but the second time there is no response. There is a flaw here. When we press save, this message will not be displayed in the message table (I have studied it for a long time, but I TOP haven't worked out how to do it). Fortunately, there is a very good function https://www.programmersought.com/article/59575961794/ 18/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought here. Select PO header data still faulty. message, press Edit, you can locate the field of error message. At this point, the enhancement is complete. supplement: 1. IF_EX_ME_PROCESS_PO_CUST~INITIALIZE: initialize function groupThe variable statement of ZCI_EKKODB can be written here. [plain] view plaincopyprint? 1. METHOD if_ex_me_process_po_cust~initialize. 2. CALL FUNCTION 'ZCI_EKKODB_INIT' 3. . 4. ENDMETHOD. 1 2 METHOD if_ex_me_process_po_cust~initialize. CALL FUNCTION 'ZCI_EKKODB_INIT' 3 4 . ENDMETHOD. TOP https://www.programmersought.com/article/59575961794/ 19/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 2. IF_EX_ME_PROCESS_PO_CUST~OPEN: If you want to select the self-built table, you can write it here. There is a field IM_TRTYP has a certain control effect, and you can view its domain value. 3. IF_EX_ME_PROCESS_PO_CUST~POST: The statement to update the selfbuilt table can be written here. 4. Custom subscreen field must reference methodThe structure defined in IF_EX_ME_GUI_PO_CUST~SUBSCRIBE, from dict should be checked. TOP https://www.programmersought.com/article/59575961794/ 20/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 5. If there is a field in the self-built table, you must add a statement when the method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL determines that the field of the self-built table changesCALL METHOD lw_header>set_changed( ), Otherwise, no data changed will be displayed when the field of your self-built table changes. The following code is an example. [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~transport_to_model. 2. 3. DATA: lw_header TYPE REF TO if_purchase_order_mm, 4. lw_mepoheader TYPE mepoheader, 5. lw_customer TYPE ci_ekkodb, 6. lw_po_header_handle TYPE REF TO cl_po_header_handle_mm. 7. *--------------------------------------------------------------------* 8. * data have to be transported to business logic 9. *--------------------------------------------------------------------* 10. IF im_name = subscreen1. 11. 12. * is it an item? im_model can be header or item. 13. mmpur_dynamic_cast lw_header im_model. 14. CHECK NOT lw_header IS INITIAL. 15. lw_mepoheader = lw_header->get_data( ). 16. * standard fields changed? https://www.programmersought.com/article/59575961794/ TOP 21/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 17. IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1 18. OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2 19. OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3. 20. * update standard fields 21. lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1. 22. lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2. 23. lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. 24. 25. 26. CALL METHOD lw_header->set_data EXPORTING 27. im_data = lw_mepoheader. 28. 29. ENDIF. 30. 31. 32. 33. IF dynp_data_pbo-zdamon <> dynp_data_pai-zdamon. CALL FUNCTION 'ZCI_EKKODB_SET_DATA' EXPORTING 34. im_damon = dynp_data_pai-zdamon. 35. 36. 37. CALL METHOD lw_header->set_changed( ). ENDIF. 38. 39. ENDIF. 40. ENDMETHOD. 1 METHOD if_ex_me_gui_po_cust~transport_to_model. 2 3 DATA: lw_header TYPE REF TO if_purchase_order_mm, 4 lw_mepoheader TYPE mepoheader, 5 lw_customer TYPE ci_ekkodb, 6 lw_po_header_handle TYPE REF TO cl_po_header_handle_mm. 7 *--------------------------------------------------------------------* 8 * data have to be transported to business logic 9 *--------------------------------------------------------------------* 10 IF im_name = subscreen1. 11 12 * is it an item? im_model can be header or item. 13 mmpur_dynamic_cast lw_header im_model. 14 CHECK NOT lw_header IS INITIAL. 15 lw_mepoheader = lw_header->get_data( ). 16 * standard fields changed? https://www.programmersought.com/article/59575961794/ TOP 22/30 7/14/2021 17 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1 18 OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test219 OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3.20 21 lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1. 22 lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2. 23 lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. * update standard fields 24 25 CALL METHOD lw_header->set_data 26 EXPORTING 27 im_data = lw_mepoheader. 28 29 ENDIF. 30 31 32 IF dynp_data_pbo-zdamon <> dynp_data_pai-zdamon. CALL FUNCTION 'ZCI_EKKODB_SET_DATA' 33 EXPORTING 34 im_damon = dynp_data_pai-zdamon. 35 36 37 CALL METHOD lw_header->set_changed( ). ENDIF. 38 39 ENDIF. 40 ENDMETHOD. 6.Method IF_EX_ME_GUI_PO_CUST~EXECUTE can handle function code. [plain] view plaincopyprint? 1. METHOD if_ex_me_gui_po_cust~execute. 2. 3. 4. IF im_fcode = 'ZZZZ'. MESSAGE 'Zero test' TYPE 'I'. ENDIF. 5. ENDMETHOD. 1 2 3 METHOD if_ex_me_gui_po_cust~execute. IF im_fcode = 'ZZZZ'. MESSAGE 'Zero test' TYPE 'I'. 4 ENDIF. 5 ENDMETHOD. TOP https://www.programmersought.com/article/59575961794/ 23/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Zabbix disk performance monitoring Intelligent Recommendation ABAP BADI search implementation process MIGO enhancement 1 Finding method 1: Find keywords in the program: CL_EXITHANDLER 1. Find method 2: Use class CL_EXITHANDLER=>GET_INSTANCE to get enhancement points 2: SE18 view the BADI, you can see the interface ... Basic example of SAP BADI enhancement (t hree generations) Enhanced simple example (for novices) Sample requirements When using MM01 to create the sales view of materials, the field of the output tax classification is automatically filled with the default val... PT project-purchase order BADI enhancement-ME_PROCES TOP S_PO_CUST https://www.programmersought.com/article/59575961794/ 24/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought 1. User needs In the PT project, the actual business needs of users are as follows: In the communication tab of the purchase order headerSalesperson (VERKF)Change the field text toOA contract number(R... ME21N enhancement ME21NCreate a purchase order and click to save or check the button to enter the enhancement (first according to EKKOLIFNR, EKPO-MATNR, EKPO-WERKS LINKThe supplier, material, and factory in the self-b... Initialize method for BAdI enhancement poi nts of SAP S/4HANA production orders When creating a production order in S/4HANA, there is an enhancement point WORKORDER_UPDATE: This CAUFVDB stores the data at the production order header level: Let's look at the data stored in this st... More Recommendation Initialize method for BAdI enhancement poi nts of SAP S/4HANA production orders When creating a production order in S/4HANA, there is an enhancement point WORKORDER_UPDATE: This CAUFVDB stores the data at the production order header level: Let's look at the data stored in this st... TOP https://www.programmersought.com/article/59575961794/ 25/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Enhancement point of development and m odification (except another way to enhance exports and the BADI) This enhancement is relatively simple to understand and implement, and in many standard will be used in the program. 1, Enhancement point of development: The following example is a general report whic... Use ABAP code to dynamically create a new BAdI Enhance ment Implementation ... ME21N enhancement (auxiliary input) Recently received a demand to achieve line item quantities and cost center input tax code when creating a PO, my first reaction was to let these two fields can be edited directly in the line item area... FI12 screen enhancement (with SM30 enha ncement) Requirement: Add a piece of verification logic when adding a new account bank entry in FI12 Click the system product to see the GUI status, you can see that the OK-code corresponding to the new... TOP https://www.programmersought.com/article/59575961794/ 26/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Related Posts ME21N, ME22N, ME23N BADI enhanced ME_PROCESS_PO_CUST SAP enhancement BADI screen enhancement example (MIGO adds paging tab) VL01N VL02N VL03N line item screen enhancement BADI LE_SHP_TAB_CUST_ITEM VL01N VL02N VL03N Head-up screen enhancement BADI LE_SHP_TAB_CUST_OVER Purchase Order Enhancement (BADI) MM01 enhancement (BADI) Purchase order me22n or me21n enhancement (click save and enter) SAP QE01 BADI Interface Enhancement SAP Enhancement-Third Generation BADI Enhancement Point-Enhancement Spot (Instance) Purchase order tax code check enhancement (badi) Popular Posts kendoGrid select the previous row and the next row using commons-dbutils Jinming Robot_Post-epidemic era Changzhou robot industry takes precautions to improve "immunity" Jekyll Liquid uses a small problem: the problem raised by {% raw %} Installation of Ffmpeg in windows TOP https://www.programmersought.com/article/59575961794/ 27/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought [pro test valid] intellij IDEA "this license K03CHKJCFT has been cancelled" error when the solution Azure function service deployment failed because the function app is set to v3 but the host is v2 Vue reference iView form validation, disable [Netease] autumn strokes written test Js version of the answer (a) Linux command Recommended Posts SQL2005 installation sql.cab did not find doubts Android makes the Enter button of the soft keyboard a search button burpsuite plugin compilation study guide [Bzoj1009] [HNOI2008] GT test https://www.programmersought.com/article/59575961794/ TOP 28/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Mobile vue verification code input box Chapter 2 Information Processing and Presentation [Blue Bridge Cup] Comforting Cows-Detailed Explanation Js detailed source code version of the game Arkanoid ... for the right syntax to use near '?,?,?)' at line 1 Solution com.mysql.jdbc.exceptions.jdbc4.MySQLSynt (Java game) Magic Tower v1.0 Related Tags ABAP SAP-ABAP SAP BADI MIGO enhancement sap demand standard Enhancement point of development and modification (except exports and B CRM Advertising Sponsor Link I'm Feeling Lucky Hard work, too tired, take a break https://www.programmersought.com/article/59575961794/ TOP 29/30 7/14/2021 ME21N/ME22N/ME23N screen enhancement BADI ME_GUI_PO_CUST - Programmer Sought Contact us to advertise Copyright © 2018-2021 - All Rights Reserved - www.programmersought.com TOP https://www.programmersought.com/article/59575961794/ 30/30